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

multiple hw rs232

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



Joined: 16 Apr 2004
Posts: 3

View user's profile Send private message

multiple hw rs232
PostPosted: Tue Sep 27, 2005 3:45 am     Reply with quote

Thanks Mark.
What can I do If I have to transmit with RS232 #1 while I'm receiveing (interrupt enabled) with RS232 #2? How can I manage this situation?
_________________
momb
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Tue Sep 27, 2005 6:27 am     Reply with quote

There are separate transmit and receive interrupts for each hardware uart. So there is no problem. If using the printf() statement. Specify a stream in the #use rs232 statement and then use fprintf().
mombellardo



Joined: 16 Apr 2004
Posts: 3

View user's profile Send private message

PostPosted: Tue Sep 27, 2005 10:17 am     Reply with quote

OK, all is separate. But when I have to send a character (or more) in the program, if I use the instruction putc() (for example in a loop) how can I address the correct RS232 channel?
_________________
momb
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

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

PostPosted: Tue Sep 27, 2005 11:52 am     Reply with quote

STREAMS
value = fputc(cdata, stream1)
value = fputc(cdata, stream2)
#use rs232(baud=19200,xmit=PIN_E0,INVERT,stream=stream1,DISABLE_INTS)
#use rs232(baud=1200,errors,xmit=PIN_C6,rcv=PIN_C7,parity=e,enable=PIN_C5,bits=8,stream=stream2)
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Tue Sep 27, 2005 12:20 pm     Reply with quote

Yeah, what he said Mr. Green
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