CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

simple RS232 Questions

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
sadlpx



Joined: 19 Feb 2004
Posts: 23

View user's profile Send private message

simple RS232 Questions
PostPosted: Tue Oct 28, 2008 9:04 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Oct 28, 2008 11:44 am     Reply with quote

That's correct.
ECACE



Joined: 24 Jul 2006
Posts: 94

View user's profile Send private message

PostPosted: Tue Oct 28, 2008 11:47 am     Reply with quote

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

View user's profile Send private message Visit poster's website

PostPosted: Tue Oct 28, 2008 11:50 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Oct 28, 2008 11:59 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group