PDA

Click to See Complete Forum and Search --> : com port power supply


xlogan
Aug 4th, 2006, 08:42 AM
hi there

I am developing an application that comunicates with a PIC microcontroller (pic16f88) and my aplication is recieving data from the PIC, everything works fine, i can recive the data from the PIC and viceversa, but... when i whant to power my circuit with the lines of the com port it doesnt work.

i try to power up the circuit by using the 7 -> RTS y 4 -> DTR pins and usin a pair of diodes (1N4148) i conect them to a voltage regulator (LM7805), i use the diodes because this lines dives voltage from -10 to +10, the thing is that this configuration diodes works, because i test the circuit with the HYPERTERMINAL program and works all right, but when i use my VB application y does not work, it is becaus one of the pins do not give me the +10 voltage instead it gives -10, but with HYPERTERMINAL both gives +10

any idea how to solve this problem?

namrekka
Aug 4th, 2006, 10:29 AM
Enable RTS/CTS handshaking and enable DTR/DSR.

MSComm1.Handshaking = comRTS
MSComm1.DTREnable = True
MSComm1.RTSEnable = True

Remember it only works with desktop PC's and no more then ca 5mA per pin.

gtilles
Aug 4th, 2006, 12:10 PM
I don't know how much current the Com Port can source but I know it is very small, I would not rely on the com port to supply power to your circuit unless you know the requirement draw is less than the source can safely supply.

Al42
Aug 4th, 2006, 01:28 PM
Most COM ports can supply enough current for most PIC microcontrollers. In fact, it's common practice to design microcontroller programmers using the COM port as a power supply.

xlogan
Aug 5th, 2006, 05:42 AM
Thanks a lot, i will try this out today

xlogan
Aug 6th, 2006, 08:01 PM
hi, it doesnt work
MSComm1.Handshaking = comRTS
MSComm1.DTREnable = True
MSComm1.RTSEnable = True


but i try a diferent handshaking and try with comNone and the code was like this
MSComm1.Handshaking = comNone
MSComm1.DTREnable = True
MSComm1.RTSEnable = True


and with this works allright.

namrekka
Aug 7th, 2006, 02:32 AM
OK. Success.