Page 1 of 1

Memory Usage

Posted: Tue Sep 22, 2015 11:02 pm
by alanwms
Currently using PIC18F4525 with 48K flash, and 24576 single word instruction locations. 3968 Sram and 1024 Eeprom.

When using Constants, I would like to understand where they reside - Which memory types are used
When using variables, where are they stored?

Secondly - Do you have an example for reading and writing a USB thumb drive without using eblocks?

Thanks.

Re: Memory Usage

Posted: Tue Sep 22, 2015 11:47 pm
by kersing
alanwms wrote:Currently using PIC18F4525 with 48K flash, and 24576 single word instruction locations. 3968 Sram and 1024 Eeprom.

When using Constants, I would like to understand where they reside - Which memory types are used
When using variables, where are they stored?
Variables are stored in RAM. Constants are generally stored in flash with the code, unused constants are not stored anyware. The easiest way to find the information yourself would be to create a simple program, compile and note the sizes reported, add a variable, compile again and compare the new values to the earlier ones.
alanwms wrote: Secondly - Do you have an example for reading and writing a USB thumb drive without using eblocks?
This device can not read an USB drive without additional hardware. None of the 8 bit PIC devices can be an USB host and USB host is required to connect to a USB drive. A possible solution would be to use a Vinculum 1 USB Host Controller.