Fill Unused Memory with GOTO xxxx
Spehro Pefhany email (remove spam text)
At 10:26 PM 12/8/02 +0100, you wrote:
It's a standard precaution.. but the PIC has only only the exact PC size to
address the internal ROM, and the hardware stack wraps as well, so even
if you jump into a whole bunch of addlw instructions (the unprogrammed
default of all 1's) then it should wrap around and do a cold start
within a very short period of time. It's much more critical with
microprocessors and certain other microcontrollers that have
von Neumann architectures, lack interrupt on invalid address, etc.
If your programmer is putting random crap, or worse, the remains of
previously used programs, in there, then it should be changed!
BTW, an "interesting" feature of the new method of doing OSCCAL
in F676 and some other processors is that if the memory is erased
and an appropriate instruction isn't programmed into the top of
memory, the PIC will appear to be dead- it will call 0x3FF or
whatever, find an instruction that isn't a RETLW, wrap around to
your cold start routine and thus rinse and repeat, ad infinitum.
The programmer is supposed to take care of this detail, of course, but
a lot of the unofficial programmers seem to be somewhat buggy by times.
Spehro Pefhany --"it's the network..." "The Journey is the reward"
interlog.com Info for manufacturers: speffhttp://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
In reply to: <3DF3B8F5.firstname.lastname@example.org>
See also: www.piclist.com/techref/microchip/memory.htm?key=memory
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the