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 support@ccsinfo.com

One wire RS232

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








One wire RS232
PostPosted: Sun Aug 13, 2006 7:02 am     Reply with quote

Hi,

Is it possible to use 1 pin for rx & tx? If so, what's the way to do it?

I tried this, but it doesn't work:
#use rs232(baud=9600, parity=N, bits=8, rcv=pin_b5, xmit=pin_b5)
Guest








PostPosted: Sun Aug 13, 2006 7:03 am     Reply with quote

Oh and it will be half-duplex communication ofcourse.. don't worry about timing, cause I just want one side to respond to a byte sent on the other side..
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Aug 13, 2006 9:26 am     Reply with quote

See these CCS example files:
c:\program files\picc\examples\ex_pbusm.c
c:\program files\picc\examples\ex_pbusr.c

FAQ page with schematic:
http://www.ccsinfo.com/faq.php?page=connect_pics
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Mon Aug 14, 2006 12:08 pm     Reply with quote

I do that all the time. Here is my usual RS232 setup line:

Code:
#define TXRser      PIN_B0   /* Serial connection to Smart TXR */
#use rs232(baud=1200, xmit=TXRser, rcv=TXRser, invert)

_________________
The search for better is endless. Instead simply find very good and get the job done.
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