PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Jan 27, 2004 6:31 pm |
|
|
For the PCM compiler:
Reset_cpu() jumps to the start of the program, at address 0x0000.
So if you are using the #zero_ram pre-processor statement in your
program, then that code will be executed and the ram will be cleared,
when the program re-starts.
The compiler also puts in code to clear static variables, so if you
have declared any variables as static, they will be cleared, as well.
EEPROM is not affected, unless you have code in your program
that writes to EEPROM.
===============================
For the PCH compiler:
Reset_cpu() executes the software RESET instruction.
This does a \MCLR reset. In the 18F data sheet, it says this:
"Most registers are unaffected by a RESET. Their status
is unknown on POR and unchanged by all other
RESETS".
So this implies that RAM is not changed by executing the
reset_cpu() function for the PCH compiler.
EEPROM is also not affected. |
|