Watchdog Timer

This forum is for all topics related to Simulator for Arduino v0.98. Please include sample code where possible.

Moderator: Adrian

Master Class
Posts: 10
Joined: Tue Apr 16, 2013 2:27 am

Watchdog Timer

Postby mikeworkman » Mon May 06, 2013 2:12 am

From what I can tell the simulator doesn't support the Watchdog timer, is that correct? :?:

I have #include<avr/wdt.h>, and then use watchdog_enable(WDT0_8S> and the simulator returns "Unknown command".....


Site Admin
Posts: 240
Joined: Thu Feb 02, 2012 6:07 pm

Re: Watchdog Timer

Postby Simulator_admin » Fri May 24, 2013 11:46 am

Hi Mike, we had a quick look at this.

To use the file <avr/wdt.h>, select Options > Avr/File.h include. Then click the reset button or F2 and watch what happens.

First there is an error __AVR_ARCH__ not defined (we can fix this), and the stdint library is not found. Click Skip all to skip past these errors. There are ten library files now included.

The wdt_enable() function is now available but runs over several lines so the Simulator has trouble with interpreting this. We will look into this shortly. Using library files can be very complicated and this is a work in progress.

EDIT: just added __AVR_ARCH__ = 100 and __AVR_ENHANCED__ = 0

Return to “Version 0.98”

Who is online

Users browsing this forum: No registered users and 1 guest