Features
•
High Performance, Low Power AVR
®
8-bit Microcontroller
•
Advanced RISC Architecture
– 131 Powerful Instructions - Most Single Clock Cycle Execution
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
– Up to 8 MIPS Throughput at 8 MHz
High Endurance Non-volatile Memory Segments
– 16K/32K Bytes of In-System Self-Programmable Flash (ATmega16HVB/32HVB)
– 512/1K Bytes EEPROM
– 1K/2K Bytes Internal SRAM
– Write/Erase Cycles 10,000 Flash/100,000 EEPROM
– Data retention: 20 years at 85°C/100 years at 25°C
(1)
– Optional Boot Code Section with Independent Lock Bits
In-System Programming by On-chip Boot Program
True Read-While-Write Operation
– Programming Lock for Software Security
Battery Management Features
– Two, three or Four Cells in Series
– High-current Protection (Charge and Discharge)
– Over-current Protection (Charge and Discharge)
– Short-circuit Protection (Discharge)
– High Voltage Outputs to Drive N-Channel Charge/Discharge FETs
– Optional Deep Under Voltage Recovery mode - allowing 0-volt charging without
external Precharge FET
– Optional High Voltage Open Drain ouput - allowing 0-volt charging with external
Precharge FET
– Integrated Cell Balancing FETs
Peripheral Features
– Two configurable 8- or 16-bit Timers with Separate Prescaler, Optional Input Capture
(IC), Compare Mode and CTC
– SPI - Serial Peripheral Interface
– 12-bit Voltage ADC, Six External and One Internal ADC Input
– High Resolution Coulomb Counter ADC for Current Measurements
– TWI Serial Interface supporting SMBus implementation
– Programmable Watchdog Timer
Special Microcontroller Features
– debugWIRE On-chip Debug System
– In-System Programmable via SPI ports
– Power-on Reset
– On-chip Voltage Regulator with Short-circuit Monitoring Interface
– External and Internal Interrupt Sources
– Sleep Modes: Idle, ADC Noise Reduction, Power-save, and Power-off
Additional Secure Authentication Features available only under NDA
Packages
– 44-pin TSSOP
Operating Voltage: 4 - 25V
Maximum Withstand Voltage (High-voltage pins): 35V
Temperature Range: -40°C to 85°C
Speed Grade: 1-8 MHz
•
•
8-bit
Microcontroller
with 16K/32K
Bytes In-System
Programmable
Flash
ATmega16HVB
ATmega32HVB
Preliminary
Summary
•
•
•
•
•
•
•
•
Note:
1. See
”Data Retention” on page 8
for details.
8042B–AVR–06/10
ATmega16HVB/32HVB
1. Pin Configurations
1.1
TSSOP
Figure 1-1.
TSSOP - pinout ATmega16HVB/32HVB
NI
NNI
VREFGND
VREF
GND
VREG
PA0(ADC0/SGND/PCINT0)
PA1(ADC1/SGND/PCINT1)
PA2(PCINT2/T0)
PA3(PCINT3/T1)
VCLMP10
VFET
BATT
VCC
GND
OD
NC
OC
RESET/dw
PB0(PCINT4/ICP00)
PB1(PCINT5/CKOUT)
PB2(PCINT6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
PI
PPI
NV
PV1
PV2
PV3
PV4
PVT
VCC
GND
PC5
PC4(SCL)
PC3(INT3/SDA)
PC2(INT2)
PC1(INT1)
PC0(INT0/EXTPROT)
PB7(MISO/PCINT11)
NC
PB6(MOSI/PCINT10)
PB5(SCK/PCINT9)
PB4(SS/PCINT8)
PB3(PCINT7)
1.2
1.2.1
Pin Descriptions
VFET
High voltage supply pin. This pin is used as supply for the internal voltage regulator, described in
”Voltage Regulator” on page 130.
1.2.2
VCC
Digital supply voltage. Normally connected to VREG.
1.2.3
VREG
Output from the internal Voltage Regulator. Used for external decoupling to ensure stable regu-
lator operation. For details, see
”Voltage Regulator” on page 130.
2
8042B–AVR–06/10
ATmega16HVB/32HVB
1.2.4
VREF
Internal Voltage Reference for external decoupling. For details, see
”Voltage Reference and
Temperature Sensor” on page 122.
1.2.5
VREFGND
Ground for decoupling of Internal Voltage Reference. For details, see
”Voltage Reference and
Temperature Sensor” on page 122.
Do not connect to GND or SGND on PCB.
1.2.6
GND
Ground
1.2.7
Port A (PA3..PA0)
Port A serves as a low-voltage 4-bit bi-directional I/O port with internal pull-up resistors (selected
for each bit). As inputs, Port A pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port A pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
Port A also serves the functions of various special features of the ATmega16HVB/32HVB as
listed in
”Alternate Functions of Port A” on page 74.
1.2.8
Port B (PB7..PB0)
Port B is a low-voltage 8-bit bi-directional I/O port with internal pull-up resistors (selected for
each bit). As inputs, Port B pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port B pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
Port B also serves the functions of various special features of the ATmega16HVB/32HVB as
listed in
”Alternate Functions of Port B” on page 75.
1.2.9
Port C (PC5)
Port C (PC5) is a high voltage Open Drain output port. Port C serves the functions of various
special features of the ATmega16HVB/32HVB as listed in
”Alternate Functions of Port C” on
page 65.
1.2.10
Port C (PC4..PC0)
Port C is a 5-bit high voltage Open Drain bi-directional I/O port. Port C serves the functions of
various special features of the ATmega16HVB/32HVB as listed in
”Alternate Functions of Port
C” on page 65.
1.2.11
OC/OD
High voltage output to drive Charge/Discharge. For details, see
”FET Driver” on page 145.
1.2.12
PI/NI
Filtered positive/negative input from external current sense resistor, used to by the Coulomb
Counter ADC to measure charge/discharge currents flowing in the battery pack. For details, see
”Coulomb Counter - Dedicated Fuel Gauging Sigma-delta ADC” on page 108.
3
8042B–AVR–06/10
ATmega16HVB/32HVB
1.2.13
PPI/NNI
Unfiltered positive/negative input from external current sense resistor, used by the battery pro-
tection circuit, for over-current and short-circuit detection. For details, see
”Battery Protection” on
page 133.
1.2.14
NV/PV1/PV2/PV3/PV4
NV, PV1, PV2, PV3, and PV4 are the inputs for battery cells 1, 2, 3 and 4, used by the Voltage
ADC to measure each cell voltage. For details, see
”Voltage ADC – 7-channel General Purpose
12-bit Sigma-Delta ADC” on page 116.
1.2.15
PVT
Defines the source voltage level for the Charge FET driver. For details, see
”FET Driver” on
page 145.
1.2.16
BATT
Input for detecting when a charger is connected. Defines the source voltage level for the Dis-
charge FET driver. For details, see
”FET Driver” on page 145.
1.2.17
RESET/dw
Reset input. A low level on this pin for longer than the minimum pulse length will generate a
reset, even if the clock is not running. The minimum pulse length is given in Table 11 on page
38. Shorter pulses are not guaranteed to generate a reset. This pin is also used as debugWIRE
communication pin.
4
8042B–AVR–06/10
ATmega16HVB/32HVB
2. Overview
The ATmega16HVB/32HVB is a monitoring and protection circuit for 3 and 4-cell Li-ion applica-
tions with focus on highest safety including safe authentication, low cost and high utilization of
the cell energy. The device contains secure authentication features as well as autonomous bat-
tery protection during charging and discharging. The External Protection Input can be used to
implement other battery protection mechanisms using external components, e.g. protection
against chargers with too high charge voltage can be easily implemented with a few low cost
passive components. The feature set makes the ATmega16HVB/32HVB a key component in
any system focusing on high security, battery protection, high system utilization and low cost.
Figure 2-1.
Block Diagram
PB7..0
PC5..0
PB0
Oscillator
Circuits /
Clock
Generation
Oscillator
Sampling
Interface
SPI
VCC
Watchdog
Timer
Flash
SRAM
8/16-bit T/C1
Voltage
ADC
TWI
8/16-bit T/C0
FET
Control
OC
OD
PORTB (8)
PORTC (6)
Watchdog
Oscillator
Current
Protection
Cell
Balancing
PPI
NNI
PV4
PV3
PV2
PV1
NV
RESET/dW
Power
Supervision
POR &
RESET
Program
Logic
debugWIRE
VPTAT
CPU
EEPROM
Voltage
Reference
VREF
VREFGND
PI
NI
GND
BATT
Charger
Detect
Security
Module
DATA BUS
Coulomb
Counter ADC
VFET
VREG
Voltage
Regulator
Voltage Regulator
Monitor Interface
PORTA (4)
PA1..0
PA3..0
ATmega16HVB/32HVB provides the necessary redundancy on-chip to make sure that the bat-
tery is protected in critical failure modes. The chip is specifically designed to provide safety for
the battery cells in case of pin shorting, loss of power (either caused by battery pack short or
VCC short), illegal charger connection or software runaway. This makes ATmega16HVB/32HVB
the ideal 1-chip solution for applications with focus on high safety.
The ATmega16HVB/32HVB features an integrated voltage regulator that operates at a wide
range of input voltages, 4 - 25 volts. This voltage is regulated to a constant supply voltage of
nominally 3.3 volts for the integrated logic and analog functions. The regulator capabilities, com-
5
8042B–AVR–06/10