|
|
View previous topic :: View next topic |
Author |
Message |
virtual
Joined: 09 Jun 2006 Posts: 3
|
How to place 4k array in program memory |
Posted: Tue Sep 08, 2009 12:41 am |
|
|
I am using PIC16F877A. I want to place constant data in ROM program
memory which is 8K in PIC16F877A. My array size is 4k. I am using
CONST and BYTE CONST directive to place data in array, but get error:
too big data. How to resolve this problem ? |
|
|
Ttelmah Guest
|
|
Posted: Tue Sep 08, 2009 2:29 am |
|
|
You can place a ROM table this size, using #ROM, _but not access it as a variable_. CCS, on the 16 chips, only allows const tables up to 256 bytes to be used. What you will need to do, is to place a #ROM directive wth the table at 0x1000, and then access this using the read_program_memory function.
This is a 'historical' limitation, few of the 16 chips, allow direct access to the program ROM, so the tables had to be constructed using RETLW instructions, and a table jump, which only supports 256 addresses max.
Generally much easier to do, in PIC18 chips.
Best Wishes |
|
|
|
|
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
|