- •Pin Configuration
- •Features
- •Description
- •Pin Descriptions
- •Port B (PB5..PB0)
- •Analog Pins
- •Internal Oscillators
- •ATtiny15L Architectural Overview
- •The General-purpose Register File
- •The ALU – Arithmetic Logic Unit
- •The Flash Program Memory
- •The Program and Data Addressing Modes
- •Register Direct, Single-register Rd
- •Register Indirect
- •Register Direct, Two Registers Rd and Rr
- •I/O Direct
- •Relative Program Addressing, RJMP and RCALL
- •Constant Addressing Using the LPM Instruction
- •Subroutine and Interrupt Hardware Stack
- •The EEPROM Data Memory
- •Memory Access and Instruction Execution Timing
- •I/O Memory
- •The Status Register – SREG
- •Reset and Interrupt Handling
- •ATtiny15L Reset Sources
- •Power-on Reset
- •External Reset
- •Brown-out Detection
- •Watchdog Reset
- •MCU Status Register – MCUSR
- •Internal Voltage Reference
- •Voltage Reference Enable Signals and Start-up Time
- •Interrupt Handling
- •Interrupt Response Time
- •The General Interrupt Mask Register – GIMSK
- •The General Interrupt Flag Register – GIFR
- •The Timer/Counter Interrupt Mask Register – TIMSK
- •The Timer/Counter Interrupt Flag Register – TIFR
- •External Interrupt
- •Pin Change Interrupt
- •The MCU Control Register – MCUCR
- •Sleep Modes
- •Idle Mode
- •ADC Noise Reduction Mode
- •Power-down Mode
- •Tunable Internal RC Oscillator
- •The System Clock Oscillator Calibration Register – OSCCAL
- •Internal PLL for Fast Peripheral Clock Generation
- •Timer/Counters
- •The Timer/Counter0 Prescaler
- •The Timer/Counter1 Prescaler
- •The Special Function IO Register – SFIOR
- •The 8-bit Timer/Counter0
- •The Timer/Counter0 Control Register – TCCR0
- •The Timer Counter 0 – TCNT0
- •The 8-bit Timer/Counter1
- •The Timer/Counter1 Control Register – TCCR1
- •The Timer/Counter1 – TCNT1
- •Timer/Counter1 Output Compare RegisterA – OCR1A
- •Timer/Counter1 in PWM Mode
- •Timer/Counter1 Output Compare RegisterB – OCR1B
- •The Watchdog Timer
- •The Watchdog Timer Control Register – WDTCR
- •EEPROM Read/Write Access
- •The EEPROM Address Register – EEAR
- •The EEPROM Data Register – EEDR
- •The EEPROM Control Register – EECR
- •Preventing EEPROM Corruption
- •The Analog Comparator
- •The Analog Comparator Control and Status Register – ACSR
- •The Analog-to-digital Converter, Analog Multiplexer and Gain Stages
- •Feature List:
- •Operation
- •Prescaling and Conversion Timing
- •ADC Noise Canceler Function
- •The ADC Multiplexer Selection Register – ADMUX
- •The ADC Control and Status Register – ADCSR
- •The ADC Data Register – ADCL and ADCH
- •ADLAR = 0:
- •Scanning Multiple Channels
- •ADC Noise-canceling Techniques
- •ADC Characteristics
- •I/O Port B
- •Alternative Functions of Port B
- •The Port B Data Register – PORTB
- •The Port B Data Direction Register – DDRB
- •The Port B Input Pins Address – PINB
- •PORT B as General Digital I/O
- •Alternate Functions of Port B
- •Memory Programming
- •Program and Data Memory Lock Bits
- •Fuse Bits
- •Signature Bytes
- •Calibration Byte
- •Programming the Flash
- •High-voltage Serial Programming
- •High-voltage Serial Programming Algorithm
- •High-voltage Serial Programming Characteristics
- •Low-voltage Serial Downloading
- •Low-voltage Serial Programming Algorithm
- •Data Polling
- •Low-voltage Serial Programming Characteristics
- •Electrical Characteristics
- •Absolute Maximum Ratings
- •DC Characteristics – Preliminary Data
- •Typical Characteristics – PRELIMINARY DATA
- •ATtiny15L Register Summary
- •Ordering Information
I/O Memory
The I/O space definition of the ATtiny15L is shown in the following table:
Table 2. ATtiny15L I/O Space
Address Hex |
Name |
Function |
|
|
|
$3F |
SREG |
Status Register |
|
|
|
$3B |
GIMSK |
General Interrupt Mask Register |
|
|
|
$3A |
GIFR |
General Interrupt Flag Register |
|
|
|
$39 |
TIMSK |
Timer/Counter Interrupt Mask Register |
|
|
|
$38 |
TIFR |
Timer/Counter Interrupt Flag Register |
|
|
|
$35 |
MCUCR |
MCU Control Register |
|
|
|
$34 |
MCUSR |
MCU Status Register |
|
|
|
$33 |
TCCR0 |
Timer/Counter0 Control Register |
|
|
|
$32 |
TCNT0 |
Timer/Counter0 (8-bit) |
|
|
|
$31 |
OSCCAL |
Oscillator Calibration Register |
|
|
|
$30 |
TCCR1 |
Timer/Counter1 Control Register |
|
|
|
$2F |
TCNT1 |
Timer/Counter1 (8-bit) |
|
|
|
$2E |
OCR1A |
Timer/Counter1 Output Compare Register A |
|
|
|
$2D |
OCR1B |
Timer/Counter1 Output Compare Register B |
|
|
|
$2C |
SFIOR |
Special Function I/O Register |
|
|
|
$21 |
WDTCR |
Watchdog Timer Control Register |
|
|
|
$1E |
EEAR |
EEPROM Address Register |
|
|
|
$1D |
EEDR |
EEPROM Data Register |
|
|
|
$1C |
EECR |
EEPROM Control Register |
|
|
|
$18 |
PORTB |
Data Register, Port B |
|
|
|
$17 |
DDRB |
Data Direction Register, Port B |
|
|
|
$16 |
PINB |
Input Pins, Port B |
|
|
|
$08 |
ACSR |
Analog Comparator Control and Status Register |
|
|
|
$07 |
ADMUX |
ADC Multiplexer Select Register |
|
|
|
$06 |
ADCSR |
ADC Control and Status Register |
|
|
|
$05 |
ADCH |
ADC Data Register High |
|
|
|
$04 |
ADCL |
ADC Data Register Low |
|
|
|
Note: Reserved and unused locations are not shown in the table.
All ATtiny15L I/O and peripheral registers are placed in the I/O space. The I/O locations are accessed by the IN and OUT instructions transferring data between the 32 general-purpose working registers and the I/O space. I/O registers within the address range $00 - $1F are directly bit-accessible using the SBI and CBI instructions. In these registers, the value of single bits can be checked by using the SBIS and SBIC instructions. Refer to the instruction set chapter for more details. For compatibility with future devices, reserved bits should be written zero if accessed. Reserved I/O memory addresses should never be written.
The I/O and peripheral control registers are explained in the following sections.
10 |
ATtiny15L |
|
|
||
|
