O Ports; Introduction - Atmel ATtiny25 Manual

Microcontroller with 2/4/8k bytes in-system programmable flash
Table of Contents

Advertisement

10. I/O Ports
10.1

Introduction

ATtiny25/45/85
46
If the program never enables an interrupt source, the Interrupt Vectors are not used, and regular
program code can be placed at these locations. The most typical and general program setup for
the Reset and Interrupt Vector Addresses in ATtiny25/45/85 is:
Address Labels Code
0x0000
rjmp
0x0001
rjmp
0x0002
rjmp
0x0003
rjmp
0x0004
rjmp
0x0005
rjmp
0x0006
rjmp
0x0007
rjmp
0x0008
rjmp
0x0009
rjmp
0x000A
rjmp
0x000B
rjmp
0x000C
rjmp
0x000D
rjmp
0x000E
rjmp
0x000F
RESET: ldi
0x0010
ldi
0x0011
out
0x0012
out
0x0013
sei
0x0014
<instr>
...
...
All AVR ports have true Read-Modify-Write functionality when used as general digital I/O ports.
This means that the direction of one port pin can be changed without unintentionally changing
the direction of any other pin with the SBI and CBI instructions. The same applies when chang-
ing drive value (if configured as output) or enabling/disabling of pull-up resistors (if configured as
input). Each output buffer has symmetrical drive characteristics with both high sink and source
capability. The pin driver is strong enough to drive LED displays directly. All port pins have indi-
vidually selectable pull-up resistors with a supply-voltage invariant resistance. All I/O pins have
protection diodes to both V
acteristics" on page 150
RESET
EXT_INT0
PCINT0
TIM1_COMPA
TIM1_OVF
TIM0_OVF
EE_RDY
ANA_COMP
ADC
TIM1_COMPB
TIM0_COMPA
TIM0_COMPB
WDT
USI_START
USI_OVF
r16, low(RAMEND); Main program start
r17, high(RAMEND); Tiny85 has also SPH
SPL, r16
SPH, r17
xxx
...
...
and Ground as indicated in
CC
for a complete list of parameters.
Comments
; Reset Handler
; IRQ0 Handler
; PCINT0 Handler
; Timer1 CompareA Handler
; Timer1 Overflow Handler
; Timer0 Overflow Handler
; EEPROM Ready Handler
; Analog Comparator Handler
; ADC Conversion Handler
; Timer1 CompareB Handler
;
;
;
;
;
; Set Stack Pointer to top of RAM
; Tiny85 has also SPH
; Enable interrupts
Figure
10-1. Refer to
"Electrical Char-
7598H–AVR–07/09

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Attiny45Attiny85

Table of Contents