ATMEGA8HVD-4MX Atmel, ATMEGA8HVD-4MX Datasheet - Page 47

no-image

ATMEGA8HVD-4MX

Manufacturer Part Number
ATMEGA8HVD-4MX
Description
MCU AVR 8K FLASH 2.1-8V 4MHZ QFN
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheet

Specifications of ATMEGA8HVD-4MX

Core Processor
AVR
Core Size
8-Bit
Speed
4MHz
Peripherals
POR, WDT
Number Of I /o
5
Program Memory Size
8KB (4K x 16)
Program Memory Type
FLASH
Eeprom Size
256 x 8
Ram Size
512 x 8
Voltage - Supply (vcc/vdd)
2 V ~ 2.4 V
Data Converters
A/D 1x10b
Oscillator Type
Internal
Operating Temperature
-20°C ~ 85°C
Package / Case
18-MLF® Exposed Pad (Staggered Leads), DFN
For Use With
ATSTK600 - DEV KIT FOR AVR/AVR32ATSTK500 - PROGRAMMER AVR STARTER KIT
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Connectivity
-
8052B–AVR–09/08
Note: If the Watchdog is accidentally enabled, for example by a runaway pointer or Black-out
condition, the device will be reset and the Watchdog Timer will stay enabled. If the code is not
set up to handle the Watchdog, this might lead to an eternal loop of timeout resets. To avoid
this situation, the application software should always clear the Watchdog System Reset Flag
(WDRF) and the WDE control bit in the initialisation routine, even if the Watchdog is not in use.
The following code example shows one assembly and one C function for changing the timeout
value of the Watchdog Timer.
Note:
Note: The Watchdog Timer should be reset before any change of the WDP bits, since a
change in the WDP bits can result in a timeout when switching to a shorter timeout period.
Assembly Code Example
C Code Example
WDT_Prescaler_Change:
void WDT_Prescaler_Change(void)
{
}
; Turn off global interrupt
cli
; Reset Watchdog Timer
wdr
; Start timed sequence
in
ori
out
; --
; Set new prescaler(timeout) value = 64K cycles (~0.5 s)
ldi
out
; --
; Turn on global interrupt
sei
ret
__disable_interrupt();
__watchdog_reset();
/* Start timed
WDTCSR |= (1<<WDCE) | (1<<WDE);
/* Set new prescaler(timeout) value = 64K cycles (~0.5 s) */
WDTCSR
__enable_interrupt();
1. See
r16, WDTCSR
r16, (1<<WDCE) | (1<<WDE)
WDTCSR, r16
Got four cycles to set the new values from here -
r16, (1<<WDE) | (1<<WDP2) | (1<<WDP0)
WDTCSR, r16
Finished setting new values, used 2 cycles -
”About Code Examples” on page
= (1<<WDE) | (1<<WDP2) | (1<<WDP0);
(1)
(1)
equence */
5.
ATmega4HVD/8HVD
47

Related parts for ATMEGA8HVD-4MX