using timer 2 in at89s52
ashad
Thanks for answer, what is problem:
1. Yes in datasheet they say that you start WD timer by entering E1h and 1Eh in WDTRST sfr. After that you have to reset WD timer in code with same values and same procedure.
2. See pic "WD on atmel mcu". They clearly say that this example is for AT89S52 among others.
Problem: S52 do not have WDTPRG sfr.
So line WDTPRG|=0x07; do nothing, becouse s52 do not have sfr on address A7h.
Cause: If you want to use WD on s52, you need to reset WD not longer then 15ms or your mcu will reset.
'Till now I always use AT89S8252 (when I need WD), and with this mcu WD story is totally different.
I usually use/need WD times with times of around 1 - 2 sec, which I cannot have with s52, OR I'M MAYBE WRONG?????
Any suggestions???
Best regards,
Mr.Cube