Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

AT89S52

Status
Not open for further replies.

giaracam

New Member
Hi to everyone! I just need some information on how I would be able to enable the watchodg timer for the AT89S52 atmel microcontroller...
Thanx in advance!! Your help will be much appreciated!! :)
 
giaracam said:
Hi to everyone! I just need some information on how I would be able to enable the watchodg timer for the AT89S52 atmel microcontroller...
Thanx in advance!! Your help will be much appreciated!! :)

I don't know anything about Atmel processors, but on a PIC you simply set a bit in the config fuses when you program it. Presumably this processor does something similar?, but it should be explained in the datasheet.
 
I am using a Dallas 8052, not sure if it is exactly match with Atmel's.
Below are some codes written in C:

CKCON|=0X80; // set watchdog time
TA=0xAA; // time access to watchdog timer
TA=0X55;
WDCON|=0x1; // restart watchdog timer

TA=0xAA;
TA=0x55;
WDCON|=0x2; // enable watchdog timer



the TA=0xAA, and TA=0x55 are to be written to gain access to watchdog. After certain period, the access to WDCON will be closed.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top