How to disable Watchdog timer? (Target: Atmega164p)

Last post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

1. When I compile a C source code what is the default setting of the WDT? (Is it on/off by default?)

2. Can you suggest some C code to disable the WDT?

Thank You.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

WTD is off by default unless you program the WD fuse or you initialise it in code.

Quote:
Can you suggest some C code to disable the WDT?
It is VERY complicated to do
	wdt_disable();

with winAvr. :wink:

and by the way reading the libc doc will help you.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Where can I find libc doc?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In the winAvr folder under \doc\avr-libc.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly