English
Language : 

ATTINY43U_14 Datasheet, PDF (46/210 Pages) ATMEL Corporation – High Performance, Low Power AVR
8.10
Firmware Example
The boost converter is an independent hardware module that does not require firmware interac-
tion for proper operation. Nevertheless, some functions, such as periodically checking battery
voltage, are recommended to be carried out by firmware. This is illustrated in the block diagram
of Figure 8-9, where a framework of a typical application is shown.
Figure 8-9. Block Diagram of Typical Program.
ENTRY
RESET
STOP BOOST CONVERTER
NO
VBAT > VMIN ?
YES
APPLICATION SLOT
NO
BS SET?
YES
NO
CHECK
YES
BATTERY?
An example program framework is shown below. The program relies on BODLEVEL to be 1.8V
(see Table 20-5 on page 161).
.include "tn43Udef.inc"
rjmp RESET
; Reset Handler
.org 0x0080
RESET:
ldi
ldi
out
out
rjmp
r16, 0x5f
r17, 0x01
SPL, r16
SPH, r17
ADC_VBAT
; Set stack pointer
<continues>
46 ATtiny43U
8048C–AVR–02/12