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

Access General Purpose Registers

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



Joined: 05 Oct 2009
Posts: 9

View user's profile Send private message

Access General Purpose Registers
PostPosted: Thu Oct 15, 2009 5:28 pm     Reply with quote

Hello,

Is there a command that I can use to access the data in the general purpose registers of the PIC16F917.

Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Oct 15, 2009 5:37 pm     Reply with quote

See this recent thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=40398
And here for more info:
http://www.ccsinfo.com/forum/viewtopic.php?t=36803&start=3
freddayz



Joined: 05 Oct 2009
Posts: 9

View user's profile Send private message

PostPosted: Mon Oct 19, 2009 12:09 pm     Reply with quote

Thanks for your help...

I did the following:

Code:
// Memory type assignment
#byte DATA1 = 0xA0      // define DATA1's address be careful*
#bit m_VCC_5V0 = DATA1.0
#bit m_VCC_3V3 = DATA1.1
#bit m_VCC3V3_GOOD = DATA1.2
#bit m_VCC_2V5 = DATA1.3
#bit m_VCC2V5_GOOD = DATA1.4
#bit m_VCC_1V8 = DATA1.5
#bit m_VCC1V8_GOOD = DATA1.6
#bit m_VCC_1V0 = DATA1.7


Afterwards, I can access the data by simply reading DATA1 or each specific bit. This is very simple compared to other answers I receive which wanted me to create a structure.
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Oct 19, 2009 12:52 pm     Reply with quote

Quote:
This is very simple compared to other answers I receive which wanted me to create a structure.
The same method has been suggested in the above quoted post.
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