wackazong Posted September 1, 2008 Report Share Posted September 1, 2008 Hi,I have a project for a MBHP that needs to store some data (about 4kB) in the memory of the PIC. I am using the PIC18F4685, therefore I should have enought memory. What is the best way to organise this memory? I know that you cannot use arrays that are bigger than 256 bytes, therefore I am thinking of using multiple arrays of 256 bytes (16 for 4kB). Is there a more convenient way? May using short assembler parts which access the memory? Any ideas?I am storing the I2C addresses of 48 LED drivers, the corresponding LED addresses on these drivers, and the LED state (256-step indiviual PWM) for each LED (in total 3*256 LEDs). Storing all this on the PIC makes the interface to the computer so much easier and faster.Thanks, ALEXander. Quote Link to comment Share on other sites More sharing options...
wackazong Posted September 1, 2008 Author Report Share Posted September 1, 2008 Let me reply to myself:4kB is too much for the data memory, it is only roughly 3kB. And the EEProm is only 1kB (I was just fixed on the 96kB program memory)...So I have the choice between Bankstick or access to the Flash Memory. Which one ist faster? I should have plenty of free flash available in the PIC18F4685, or shouldn't I? If yes, which address could I use to store my 4kB?Many thanks, ALEXander. Quote Link to comment Share on other sites More sharing options...
TK. Posted September 2, 2008 Report Share Posted September 2, 2008 Yes, in this particular case it makes sense to store tables in internal flash. Your questions don't make clear if you want to replace the data tables dynamically (uploading a new table without touching the code). I guess, that this isn't required for your application.So, let the linker locate the data tables - don't take care for the absolute addresses by yourself, this isn't really required.Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
wackazong Posted September 2, 2008 Author Report Share Posted September 2, 2008 Yes, thats how I will do it. Thanks.ALEXander. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.