Monday, January 18, 2010

I want to connect a led to com1 or com2 and control itusing a written code by vb.net??

if any one have an info about this,, plz??I want to connect a led to com1 or com2 and control itusing a written code by vb.net??
All you have to do is open the port. If you connect a 1 to 2K resistor in series with an LED, you can connect the positive to the DTR (data terminal ready) pin 4 and the cathode to ground Pin 5. The LED will light when the port is opened. You can CLOSE the port, and the LED will go out. RS232 voltages can be all over the place, from 卤10V to more, so be sure not to overdrive the LED. That is the simplest way I know to make the LED go on and off without sending any data. The Port has to be set up for duplex communications (if that is an option) so the OPEN command will set the DTR bit in the UART. When the CLOSE command is run, it will reset the DTR bit, and the LED will go out. You can repeatedly open and close the port.I want to connect a led to com1 or com2 and control itusing a written code by vb.net??
http://www.codeworks.it/net/VBNetRs232.h鈥?/a>

No comments:

Post a Comment