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

Reading Device ID

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



Joined: 07 Dec 2004
Posts: 127
Location: Southampton, UK

View user's profile Send private message

Reading Device ID
PostPosted: Mon Apr 28, 2008 1:37 am     Reply with quote

Hi guys,

I'm having a problem to which I suspect the solution is very simple. I'd like to read the device IDs of the part I'm using and I was trying this:

#byte device_id1 = 0x3FFFFE
#byte device_id2 = 0x3FFFFF

And then reading the byte pointed at by device_idX. However I always get zero. I got the register locations from the datasheet but they seem wrong as they are more than 16bit. Can anyone point me in the right direction? I'm using the 18f6723.

cheers

ed
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Apr 28, 2008 1:49 am     Reply with quote

The #byte method only works with RAM, not flash.
See this thread for sample code to read the Device ID:
http://www.ccsinfo.com/forum/viewtopic.php?t=20257
EdWaugh



Joined: 07 Dec 2004
Posts: 127
Location: Southampton, UK

View user's profile Send private message

PostPosted: Mon Apr 28, 2008 2:39 am     Reply with quote

Cheers, that works great. I tried searching the forum for device id but got 4500 hits. I'll have to practice!

thanks

ed
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