|
|
View previous topic :: View next topic |
Author |
Message |
webbone
Joined: 20 Sep 2004 Posts: 14 Location: Sacramento, CA
|
How to embed data into ROM on PIC18F - equivalent of DB |
Posted: Wed Dec 07, 2005 6:01 pm |
|
|
If I am using MPASM I can do the following:
Code: | MyLabel:
data "some text",0xFF,0xAA
MyOtherLabel:
DB 'A','B','X',0x55,'Z',0x00 |
This will store the appropriate data into ROM and then the address of MyLabel can be used to access the data.
The CCS compiler offers the label_address() function, but does not support either the data or DB directives in an #ASM block.
Is there another way to achieve the same thing? It would be most helpful if this could be achieved as shown above - the data being placed into ROM is configuration data for another device and will be moved to the device using an Assembly routine.
Any and all suggestions would be useful, even if it is just to state that this is impossible with the CCS tools. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1635 Location: Perth, Australia
|
|
Posted: Wed Dec 07, 2005 6:50 pm |
|
|
Here's another way
Code: |
#define Table 0x0C80 // specify where in program memory we want the table
#rom Table = {0x8C01,0x01EF,0x0023,0x0000,0x0000}
|
_________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
|
|
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
|