mrcube_ns
Advanced Member level 1

sfr of 89s51
Hi friends,
I have to use WD on AT89s52 (programming in c (kei|)).
On atmel site I found some example but seams that doesn't work (well/at all).
How to do it?
Some code examples are welcome.
Thanks in advance!!!
Mr.Cube
Atmel example:
...
WDTPRG |= 0x07;/*2.275s @ FOSCA=11.059200 MHz */
/* watchdog start sequence */
WDTRST = 0x1E;
WDTRST = 0xE1;
while(1) /* end less */
{
/***********************************************
* PROGRAM *
************************************************/
/* watchdog reset sequence */
WDTRST=0x1E;
WDTRST=0xE1;
}
...
Hi friends,
I have to use WD on AT89s52 (programming in c (kei|)).
On atmel site I found some example but seams that doesn't work (well/at all).
How to do it?
Some code examples are welcome.
Thanks in advance!!!
Mr.Cube
Atmel example:
...
WDTPRG |= 0x07;/*2.275s @ FOSCA=11.059200 MHz */
/* watchdog start sequence */
WDTRST = 0x1E;
WDTRST = 0xE1;
while(1) /* end less */
{
/***********************************************
* PROGRAM *
************************************************/
/* watchdog reset sequence */
WDTRST=0x1E;
WDTRST=0xE1;
}
...