ns2014
Newbie level 2
- Joined
- Jun 27, 2014
- Messages
- 2
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 18
Dear All,
I'm looking for an example for using the Watchdog timer in Codevision but I cannot find any.
I used the Wizard to generate the code to include the Watchdog timer
but I was expecting some straightforward functions such as:
watchdog_enable() //to reset and start the timer
watchdog_disable()// to stop the timer
I couldn't find any example.
I'm also puzzled with the code above:
CLKPR=0x80;
CLKPR=0x00;
how come it is overwriting the same flag? it is new to me
Thanks
I'm looking for an example for using the Watchdog timer in Codevision but I cannot find any.
I used the Wizard to generate the code to include the Watchdog timer
Code:
// Crystal Oscillator division factor: 1
#pragma optsize-
CLKPR=0x80;
CLKPR=0x00;
#ifdef _OPTIMIZE_SIZE_
#pragma optsize+
#endif
but I was expecting some straightforward functions such as:
watchdog_enable() //to reset and start the timer
watchdog_disable()// to stop the timer
I couldn't find any example.
I'm also puzzled with the code above:
CLKPR=0x80;
CLKPR=0x00;
how come it is overwriting the same flag? it is new to me
Thanks