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 define register (for UART)

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



Joined: 11 Nov 2013
Posts: 13

View user's profile Send private message

How to define register (for UART)
PostPosted: Wed Jul 02, 2014 12:36 am     Reply with quote

I am programming some UART communication. So far I have used the CCS functions to do that. But now I would like to write my own code for UART by writing directly to the UART registers.

There are good explanations in reference manual 70188. But now my hopefully not too stupid question? Where or how are the registers defined?

Example: The reference manual show in Example 17-2 how to write to the TX register:

U1TXREG = 'a';

But where is U1TXREG defined? Is there some include file I can use or do I have to define it myself? If I have to define it myself, then how do I do this? (e.g. where can I finde the address of this register?)
alan



Joined: 12 Nov 2012
Posts: 357
Location: South Africa

View user's profile Send private message

PostPosted: Wed Jul 02, 2014 12:41 am     Reply with quote

Look in the compiler manual for "getenv". You'll find the use and explanation there.

Regards
arnadan



Joined: 11 Nov 2013
Posts: 13

View user's profile Send private message

PostPosted: Wed Jul 02, 2014 12:49 am     Reply with quote

Thank you for your help. Problem solved. Simple, now that I know where to look it up. Smile
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jul 02, 2014 12:58 am     Reply with quote

Also, see this thread:
https://ccsinfo.com/forum/viewtopic.php?t=51941&highlight=make+include+file
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