How to use the 89S51 watchdog function: The 89S51 and 89C51 in ATMEL\'s 89S51 series have the same functions and are instruction compatible. The HEX program can be used directly without any conversion. The 89S51 only adds a watchdog function compared to the 89C51. Write 01EH and then 0E1H to the watchdog register (WDTRST address is 0A6H) to activate the watchdog. The assembly program is as follows: Mov 0A6H, #01EH; send 1EMov 0A6H, #0E1H; send E1C51 program is as follows: Add a line sfr WDTRST = 0xA6 in the AT89X51.h declaration file to declare the watchdog register. Main(){WDTRST=0x1E; //Send 1E firstWDTRST=0xE1; //Send E1 later. The instruction to feed the dog is the same as activation: WDTRST=0x1E;WDTRST=0xE1;
You Might Like
Recommended ContentMore
Open source project More
Popular Components
Searched by Users
Just Take a LookMore
Trending Downloads
Trending ArticlesMore