part 0 514 bytes
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META content='"MSHTML 4.72.3110.7"' name=GENERATOR>
<DIV><FONT color=#000000 size=2>I would appreciate it if anyone could tell my
how to reset a PIC16C73, without using the watchdog.</FONT></DIV>
<DIV><FONT color=#000000 size=2>It should reset the pic, and clear the
>I would appreciate it if anyone could tell my how to reset a PIC16C73,
without using the watchdog.
>It should reset the pic, and clear the stack.
Now, here is a trick which I am sure will frost the butt of any
real programmer. Maybe in some cases, you want to "clear the
stack", but not necessarily need to "reset" the chip per se.
Well, the stack on the PIC "wraps around". This means you can
simply "discard" all those return addresses to break out of a
routine and go back to the top level. So ....
a) Use a h.w. interrupt (timer, RS-232, peripheral, other external),
possibly in conjunction with a flag setting.
b) From inside the interrupt service routine, trap out the specific
event, and use a GOTO back to "start", rather than a RETFIE to
exit. Make sure you reset the interrupt flags, etc.
Great way to break out of an infinite loop. All those levels of
return addresses magically poof into thin air. The stack is "clear".
- Dan Michaels
M. Adam Davis
Tie a pin to MCLR, and raise them both through a resister to high. When you
want to reset, set the pin to output, and low.
After reset the pins are defined as inputs, so you shouldn't have any problems
with it staying in reset.
> Mike Andersen wrote:
> I would appreciate it if anyone could tell my how to reset a PIC16C73, without
> using the watchdog.
> It should reset the pic, and clear the stack.
More... (looser matching)
- Last day of these posts
- In 2000
, 2001 only
- New search...