Jump to content

Recommended Posts

Is there a way to see if the processor rebooted because of hardware reset or by the watchdog?


can i combine time for watchdog en serial interrupt driven tx?

xtal =20mhz, serial rate = 38400





Link to post
Share on other sites

You can tell that the processor has been watchdog reset by checking bit 4 (TO bit) in the STATUS register. If the processor has been watchdog reset this bit is 0.


I guess you are talking about using timer TMR0, for you interrupt driven serial comms. One bit being transmitted every interrupt.


The limitation with TMR0 and watchdog, is that they have only one prescaler between them. It can be switched to be used either by TMR0 or watchdog, but not both at the same time.

The watchdog will still work if TMR0 is using the prescaler, but has a much shorter timeout period.


Hope this helps




Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...