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

RS232 logic

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



Joined: 22 Nov 2003
Posts: 32

View user's profile Send private message

RS232 logic
PostPosted: Tue May 11, 2004 10:09 am     Reply with quote

I'm using a PIC18F452 to communicate with a serial device using an RS232 convertor (ST232N). I'm not having any problems communicating (TX/RX) with the device The problem is that it uses the DTR line to indicate an external condition by sending a low (RS232 logic) which is the natural state of the RS232 convertor. So what I get is a low state even if the device is not connected. I need to know that the low state is valid. How do I get the RS232 logic to default to a high state?

Bob
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Tue May 11, 2004 5:18 pm     Reply with quote

Connect the DTR line to one of the RS232 inputs of the ST232n (pin 8 or 13). The output will be a proper TTL level signal which is going to be a 1 when the device is not ready or disconnected.
solution
Guest







PostPosted: Tue May 11, 2004 6:20 pm     Reply with quote

Turns out I already had the solution but was using too weak a value for a pull-up resistor. I put a 5k (tried 10k) pull-up to the +10v output and it now defaults to a high instead of a low and still allows the device to pull it low. The internal pull-down in the ST232N is also a 5k and is connected to ground.

Bob
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