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
- 7ADEN
- 6ADSC
- 5ADFR
- 4ADIF
- 3ADIE
- 2ADPS2
- 1ADPS1
- 0ADPS0
6 fields
| Field | Bits | What it does |
|---|
| ADEN | 7 | ADC Enable |
| ADSC | 6 | ADC Start Conversion |
| ADFR | 5 | ADC Free Running Select |
| ADIF | 4 | ADC Interrupt Flag |
| ADIE | 3 | ADC Interrupt Enable |
| ADPS | 2:0 | ADC Prescaler Select Bits0 21 22 43 84 165 326 647 128
|
ADMUXThe ADC multiplexer Selection Register
- Address
0x07
- Reset
0x00
- Access
- read/write
- 7REFS1
- 6REFS0
- 5ADLAR
- 4–
- 3–
- 2MUX2
- 1MUX1
- 0MUX0
3 fields
| Field | Bits | What it does |
|---|
| REFS | 7:6 | Reference Selection Bits0 AVCC1 AREF2 Internal Voltage Reference3 Internal Voltage Reference With External Capacitor at AREF Pin.
|
| ADLAR | 5 | Left Adjust Result |
| MUX | 2:0 | Analog Channel and Gain Selection Bits |
AC Analog Comparator
ACSRAnalog Comparator Control And Status Register
- Address
0x08
- Reset
0x00
- Access
- read/write
- 7ACD
- 6ACBG
- 5ACO
- 4ACI
- 3ACIE
- 2–
- 1ACIS1
- 0ACIS0
6 fields
| Field | Bits | What it does |
|---|
| ACD | 7 | Analog Comparator Disable |
| ACBG | 6 | Analog Comparator Bandgap Select |
| ACO | 5 | Analog Compare Output |
| ACI | 4 | Analog Comparator Interrupt Flag |
| ACIE | 3 | Analog Comparator Interrupt Enable |
| ACIS | 1:0 | Analog Comparator Interrupt Mode Select bits0 Interrupt on Toggle1 Reserved2 Interrupt on Falling Edge3 Interrupt on Rising Edge
|
PORTB I/O Port
PINBInput Pins, Port B
- Address
0x16
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5PINB5
- 4PINB4
- 3PINB3
- 2PINB2
- 1PINB1
- 0PINB0
DDRBData Direction Register, Port B
- Address
0x17
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5DDB5
- 4DDB4
- 3DDB3
- 2DDB2
- 1DDB1
- 0DDB0
PORTBData Register, Port B
- Address
0x18
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4PORTB4
- 3PORTB3
- 2PORTB2
- 1PORTB1
- 0PORTB0
EEPROM EEPROM
EECREEPROM Control Register
- Address
0x1C
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3EERIE
- 2EEMWE
- 1EEWE
- 0EERE
4 fields
| Field | Bits | What it does |
|---|
| EERIE | 3 | EEProm Ready Interrupt Enable |
| EEMWE | 2 | EEPROM Master Write Enable |
| EEWE | 1 | EEPROM Write Enable |
| EERE | 0 | EEPROM Read Enable |
EEDREEPROM Data Register
- Address
0x1D
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2–
- 1–
- 0–
EEAREEPROM Read/Write Access
- Address
0x1E
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2–
- 1–
- 0–
WDT Watchdog Timer
WDTCRWatchdog Timer Control Register
- Address
0x21 I/O 0x01
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4WDTOE
- 3WDE
- 2WDP2
- 1WDP1
- 0WDP0
3 fields
| Field | Bits | What it does |
|---|
| WDTOE | 4 | RW |
| WDE | 3 | Watch Dog Enable |
| WDP | 2:0 | Watch Dog Timer Prescaler bits0 Oscillator Cycles 16K1 Oscillator Cycles 32K2 Oscillator Cycles 64K3 Oscillator Cycles 128K4 Oscillator Cycles 256K5 Oscillator Cycles 512K6 Oscillator Cycles 1024K7 Oscillator Cycles 2048K
|
TC1 Timer/Counter, 8-bit
SFIORSpecial Function IO Register
- Address
0x2C I/O 0x0C
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2FOC1A
- 1PSR1
- 0PSR0
3 fields
| Field | Bits | What it does |
|---|
| FOC1A | 2 | Force Output Compare 1A |
| PSR1 | 1 | Prescaler Reset Timer/Counter1 |
| PSR0 | 0 | Prescaler Reset Timer/Counter0 |
OCR1BOutput Compare Register
- Address
0x2D I/O 0x0D
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2–
- 1–
- 0–
OCR1AOutput Compare Register
- Address
0x2E I/O 0x0E
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2–
- 1–
- 0–
TCNT1Timer/Counter Register
- Address
0x2F I/O 0x0F
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2–
- 1–
- 0–
TCCR1Timer/Counter Control Register
- Address
0x30 I/O 0x10
- Reset
0x00
- Access
- read/write
- 7CTC1
- 6PWM1
- 5COM1A1
- 4COM1A0
- 3CS13
- 2CS12
- 1CS11
- 0CS10
4 fields
| Field | Bits | What it does |
|---|
| CTC1 | 7 | Clear Timer/Counter on Compare Match |
| PWM1 | 6 | Pulse Width Modulator Enable |
| COM1A | 5:4 | Compare Output Mode, Bits0 Disconnected from OCn/PWMn1 Toggle OCn/PWMn output line2 Clear OCn/PWMn output line3 set OCn/PWMn output line
|
| CS1 | 3:0 | Clock Select Bits0 No Clock Source (Stopped)1 Running, CLK*162 Running, CLK*83 Running, CLK*44 Running, CLK*25 Running, No Prescaling6 Running, CLK/27 Running, CLK/48 Running, CLK/89 Running, CLK/1610 Running, CLK/3211 Running, CLK/6412 Running, CLK/12813 Running, CLK/25614 Running, CLK/51215 Running, CLK/1024
|
TIFRTimer/Counter Interrupt Flag Register
- Address
0x38 I/O 0x18
- Reset
0x00
- Access
- read/write
- 7–
- 6OCF1A
- 5–
- 4–
- 3–
- 2TOV1
- 1–
- 0–
2 fields
| Field | Bits | What it does |
|---|
| OCF1A | 6 | Timer/Counter1 Output Compare Flag 1A |
| TOV1 | 2 | Timer/Counter1 Overflow Flag |
TIMSKTimer/Counter Interrupt Mask Register
- Address
0x39 I/O 0x19
- Reset
0x00
- Access
- read/write
- 7–
- 6OCIE1A
- 5–
- 4–
- 3–
- 2TOIE1
- 1–
- 0–
2 fields
| Field | Bits | What it does |
|---|
| OCIE1A | 6 | OCIE1A: Timer/Counter1 Output Compare Interrupt Enable |
| TOIE1 | 2 | Timer/Counter1 Overflow Interrupt Enable |
CPU CPU Registers
OSCCALStatus Register
- Address
0x31 I/O 0x11
- Reset
0x00
- Access
- read/write
- 7OSCCAL7
- 6OSCCAL6
- 5OSCCAL5
- 4OSCCAL4
- 3OSCCAL3
- 2OSCCAL2
- 1OSCCAL1
- 0OSCCAL0
1 field
| Field | Bits | What it does |
|---|
| OSCCAL | 7:0 | Oscillator Calibration |
MCUSRMCU Status register
- Address
0x34 I/O 0x14
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3WDRF
- 2BORF
- 1EXTRF
- 0PORF
4 fields
| Field | Bits | What it does |
|---|
| WDRF | 3 | Watchdog Reset Flag |
| BORF | 2 | Brown-out Reset Flag |
| EXTRF | 1 | External Reset Flag |
| PORF | 0 | Power-On Reset Flag |
MCUCRMCU Control Register
- Address
0x35 I/O 0x15
- Reset
0x00
- Access
- read/write
- 7–
- 6PUD
- 5SE
- 4SM1
- 3SM0
- 2–
- 1ISC01
- 0ISC00
4 fields
| Field | Bits | What it does |
|---|
| PUD | 6 | Pull-up Disable |
| SE | 5 | Sleep Enable |
| SM | 4:3 | Sleep Mode Select Bits0 Idle1 ADC Noise Reduction (If Available)2 Power Down3 Reserved
|
| ISC0 | 1:0 | Interrupt Sense Control 0 bits0 Low Level of INTX1 Any Logical Change in INTX2 Falling Edge of INTX3 Rising Edge of INTX
|
SREGStatus Register
- Address
0x3F I/O 0x1F
- Reset
0x00
- Access
- read/write
- 7I
- 6T
- 5H
- 4S
- 3V
- 2N
- 1Z
- 0C
8 fields
| Field | Bits | What it does |
|---|
| I | 7 | Global Interrupt Enable |
| T | 6 | Bit Copy Storage |
| H | 5 | Half Carry Flag |
| S | 4 | Sign Bit |
| V | 3 | Two's Complement Overflow Flag |
| N | 2 | Negative Flag |
| Z | 1 | Zero Flag |
| C | 0 | Carry Flag |
TC0 Timer/Counter, 8-bit
TCNT0Timer Counter 0
- Address
0x32 I/O 0x12
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2–
- 1–
- 0–
TCCR0Timer/Counter0 Control Register
- Address
0x33 I/O 0x13
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2CS02
- 1CS01
- 0CS00
3 fields
| Field | Bits | What it does |
|---|
| CS02 | 2 | Clock Select0 bit 20 No Clock Source (Stopped)1 Running, No Prescaling2 Running, CLK/83 Running, CLK/644 Running, CLK/2565 Running, CLK/10246 Running, ExtClk Tn Falling Edge7 Running, ExtClk Tn Rising Edge
|
| CS01 | 1 | Clock Select0 bit 1 |
| CS00 | 0 | Clock Select0 bit 0 |
TIFRTimer/Counter Interrupt Flag register
- Address
0x38 I/O 0x18
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2–
- 1TOV0
- 0–
1 field
| Field | Bits | What it does |
|---|
| TOV0 | 1 | Timer/Counter0 Overflow Flag |
TIMSKTimer/Counter Interrupt Mask Register
- Address
0x39 I/O 0x19
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2–
- 1TOIE0
- 0–
1 field
| Field | Bits | What it does |
|---|
| TOIE0 | 1 | Timer/Counter0 Overflow Interrupt Enable |
EXINT External Interrupts
GIFRGeneral Interrupt Flag register
- Address
0x3A I/O 0x1A
- Reset
0x00
- Access
- read/write
- 7–
- 6INTF0
- 5PCIF
- 4–
- 3–
- 2–
- 1–
- 0–
2 fields
| Field | Bits | What it does |
|---|
| INTF0 | 6 | External Interrupt Flag 0 |
| PCIF | 5 | Pin Change Interrupt Flag |
GIMSKGeneral Interrupt Mask Register
- Address
0x3B I/O 0x1B
- Reset
0x00
- Access
- read/write
- 7–
- 6INT0
- 5PCIE
- 4–
- 3–
- 2–
- 1–
- 0–
2 fields
| Field | Bits | What it does |
|---|
| INT0 | 6 | External Interrupt Request 0 Enable |
| PCIE | 5 | Pin Change Interrupt Enable |