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

Simplex Serial (1 pin) using CCS #use rs232 stream?

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



Joined: 01 Jan 2007
Posts: 38
Location: Mississauga, Ontario, Canada

View user's profile Send private message

Simplex Serial (1 pin) using CCS #use rs232 stream?
PostPosted: Sun Sep 27, 2009 6:05 pm     Reply with quote

Hello, I have a project where I need a couple of USARTs to simply send data from the PIC to a couple of computers (I only need to send, not receive). Is there a way to use the serial library #use rs232 with only a 'xmit' (no rcv) pin? I'm trying to save pins on the PIC as I need as many as the 18F4520 can offer me! thanks everyone.
Guest








PostPosted: Sun Sep 27, 2009 6:33 pm     Reply with quote

Hi,

Yes, the compiler will create a software UART for this purpose, and use the pin specified. If you don't specify both a Tx and an RX pin, a software UART is created, but that doesn't seem to be a problem for you!

Chad
maxrate



Joined: 01 Jan 2007
Posts: 38
Location: Mississauga, Ontario, Canada

View user's profile Send private message

PostPosted: Sun Sep 27, 2009 6:44 pm     Reply with quote

So, if I understand you correctly (and perhaps I'm being overly optimistic), if I don't specify a RX pin when defining a USART, the CCS library will create a simplex (not full duplex) port? I'll have to try that - never thought about trying that.
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Sun Sep 27, 2009 9:14 pm     Reply with quote

I would suggest - unless you already committed your C6,C7 pins
AND need a duplex Uart - that you use the hardware UART first.

Be warned - the software RX & TX uarts can receive &&|| transmit trash
easily when interrupted by any other process.

The software UART is NOT a cure all for needing multiple RS_232 ports
as using INTS can and will wreck reliability of the data stream eventually.

ONLY the hardware implemented USART RX/TX is immune.
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