how much memory is free? 16f1939 to 18f4520

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
tello
Posts: 94
Joined: Wed Jan 16, 2013 11:37 am
Has thanked: 56 times
Been thanked: 16 times
Contact:

how much memory is free? 16f1939 to 18f4520

Post by tello »

Good morning.
I have a problem, I'm doing a project with a 16f1939 16k program memory but I have run out of memory and I decided to move to a higher microcontroller. I chose the 18F4520 with 32K of program memory and is fully pin-compatible.
When I compile the program with the new microcontroller should have 50% free memory but it is not correct, the compiler tells me I have 21% free memory.
What is the reason? I have to do the program and I think I'll stay out of memory again.

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: how much memory is free? 16f1939 to 18f4520

Post by LeighM »

Hi
Both of those processors have 16k word, or instruction, program memory space.
The 16F1939 instruction is 14 bits wide, so converting the program space to bytes does not make any sense so is not quoted by the manufacturer.
Regards,
Leigh

Post Reply