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

How to use the serial‘s TXSTA RCSTA

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



Joined: 23 May 2007
Posts: 22

View user's profile Send private message

How to use the serial‘s TXSTA RCSTA
PostPosted: Fri Nov 07, 2008 1:22 am     Reply with quote

How to use the serial’s TXSTA RCSTA ? How to set up TXSTA‘s TX9D to judge whether send the address or data ?

I don't find the sample about this for a long time.

Who can help me ? Thanks in advance.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Nov 07, 2008 2:15 am     Reply with quote

Look at this CCS driver file:
Quote:
c:\program files\picc\drivers\rs485.c

Look at this routine in that file:
Code:
int1 rs485_send_message(int8 to, int8 len, int8* data)

Notice that the UART is configured for "long data" in the #use rs232()
statement. Notice that when they send the address, they "OR" the ID
with 0x100.

That function is called in these example files:
Quote:
c:\program files\picc\examples\ex_rs485.c
c:\program files\picc\examples\ex_rs232_485.c
c:\program files\picc\examples\ex_rfid.c 5/8/06
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