Is it possible to set the MIAC in some kind of sleep mode (to conserve
power) and make it wake up after a specified time ?
MIAC sleep mode
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: MIAC sleep mode
There are only ways I can think of to wake a miac after a specified time has elapsed.
1) Using T1osc connected to RC1. Since the main osc will not be working during sleep mode, you will need to have external clock signal e.g external xtal connected to RC1 and RC0.
2) A better way would be to alter the extended watchdog timer to generate a watchodog time out after the desired wake up time from 41 ms to 131s
Since Watchdog timer is controlled by an independent osc that does run while in sleep mode, that would be the ideal method in my opinion.
You should be able to use sleep(); command in a C code to put miac to sleep.
If you want to use timer0 for timing, you will need to use timer3 instead, and use prescaller for WD timer instead of timer0
You must make sure there is no watchdog time out during normal operation, i.e when in wake mode.
Not got time tonight, but if you get stuck then I can see if I can put a working flowchart together that wakes up after a predetermined time.
Martin
1) Using T1osc connected to RC1. Since the main osc will not be working during sleep mode, you will need to have external clock signal e.g external xtal connected to RC1 and RC0.
2) A better way would be to alter the extended watchdog timer to generate a watchodog time out after the desired wake up time from 41 ms to 131s
Since Watchdog timer is controlled by an independent osc that does run while in sleep mode, that would be the ideal method in my opinion.
You should be able to use sleep(); command in a C code to put miac to sleep.
If you want to use timer0 for timing, you will need to use timer3 instead, and use prescaller for WD timer instead of timer0
You must make sure there is no watchdog time out during normal operation, i.e when in wake mode.
Not got time tonight, but if you get stuck then I can see if I can put a working flowchart together that wakes up after a predetermined time.
Martin
Martin