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

How to discard data in TXREG?

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



Joined: 10 Sep 2003
Posts: 60

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger ICQ Number

How to discard data in TXREG?
PostPosted: Thu Dec 30, 2004 9:09 pm     Reply with quote

Dear all,

I would like to throw all the serial data that is in the txreg register so that I can write new data into it and reset the TXSTA pin. May I know how should I do that?
_________________
Einly
dyeatman



Joined: 06 Sep 2003
Posts: 1931
Location: Norman, OK

View user's profile Send private message

PostPosted: Thu Dec 30, 2004 10:21 pm     Reply with quote

I believe TXSTA is a register not a pin...

Not sure why you would want to do this but....

According to the DATA SHEET in case you haven't read it, all you have to do is clear the TXEN bit then put your new data in the TXREG then set TXEN

See the section in the data sheet titled USART Asyncronous Transmitter
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