Jump to content

Dealing with large amounts of data on the PIC


wackazong

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...