PDA

View Full Version : Memory question



Charlie
- 27th April 2012, 12:12
This is a basic question I'm almost embarassed to ask, but I'm totally confused...

I'm using an 18F2580. According to the datasheet, it has 32,000 bytes of flash.
The program I've written, according to PBP is 27,890 bytes long (getting close), but it generates a HEX file 78,499 bytes.
Yet it compiles with no errors or warnings, and it loads and runs just fine.

Why is the hex file so big?

Darrel Taylor
- 27th April 2012, 16:22
The .HEX files are Plain Text.
It takes two characters for each byte, with addresses and checksums on each line.

They will always be much bigger than the actual size of the program in the PIC chip.