'Problem with PIC and WDT wakeup'
in a datalogger application we are using:
crystal oscillator at 4 MHz
To save battery lifetime the device is mostly in sleep mode. We use the WDT
to wake it up periodically. When a wakeup happens we check for a RTC alarm
(e.g. the RTC pulls down a port pin of the PIC), do something (and reset the
RTC alarm condition) and then go back to sleep mode. If there is no RTC
alarm we go to sleep immediately. This approach works great most of the
time, but some devices do very seldom stop to work. In this cases the RTC
alarm pin is down (e.g. the RTC still worked and did set the alarm
condition) but the PIC does not react on the alarm any more. There are two
ways to restart it: 1. Disconnect the power supply, 2. Touch the oscillator
At the moment we have no idea whether it's a software or hardware problem.
We think that there are the following possibilities:
1. The oscillator doesn't restart upon WDT wakeup.
2. The WDT stops to work and therefor does not generate a wakeup any more
3. The program counter gets corrupted
|On Fri, 1 May 1998 19:32:46 +0200 Frank Schmidberger
<T-ONLINE.DE> writes: FrankSchmidberger
>in a datalogger application we are using:
> In this cases the
>alarm pin is down (e.g. the RTC still worked and did set the alarm
>condition) but the PIC does not react on the alarm any more. There are
>ways to restart it: 1. Disconnect the power supply, 2. Touch the
It sounds like the oscillator is not starting. Since touching the pins
helps, you probably need more capacitance. It seems almost certain, but
you can be sure it's not a software problem by connecting an external
clock. You could also try pulsing the MCLR pin low to guarantee a
wakeup. I don't think this disturbs the oscillator if it's already
trying to run.
It's good to stress-test the oscillator by varying the supply voltage.
Use the actual circuit board and crystal, and a test PIC programmed to
just toggle an output pin to show that it's running, then sleep and WDT
wake up. Replace the usual supply with an adjustable voltage. Vary the
supply voltage and make sure the oscillator starts and runs at all
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]
More... (looser matching)
- Last day of these posts
- In 1998
, 1999 only
- New search...