AI Interactive Datasheet ATtiny15
AVR · tinyAVR

ATtiny15 registers

All 28 registers by peripheral, at their data-space address (the I/O address IN and OUT use is shown beside it), with their reset value and every bit.

ADC Analog-to-Digital Converter

ADCADC Data Register Bytes

Address
0x04
Reset
0x0000
Access
read/write
Size
16-bit

ADCSRThe ADC Control and Status register

Address
0x06
Reset
0x00
Access
read/write
  1. 7ADEN
  2. 6ADSC
  3. 5ADFR
  4. 4ADIF
  5. 3ADIE
  6. 2ADPS2
  7. 1ADPS1
  8. 0ADPS0
6 fields
FieldBitsWhat it does
ADEN7ADC Enable
ADSC6ADC Start Conversion
ADFR5ADC Free Running Select
ADIF4ADC Interrupt Flag
ADIE3ADC Interrupt Enable
ADPS2:0ADC Prescaler Select Bits
  • 0 2
  • 1 2
  • 2 4
  • 3 8
  • 4 16
  • 5 32
  • 6 64
  • 7 128

ADMUXThe ADC multiplexer Selection Register

Address
0x07
Reset
0x00
Access
read/write
  1. 7REFS1
  2. 6REFS0
  3. 5ADLAR
  4. 4–
  5. 3–
  6. 2MUX2
  7. 1MUX1
  8. 0MUX0
3 fields
FieldBitsWhat it does
REFS7:6Reference Selection Bits
  • 0 AVCC
  • 1 AREF
  • 2 Internal Voltage Reference
  • 3 Internal Voltage Reference With External Capacitor at AREF Pin.
ADLAR5Left Adjust Result
MUX2:0Analog Channel and Gain Selection Bits

AC Analog Comparator

ACSRAnalog Comparator Control And Status Register

Address
0x08
Reset
0x00
Access
read/write
  1. 7ACD
  2. 6ACBG
  3. 5ACO
  4. 4ACI
  5. 3ACIE
  6. 2–
  7. 1ACIS1
  8. 0ACIS0
6 fields
FieldBitsWhat it does
ACD7Analog Comparator Disable
ACBG6Analog Comparator Bandgap Select
ACO5Analog Compare Output
ACI4Analog Comparator Interrupt Flag
ACIE3Analog Comparator Interrupt Enable
ACIS1:0Analog Comparator Interrupt Mode Select bits
  • 0 Interrupt on Toggle
  • 1 Reserved
  • 2 Interrupt on Falling Edge
  • 3 Interrupt on Rising Edge

PORTB I/O Port

PINBInput Pins, Port B

Address
0x16
Reset
0x00
Access
read/write
  1. 7–
  2. 6–
  3. 5PINB5
  4. 4PINB4
  5. 3PINB3
  6. 2PINB2
  7. 1PINB1
  8. 0PINB0

DDRBData Direction Register, Port B

Address
0x17
Reset
0x00
Access
read/write
  1. 7–
  2. 6–
  3. 5DDB5
  4. 4DDB4
  5. 3DDB3
  6. 2DDB2
  7. 1DDB1
  8. 0DDB0

PORTBData Register, Port B

Address
0x18
Reset
0x00
Access
read/write
  1. 7–
  2. 6–
  3. 5–
  4. 4PORTB4
  5. 3PORTB3
  6. 2PORTB2
  7. 1PORTB1
  8. 0PORTB0

EEPROM EEPROM

EECREEPROM Control Register

Address
0x1C
Reset
0x00
Access
read/write
  1. 7–
  2. 6–
  3. 5–
  4. 4–
  5. 3EERIE
  6. 2EEMWE
  7. 1EEWE
  8. 0EERE
4 fields
FieldBitsWhat it does
EERIE3EEProm Ready Interrupt Enable
EEMWE2EEPROM Master Write Enable
EEWE1EEPROM Write Enable
EERE0EEPROM Read Enable

EEDREEPROM Data Register

Address
0x1D
Reset
0x00
Access
read/write
  1. 7–
  2. 6–
  3. 5–
  4. 4–
  5. 3–
  6. 2–
  7. 1–
  8. 0–

EEAREEPROM Read/Write Access

Address
0x1E
Reset
0x00
Access
read/write
  1. 7–
  2. 6–
  3. 5–
  4. 4–
  5. 3–
  6. 2–
  7. 1–
  8. 0–

WDT Watchdog Timer

WDTCRWatchdog Timer Control Register

Address
0x21 I/O 0x01
Reset
0x00
Access
read/write
  1. 7–
  2. 6–
  3. 5–
  4. 4WDTOE
  5. 3WDE
  6. 2WDP2
  7. 1WDP1
  8. 0WDP0
3 fields
FieldBitsWhat it does
WDTOE4RW
WDE3Watch Dog Enable
WDP2:0Watch Dog Timer Prescaler bits
  • 0 Oscillator Cycles 16K
  • 1 Oscillator Cycles 32K
  • 2 Oscillator Cycles 64K
  • 3 Oscillator Cycles 128K
  • 4 Oscillator Cycles 256K
  • 5 Oscillator Cycles 512K
  • 6 Oscillator Cycles 1024K
  • 7 Oscillator Cycles 2048K

TC1 Timer/Counter, 8-bit

SFIORSpecial Function IO Register

Address
0x2C I/O 0x0C
Reset
0x00
Access
read/write
  1. 7–
  2. 6–
  3. 5–
  4. 4–
  5. 3–
  6. 2FOC1A
  7. 1PSR1
  8. 0PSR0
3 fields
FieldBitsWhat it does
FOC1A2Force Output Compare 1A
PSR11Prescaler Reset Timer/Counter1
PSR00Prescaler Reset Timer/Counter0

OCR1BOutput Compare Register

Address
0x2D I/O 0x0D
Reset
0x00
Access
read/write
  1. 7–
  2. 6–
  3. 5–
  4. 4–
  5. 3–
  6. 2–
  7. 1–
  8. 0–

OCR1AOutput Compare Register

Address
0x2E I/O 0x0E
Reset
0x00
Access
read/write
  1. 7–
  2. 6–
  3. 5–
  4. 4–
  5. 3–
  6. 2–
  7. 1–
  8. 0–

TCNT1Timer/Counter Register

Address
0x2F I/O 0x0F
Reset
0x00
Access
read/write
  1. 7–
  2. 6–
  3. 5–
  4. 4–
  5. 3–
  6. 2–
  7. 1–
  8. 0–

TCCR1Timer/Counter Control Register

Address
0x30 I/O 0x10
Reset
0x00
Access
read/write
  1. 7CTC1
  2. 6PWM1
  3. 5COM1A1
  4. 4COM1A0
  5. 3CS13
  6. 2CS12
  7. 1CS11
  8. 0CS10
4 fields
FieldBitsWhat it does
CTC17Clear Timer/Counter on Compare Match
PWM16Pulse Width Modulator Enable
COM1A5:4Compare Output Mode, Bits
  • 0 Disconnected from OCn/PWMn
  • 1 Toggle OCn/PWMn output line
  • 2 Clear OCn/PWMn output line
  • 3 set OCn/PWMn output line
CS13:0Clock Select Bits
  • 0 No Clock Source (Stopped)
  • 1 Running, CLK*16
  • 2 Running, CLK*8
  • 3 Running, CLK*4
  • 4 Running, CLK*2
  • 5 Running, No Prescaling
  • 6 Running, CLK/2
  • 7 Running, CLK/4
  • 8 Running, CLK/8
  • 9 Running, CLK/16
  • 10 Running, CLK/32
  • 11 Running, CLK/64
  • 12 Running, CLK/128
  • 13 Running, CLK/256
  • 14 Running, CLK/512
  • 15 Running, CLK/1024

TIFRTimer/Counter Interrupt Flag Register

Address
0x38 I/O 0x18
Reset
0x00
Access
read/write
  1. 7–
  2. 6OCF1A
  3. 5–
  4. 4–
  5. 3–
  6. 2TOV1
  7. 1–
  8. 0–
2 fields
FieldBitsWhat it does
OCF1A6Timer/Counter1 Output Compare Flag 1A
TOV12Timer/Counter1 Overflow Flag

TIMSKTimer/Counter Interrupt Mask Register

Address
0x39 I/O 0x19
Reset
0x00
Access
read/write
  1. 7–
  2. 6OCIE1A
  3. 5–
  4. 4–
  5. 3–
  6. 2TOIE1
  7. 1–
  8. 0–
2 fields
FieldBitsWhat it does
OCIE1A6OCIE1A: Timer/Counter1 Output Compare Interrupt Enable
TOIE12Timer/Counter1 Overflow Interrupt Enable

CPU CPU Registers

OSCCALStatus Register

Address
0x31 I/O 0x11
Reset
0x00
Access
read/write
  1. 7OSCCAL7
  2. 6OSCCAL6
  3. 5OSCCAL5
  4. 4OSCCAL4
  5. 3OSCCAL3
  6. 2OSCCAL2
  7. 1OSCCAL1
  8. 0OSCCAL0
1 field
FieldBitsWhat it does
OSCCAL7:0Oscillator Calibration

MCUSRMCU Status register

Address
0x34 I/O 0x14
Reset
0x00
Access
read/write
  1. 7–
  2. 6–
  3. 5–
  4. 4–
  5. 3WDRF
  6. 2BORF
  7. 1EXTRF
  8. 0PORF
4 fields
FieldBitsWhat it does
WDRF3Watchdog Reset Flag
BORF2Brown-out Reset Flag
EXTRF1External Reset Flag
PORF0Power-On Reset Flag

MCUCRMCU Control Register

Address
0x35 I/O 0x15
Reset
0x00
Access
read/write
  1. 7–
  2. 6PUD
  3. 5SE
  4. 4SM1
  5. 3SM0
  6. 2–
  7. 1ISC01
  8. 0ISC00
4 fields
FieldBitsWhat it does
PUD6Pull-up Disable
SE5Sleep Enable
SM4:3Sleep Mode Select Bits
  • 0 Idle
  • 1 ADC Noise Reduction (If Available)
  • 2 Power Down
  • 3 Reserved
ISC01:0Interrupt Sense Control 0 bits
  • 0 Low Level of INTX
  • 1 Any Logical Change in INTX
  • 2 Falling Edge of INTX
  • 3 Rising Edge of INTX

SREGStatus Register

Address
0x3F I/O 0x1F
Reset
0x00
Access
read/write
  1. 7I
  2. 6T
  3. 5H
  4. 4S
  5. 3V
  6. 2N
  7. 1Z
  8. 0C
8 fields
FieldBitsWhat it does
I7Global Interrupt Enable
T6Bit Copy Storage
H5Half Carry Flag
S4Sign Bit
V3Two's Complement Overflow Flag
N2Negative Flag
Z1Zero Flag
C0Carry Flag

TC0 Timer/Counter, 8-bit

TCNT0Timer Counter 0

Address
0x32 I/O 0x12
Reset
0x00
Access
read/write
  1. 7–
  2. 6–
  3. 5–
  4. 4–
  5. 3–
  6. 2–
  7. 1–
  8. 0–

TCCR0Timer/Counter0 Control Register

Address
0x33 I/O 0x13
Reset
0x00
Access
read/write
  1. 7–
  2. 6–
  3. 5–
  4. 4–
  5. 3–
  6. 2CS02
  7. 1CS01
  8. 0CS00
3 fields
FieldBitsWhat it does
CS022Clock Select0 bit 2
  • 0 No Clock Source (Stopped)
  • 1 Running, No Prescaling
  • 2 Running, CLK/8
  • 3 Running, CLK/64
  • 4 Running, CLK/256
  • 5 Running, CLK/1024
  • 6 Running, ExtClk Tn Falling Edge
  • 7 Running, ExtClk Tn Rising Edge
CS011Clock Select0 bit 1
CS000Clock Select0 bit 0

TIFRTimer/Counter Interrupt Flag register

Address
0x38 I/O 0x18
Reset
0x00
Access
read/write
  1. 7–
  2. 6–
  3. 5–
  4. 4–
  5. 3–
  6. 2–
  7. 1TOV0
  8. 0–
1 field
FieldBitsWhat it does
TOV01Timer/Counter0 Overflow Flag

TIMSKTimer/Counter Interrupt Mask Register

Address
0x39 I/O 0x19
Reset
0x00
Access
read/write
  1. 7–
  2. 6–
  3. 5–
  4. 4–
  5. 3–
  6. 2–
  7. 1TOIE0
  8. 0–
1 field
FieldBitsWhat it does
TOIE01Timer/Counter0 Overflow Interrupt Enable

EXINT External Interrupts

GIFRGeneral Interrupt Flag register

Address
0x3A I/O 0x1A
Reset
0x00
Access
read/write
  1. 7–
  2. 6INTF0
  3. 5PCIF
  4. 4–
  5. 3–
  6. 2–
  7. 1–
  8. 0–
2 fields
FieldBitsWhat it does
INTF06External Interrupt Flag 0
PCIF5Pin Change Interrupt Flag

GIMSKGeneral Interrupt Mask Register

Address
0x3B I/O 0x1B
Reset
0x00
Access
read/write
  1. 7–
  2. 6INT0
  3. 5PCIE
  4. 4–
  5. 3–
  6. 2–
  7. 1–
  8. 0–
2 fields
FieldBitsWhat it does
INT06External Interrupt Request 0 Enable
PCIE5Pin Change Interrupt Enable