Controlling LED using VC++
-
Hi All, Can anyone please suggest me some ideas about how to control LED's using VC++? Thanks in advance.
Regards, Ram
Can you more explain?
WhiteSky
-
I am trying to design a software to communicate with a LED using serial port to On/Off the LED. so any help regarding this will highly be appreciated.
Regards, Ram
-
I am trying to design a software to communicate with a LED using serial port to On/Off the LED. so any help regarding this will highly be appreciated.
Regards, Ram
You can't communicate with a LED using the serial port (a LED doesn't 'communicate'). You probably meant that you communicate with some kind of harware (like a microcontroler) that will switch your LED on or off. Well, then just send some specific packet on the link that your microcontroller can recognize. Where are you stuck exactly ? Because it is really vague...
Cédric Moonen Software developer
Charting control [v1.2 - Updated] -
You can't communicate with a LED using the serial port (a LED doesn't 'communicate'). You probably meant that you communicate with some kind of harware (like a microcontroler) that will switch your LED on or off. Well, then just send some specific packet on the link that your microcontroller can recognize. Where are you stuck exactly ? Because it is really vague...
Cédric Moonen Software developer
Charting control [v1.2 - Updated]Oooopzzzz. I just started to do some research regarding this to gather some knowledge about controlling LEDs using software. I understood by your answer that i should need some extra hardware(Microcontroller) to control LED. Then I must go and find something about microcontroller and controlling LED first. Anyway thanx a lot for your information. Atleast i got some idea abt this. Do you have any idea about this without microcontroller. ( that means jus with common electronic items such as breadboards, resistors, capacitors and transistors.)
Regards, Ram
-
Oooopzzzz. I just started to do some research regarding this to gather some knowledge about controlling LEDs using software. I understood by your answer that i should need some extra hardware(Microcontroller) to control LED. Then I must go and find something about microcontroller and controlling LED first. Anyway thanx a lot for your information. Atleast i got some idea abt this. Do you have any idea about this without microcontroller. ( that means jus with common electronic items such as breadboards, resistors, capacitors and transistors.)
Regards, Ram
Maybe what you could do is use one of the control line of the serial port (like CTS, but you need to check which one you could use) and then connect your LED with a resistor between this line and the ground. But, I don't think this is the most appropriate forum to discuss about that because it is not in fact a programming question...
Cédric Moonen Software developer
Charting control [v1.2 - Updated] -
Hi All, Can anyone please suggest me some ideas about how to control LED's using VC++? Thanks in advance.
Regards, Ram
You can connect LED's to some of the pins of the parallell printer port. You will need to use serial resistors, though. Else, chances are that you will break either the printer driver circuitry (in the computer), or the LEDs themself. You can use inpout32 (search for it) to control the individual pins of the parallell port.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
-
Maybe what you could do is use one of the control line of the serial port (like CTS, but you need to check which one you could use) and then connect your LED with a resistor between this line and the ground. But, I don't think this is the most appropriate forum to discuss about that because it is not in fact a programming question...
Cédric Moonen Software developer
Charting control [v1.2 - Updated]K thank you very much for your valuable information. I think your information is more than enough for me. I think i mus go with the microcontroller. Thanks again.
Regards, Ram
-
K thank you very much for your valuable information. I think your information is more than enough for me. I think i mus go with the microcontroller. Thanks again.
Regards, Ram
-
Cedric Moonen wrote:
Which LED ?
THE Led :rolleyes:
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
Hi All, Can anyone please suggest me some ideas about how to control LED's using VC++? Thanks in advance.
Regards, Ram
If you are willing to use the parallel port for driving of the LED, as Kahan has suggested, then here's a good article that might help: "Parallel port interfacing made easy: Simple circuits and programs to show how to use PC parallel port output capabilities" at http://www.epanorama.net/circuits/parallel_output.html[^] Note that under current Windows OSs, the outportb() function is no longer usable, and indeed all functions that directly access the port are not usable. You will need a prot driver, as noted in the cited article. Mike
-
Oooopzzzz. I just started to do some research regarding this to gather some knowledge about controlling LEDs using software. I understood by your answer that i should need some extra hardware(Microcontroller) to control LED. Then I must go and find something about microcontroller and controlling LED first. Anyway thanx a lot for your information. Atleast i got some idea abt this. Do you have any idea about this without microcontroller. ( that means jus with common electronic items such as breadboards, resistors, capacitors and transistors.)
Regards, Ram
I believe that you can do it using the parallel port using 24 volts that you should make available from your code in one of the port pins. We have here working something like that but in that case we make an alarm to sound and we have used a relay and some cables, but only the parallel port. If we are capable to make an alarm to sound, I'm sure that you'll be able to enlight a led. Hope this helps.