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

EEPROM Question

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







EEPROM Question
PostPosted: Fri Nov 16, 2001 10:35 am     Reply with quote

I would like to place some data in the EEPROM of a PIC16F628 during programming. In the latest manual, the #ROM directive sounds like this is possible.

The brief example in the manual shows the following for a '84:
#rom 0x2100={1,2,3,4,5,6,7,8}

I've checked the '84 datasheet and don't understand how the 0x2100 address was derived (and what part of the EEPROM this actually is). I know when writing and reading to the data EEPROM, indirect addressing is used.

First of all, is this possible?
Second, where would I find the information for the direct EEPROM addresses for the PIC16F62x?

Thanks for any help,
Jeff
___________________________
This message was ported from CCS's old forum
Original Post ID: 1143
chas
Guest







Re: EEPROM Question
PostPosted: Fri Nov 16, 2001 11:30 am     Reply with quote

:=I would like to place some data in the EEPROM of a PIC16F628 during programming. In the latest manual, the #ROM directive sounds like this is possible.
:=
:=The brief example in the manual shows the following for a '84:
:=#rom 0x2100={1,2,3,4,5,6,7,8}
:=
:=I've checked the '84 datasheet and don't understand how the 0x2100 address was derived (and what part of the EEPROM this actually is). I know when writing and reading to the data EEPROM, indirect addressing is used.
:=
:=First of all, is this possible?
:=Second, where would I find the information for the direct EEPROM addresses for the PIC16F62x?
:=
:=Thanks for any help,
:=Jeff

Check page 12 of the 16F62X EEPROM Memory Programming Specification on Microchip's website. It's located with the docs for the 16X62X family, then go to the 16F628 page.
___________________________
This message was ported from CCS's old forum
Original Post ID: 1156
Tomi
Guest







Re: EEPROM Question
PostPosted: Fri Nov 16, 2001 11:37 am     Reply with quote

Max. ROM size for 16C/F series PICs: 8192 words, so:
Addresses under programming (for ALL 16C/16F chips):
-------------------------------
0x0000 - 0x1FFF : the code ROM space
0x2000 - 0x20FF : Cofiguration Word and ID locations (only 8 out of 256 used)
0x2100 - : internal data EEPROM if exists

The data EEPROM is not a ROM, that is true. But you can instruct the compiler to write it into a HEX file as a ROM array started at a specific address. When your programmer reads the HEX file it will send out programming instructions to the specified addresses. Just keep in mind your EEPROM size limits, e.g. 0x2100 - 0x2140 for 16F84, 0x2100 - 0x217F for 16F62X, 0x2100 - 0x21FF for 16F877, etc.


:=I would like to place some data in the EEPROM of a PIC16F628 during programming. In the latest manual, the #ROM directive sounds like this is possible.
:=
:=The brief example in the manual shows the following for a '84:
:=#rom 0x2100={1,2,3,4,5,6,7,8}
:=
:=I've checked the '84 datasheet and don't understand how the 0x2100 address was derived (and what part of the EEPROM this actually is). I know when writing and reading to the data EEPROM, indirect addressing is used.
:=
:=First of all, is this possible?
:=Second, where would I find the information for the direct EEPROM addresses for the PIC16F62x?
:=
:=Thanks for any help,
:=Jeff
___________________________
This message was ported from CCS's old forum
Original Post ID: 1157
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