I want to light up/off LEDs without a microcontroller. I'm looking to control the LEDs by writing a C++ program. but the problem im having is hooking them up is there a free way to do !!!!
I'm using Windows XP if that is relevant.
I have LEDs but I don't have a microcontroller.
Well, I found some functions but their headers are not working, so can someone help me find headers?
Here is an example of what I'm talking about:
poke(0x0000,0x0417,16);
gotoxy(1,1);
printf("Num Lock LED is now on r");
delay(10);
Also, does anyone have a "Kernel Programming" eBook?
I also need a circuit diagram to show where to hook up the LEDs.
That completely depends on which hardware you have, which determines which driver you need. Back then, i got a simple led and put it into the printer LPT port. Then i could write a byte to address 0x0378h and the bits in it determined whether a pin had power or not (using linux). For windows, you need a driver that allows you to access the lpt port directly. I did it with a friend back then too, and it worked nicely (we built up a traffic light :)) Read this page (click on Parallel Port on the left. For some reason, i cannot link directly to it) for details on windows. And read
man outb
on linux. Now, that Port is really old. But if you have some machine around that still got one, i think it's a lot of fun to play with it.Anyway, i've got a fritz box that has a neat LED. One can connect to it via
telnet
and then write something (i forgot the numbers) into/proc/led
iirc. A kernel driver then interprets the number and makes the right LED blink. That's another way of doing it :)This CodeProject article Controlling LEDs with Parallel Port might be of interest.
I do some changing here i think it would worked so try this.
Well you want to look for a development kit in microelectronics. I'm going to take a punt at this and say that you're not familiar with electronics?
Microcontrollers aren't anything to be scared of and if you get a nice dev kit one from Atmel or Microchip then the manual and templates they give you are extremely straightforward. But you will need SOME kind of hardware beyond the 12c led's to do this.
Could you perhaps provide more info on what you want to do? If you just want to time how often the lights turn on and off I could give you a simple circuit thats idiot proof.
On Windows this will toggle the lights on your keyboard:
(eg. Scroll-lock light)
You're gonna have to give us some more details. What kind of computer, what operating system, etc.
You're probably going to need to at least buy some LEDs and a little bit of stuff.