|
-
Aug 4th, 2006, 08:42 AM
#1
Thread Starter
New Member
com port power supply
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?
-
Aug 4th, 2006, 10:29 AM
#2
Re: com port power supply
Enable RTS/CTS handshaking and enable DTR/DSR.
VB Code:
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.
-
Aug 4th, 2006, 12:10 PM
#3
Hyperactive Member
Re: com port power supply
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.
Truly, you have a dizzying intellect.
-
Aug 4th, 2006, 01:28 PM
#4
Re: com port power supply
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.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Aug 5th, 2006, 05:42 AM
#5
Thread Starter
New Member
Re: com port power supply
Thanks a lot, i will try this out today
-
Aug 6th, 2006, 08:01 PM
#6
Thread Starter
New Member
Re: com port power supply
hi, it doesnt work
VB Code:
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
VB Code:
MSComm1.Handshaking = comNone
MSComm1.DTREnable = True
MSComm1.RTSEnable = True
and with this works allright.
-
Aug 7th, 2006, 02:32 AM
#7
Re: com port power supply
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|