View previous topic :: View next topic |
Author |
Message |
forgie
Joined: 03 Nov 2005 Posts: 7
|
Using #rom for internal EEPROM |
Posted: Mon Nov 28, 2005 11:41 pm |
|
|
Well I know that I should be able to find an answer somewhere, but I've been searching the 18f452 datasheet and haven't been able to find it.
I need to set the first 8 bytes of EEPROM to 0 in my hex file.
This should do the trick
#rom 0xXXXX = {0,0,0,0,0,0,0,0}
Only I don't know what the EEPROM address is (0xXXXX).
How do I find the address of the first EEPROM location? Or even better, what is the address for EEPROM in a 18f452?
Thanks alot,
forgie |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Nov 28, 2005 11:57 pm |
|
|
The address of the Data EEPROM is usually given in the Programming
Specification for the PIC.
So go here, to the Data Sheet Finder page on the Microchip website:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2046
Then select 18F452 in the drop down box and wait for the page to load.
Then download the Programming Specification. The link is down on
the bottom of the right-hand side of the page.
Then in the Programming Spec, look for the section called:
"Embedding Data EEPROM Information In the HEX File".
It's near the end of the document. There you will find the address. |
|
|
forgie
Joined: 03 Nov 2005 Posts: 7
|
|
Posted: Tue Nov 29, 2005 12:15 am |
|
|
Great, thanks heaps for the pointer. |
|
|
|