View previous topic :: View next topic |
Author |
Message |
sadlpx
Joined: 19 Feb 2004 Posts: 23
|
simple RS232 Questions |
Posted: Tue Oct 28, 2008 9:04 am |
|
|
Having trouble with my RS232 using a MAX232 and need some help.
1. If I use the statement for hardware USART on 16F877,
Code: | #use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8) |
I should have a normal high signal (5vdc) going low (with pattern ) during transmit. Correct???? that same signal should also be at pin 11 of the Max232??? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Oct 28, 2008 11:44 am |
|
|
That's correct. |
|
|
ECACE
Joined: 24 Jul 2006 Posts: 94
|
|
Posted: Tue Oct 28, 2008 11:47 am |
|
|
Correct. Remember though that the MAX232 has two channels for tx and two for rx. So it could be on 10 or 11, depending on how your board is wired up. Good luck. _________________ A HW Engineer 'trying' to do SW !!! Run!!! |
|
|
Rohit de Sa
Joined: 09 Nov 2007 Posts: 282 Location: India
|
|
Posted: Tue Oct 28, 2008 11:50 am |
|
|
As PCM Programmer confirmed, pin 11 on the MAX232 is a TTL input pin. The output of this pin will be an inverted voltage, about -13V, when input is 5V.
Rohit |
|
|
sadlpx
Joined: 19 Feb 2004 Posts: 23
|
|
Posted: Tue Oct 28, 2008 11:59 am |
|
|
Found my problem. I was getting poor signal out and did not understand.
Thought I had done something wrong in wiring. Problem turned out to be 1k resistor on 5v(p16). Eliminated resistor and all voltage input and output look fine.
Been gone a while and having problems. Next problem will be a new post thanks. |
|
|
|