AI Interactive Datasheet ATtiny12
AVR · tinyAVR

ATtiny12 registers

All 18 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.

AC Analog Comparator

ACSRAnalog Comparator Control And Status Register

Address
0x08
Reset
0x00
Access
read/write
  1. 7ACD
  2. 6AINBG
  3. 5ACO
  4. 4ACI
  5. 3ACIE
  6. 2–
  7. 1ACIS1
  8. 0ACIS0
6 fields
FieldBitsWhat it does
ACD7Analog Comparator Disable
AINBG6Analog Comparator Bandgap Select
ACO5Analog Comparator 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

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. 4SM
  5. 3–
  6. 2–
  7. 1ISC01
  8. 0ISC00
4 fields
FieldBitsWhat it does
PUD6Pull-up Disable
SE5Sleep Enable
SM4Sleep Mode
  • 0 Idle
  • 1 Power Down
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