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

is it possible to use two software and one hardware uart

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



Joined: 18 Jun 2010
Posts: 25

View user's profile Send private message

is it possible to use two software and one hardware uart
PostPosted: Wed Jul 14, 2010 7:38 am     Reply with quote

hai to all


I need three uart. One is hardware and other two are software uart. How to utilize this? What I need is I have to connect GPS in hardware uart, where as Xbee in other (as one software uart works like a half duplex. thats why I am required two. One is for transmit while other is for receive). Is it possible to do like this? If so kindly provide some suggestion.

I had tried, the sample code by rotating a same data from software uart (making one as transmit while other as receive) and transfer the received data to the hardware uart. Finally I see the received data from hardware uart to the pc.
Code:

#use rs232(baud=9600, xmit=pin_c6,rcv=pin_c7,stream=coma)
#use rs232(baud=9600, xmit=pin_B4,stream=comb)
#use rs232(baud=9600,rcv=pin_c0,stream=comc)
 void main()
{
char c;
fprintf(comb,"A");
c=getc(comc);
fputc(c,coma);
}

I am using ccs compiler version 4.053.
kindly reply me
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