ATtiny20 registers
All 61 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.
PORTA I/O Port
PINAPort A Input Pins
- Address
0x00
- Reset
0x00
- Access
- read/write
- 7PINA7
- 6PINA6
- 5PINA5
- 4PINA4
- 3PINA3
- 2PINA2
- 1PINA1
- 0PINA0
DDRAData Direction Register, Port A
- Address
0x01
- Reset
0x00
- Access
- read/write
- 7DDA7
- 6DDA6
- 5DDA5
- 4DDA4
- 3DDA3
- 2DDA2
- 1DDA1
- 0DDA0
PORTAPort A Data Register
- Address
0x02
- Reset
0x00
- Access
- read/write
- 7PORTA7
- 6PORTA6
- 5PORTA5
- 4PORTA4
- 3PORTA3
- 2PORTA2
- 1PORTA1
- 0PORTA0
PUEAPull-up Enable Control Register
- Address
0x03
- Reset
0x00
- Access
- read/write
- 7PUEA7
- 6PUEA6
- 5PUEA5
- 4PUEA4
- 3PUEA3
- 2PUEA2
- 1PUEA1
- 0PUEA0
PORTCRPort Control Register
- Address
0x08
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2–
- 1–
- 0BBMA
1 field
| Field | Bits | What it does |
|---|
| BBMA | 0 | Break-Before-Make Mode Enable |
PORTB I/O Port
PINBPort B Data register
- Address
0x04
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3PINB3
- 2PINB2
- 1PINB1
- 0PINB0
DDRBData Direction Register, Port B
- Address
0x05
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3DDB3
- 2DDB2
- 1DDB1
- 0DDB0
PORTBInput Pins, Port B
- Address
0x06
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3PORTB3
- 2PORTB2
- 1PORTB1
- 0PORTB0
PUEBPull-up Enable Control Register
- Address
0x07
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3PUEB3
- 2PUEB2
- 1PUEB1
- 0PUEB0
PORTCRPort Control Register
- Address
0x08
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2–
- 1BBMB
- 0–
1 field
| Field | Bits | What it does |
|---|
| BBMB | 1 | Break-Before-Make Mode Enable |
EXINT External Interrupts
PCMSK0Pin Change Mask Register 0
- Address
0x09
- Reset
0x00
- Access
- read/write
- 7PCINT7
- 6PCINT6
- 5PCINT5
- 4PCINT4
- 3PCINT3
- 2PCINT2
- 1PCINT1
- 0PCINT0
1 field
| Field | Bits | What it does |
|---|
| PCINT | 7:0 | Pin Change Enable Masks |
PCMSK1Pin Change Mask Register 1
- Address
0x0A
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3PCINT3
- 2PCINT2
- 1PCINT1
- 0PCINT0
1 field
| Field | Bits | What it does |
|---|
| PCINT | 3:0 | Pin Change Enable Masks |
GIFRGeneral Interrupt Flag Register
- Address
0x0B
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5PCIF1
- 4PCIF0
- 3–
- 2–
- 1–
- 0INTF0
2 fields
| Field | Bits | What it does |
|---|
| PCIF | 5:4 | Pin Change Interrupt Flags |
| INTF0 | 0 | External Interrupt Flag 0 |
GIMSKGeneral Interrupt Mask Register
- Address
0x0C
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5PCIE1
- 4PCIE0
- 3–
- 2–
- 1–
- 0INT0
2 fields
| Field | Bits | What it does |
|---|
| PCIE | 5:4 | Pin Change Interrupt Enables |
| INT0 | 0 | External Interrupt Request 0 Enable |
MCUCRMCU Control Register
- Address
0x3A I/O 0x1A
- Reset
0x00
- Access
- read/write
- 7ISC01
- 6ISC00
- 5–
- 4–
- 3–
- 2–
- 1–
- 0–
2 fields
| Field | Bits | What it does |
|---|
| ISC01 | 7 | Interrupt Sense Control 0 Bit 1 |
| ISC00 | 6 | Interrupt Sense Control 0 Bit 00 Low Level of INTX1 Any logical change on INTX2 Falling Edge of INTX3 Rising Edge of INTX
|
ADC Analog-to-Digital Converter
DIDR0Digital Input Disable Register 0
- Address
0x0D
- Reset
0x00
- Access
- read/write
- 7ADC7D
- 6ADC6D
- 5ADC5D
- 4ADC4D
- 3ADC3D
- 2ADC2D
- 1ADC1D
- 0ADC0D
8 fields
| Field | Bits | What it does |
|---|
| ADC7D | 7 | ADC6 Digital input Disable |
| ADC6D | 6 | ADC5 Digital input Disable |
| ADC5D | 5 | ADC4 Digital input Disable |
| ADC4D | 4 | ADC3 Digital input Disable |
| ADC3D | 3 | AREF Digital Input Disable |
| ADC2D | 2 | ADC2 Digital input Disable |
| ADC1D | 1 | ADC1 Digital input Disable |
| ADC0D | 0 | ADC0 Digital input Disable |
ADCADC Data Register Bytes
- Address
0x0E
- Reset
0x0000
- Access
- read/write
- Size
- 16-bit
ADMUXThe ADC multiplexer Selection Register
- Address
0x10
- Reset
0x00
- Access
- read/write
- 7–
- 6REFS
- 5–
- 4–
- 3MUX3
- 2MUX2
- 1MUX1
- 0MUX0
2 fields
| Field | Bits | What it does |
|---|
| REFS | 6 | Reference Selection Bit0 Vcc used as internal reference1 Internal 1.1V Reference
|
| MUX | 3:0 | Analog Channel and Gain Selection Bits0 ADC01 ADC12 ADC23 ADC34 ADC45 ADC56 ADC67 ADC78 0V (AGND)9 1.1V Internal Reference10 Temperature sensor
|
ADCSRBADC Control and Status Register B
- Address
0x11
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3ADLAR
- 2ADTS2
- 1ADTS1
- 0ADTS0
2 fields
| Field | Bits | What it does |
|---|
| ADLAR | 3 | |
| ADTS | 2:0 | ADC Auto Trigger Sources0 Free Running mode1 Analog Comparator2 External Interrupt Request 03 Timer/Counter0 Compare Match A4 Timer/Counter0 Overflow5 Timer/Counter1 Compare Match B6 Timer/Counter1 Overflow7 Watchdog Interrupt Request
|
ADCSRAThe ADC Control and Status register
- Address
0x12
- Reset
0x00
- Access
- read/write
- 7ADEN
- 6ADSC
- 5ADATE
- 4ADIF
- 3ADIE
- 2ADPS2
- 1ADPS1
- 0ADPS0
6 fields
| Field | Bits | What it does |
|---|
| ADEN | 7 | ADC Enable |
| ADSC | 6 | ADC Start Conversion |
| ADATE | 5 | ADC Auto Trigger Enable |
| 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
|
AC Analog Comparator
ACSRBAnalog Comparator Control And Status Register B
- Address
0x13
- Reset
0x00
- Access
- read/write
- 7HSEL
- 6HLEV
- 5–
- 4–
- 3–
- 2ACME
- 1–
- 0–
3 fields
| Field | Bits | What it does |
|---|
| HSEL | 7 | Hysteresis Select |
| HLEV | 6 | Hysteresis Level |
| ACME | 2 | Analog Comparator Multiplexer Enable |
ACSRAAnalog Comparator Control And Status Register A
- Address
0x14
- Reset
0x00
- Access
- read/write
- 7ACD
- 6ACBG
- 5ACO
- 4ACI
- 3ACIE
- 2ACIC
- 1ACIS1
- 0ACIS0
7 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 |
| ACIC | 2 | Analog Comparator Input Capture Enable |
| ACIS | 1:0 | Analog Comparator Interrupt Mode Select bits0 Interrupt on Toggle1 Reserved2 Interrupt on Falling Edge3 Interrupt on Rising Edge
|
TC0 Timer/Counter, 8-bit
OCR0BTimer/Counter0 Output Compare Register
- Address
0x15
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2–
- 1–
- 0–
OCR0ATimer/Counter0 Output Compare Register
- Address
0x16
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2–
- 1–
- 0–
TCNT0Timer/Counter0
- Address
0x17
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2–
- 1–
- 0–
TCCR0BTimer/Counter 0 Control Register B
- Address
0x18
- Reset
0x00
- Access
- read/write
- 7FOC0A
- 6FOC0B
- 5–
- 4–
- 3WGM02
- 2CS02
- 1CS01
- 0CS00
4 fields
| Field | Bits | What it does |
|---|
| FOC0A | 7 | Force Output Compare A |
| FOC0B | 6 | Force Output Compare B |
| WGM02 | 3 | Waveform Generation Mode |
| CS0 | 2:0 | Clock Select0 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
|
TCCR0ATimer/Counter 0 Control Register A
- Address
0x19
- Reset
0x00
- Access
- read/write
- 7COM0A1
- 6COM0A0
- 5COM0B1
- 4COM0B0
- 3–
- 2–
- 1WGM01
- 0WGM00
3 fields
| Field | Bits | What it does |
|---|
| COM0A | 7:6 | Compare Output Mode for Channel A bits |
| COM0B | 5:4 | Compare Output Mode for Channel B bits |
| WGM0 | 1:0 | Waveform Generation Mode |
TIFROverflow Interrupt Enable
- Address
0x25 I/O 0x05
- Reset
0x00
- Access
- read/write
- 7ICF1
- 6–
- 5OCF1B
- 4OCF1A
- 3TOV3
- 2OCF0B
- 1OCF0A
- 0TOV0
6 fields
| Field | Bits | What it does |
|---|
| ICF1 | 7 | Input Capture Flag |
| OCF1B | 5 | Timer Output Compare Flag 1B |
| OCF1A | 4 | Timer Output Compare Flag 1A |
| TOV | 3,0 | Timer Overflow Flag |
| OCF0B | 2 | Output Compare Flag 0 B |
| OCF0A | 1 | Output Compare Flag 0 A |
TIMSKTimer Interrupt Mask Register
- Address
0x26 I/O 0x06
- Reset
0x00
- Access
- read/write
- 7ICIE1
- 6–
- 5OCIE1B
- 4OCIE1A
- 3TOIE3
- 2OCIE0B
- 1OCIE0A
- 0TOIE0
6 fields
| Field | Bits | What it does |
|---|
| ICIE1 | 7 | Input Capture Interrupt Enable |
| OCIE1B | 5 | Output Compare B Match Interrupt Enable |
| OCIE1A | 4 | Output Compare A Match Interrupt Enable |
| TOIE | 3,0 | Overflow Interrupt Enable |
| OCIE0B | 2 | Timer/Counter Output Compare Match B Interrupt Enable |
| OCIE0A | 1 | Timer/Counter0 Output Compare Match A Interrupt Enable |
GTCCRGeneral Timer/Counter Control Register
- Address
0x27 I/O 0x07
- Reset
0x00
- Access
- read/write
- 7TSM
- 6–
- 5–
- 4–
- 3–
- 2–
- 1–
- 0PSR
2 fields
| Field | Bits | What it does |
|---|
| TSM | 7 | Timer Synchronization Mode |
| PSR | 0 | Prescaler Reset |
TC1 Timer/Counter, 16-bit
ICR1Input Capture Register Bytes
- Address
0x1A
- Reset
0x0000
- Access
- read/write
- Size
- 16-bit
OCR1BTimer/Counter1 Output Compare Register B
- Address
0x1C
- Reset
0x0000
- Access
- read/write
- Size
- 16-bit
OCR1ATimer/Counter 1 Output Compare Register A
- Address
0x1E
- Reset
0x0000
- Access
- read/write
- Size
- 16-bit
TCNT1Timer/Counter1
- Address
0x20 I/O 0x00
- Reset
0x0000
- Access
- read/write
- Size
- 16-bit
TCCR1CTimer/Counter1 Control Register C
- Address
0x22 I/O 0x02
- Reset
0x00
- Access
- read/write
- 7FOC1A
- 6FOC1B
- 5–
- 4–
- 3–
- 2–
- 1–
- 0–
2 fields
| Field | Bits | What it does |
|---|
| FOC1A | 7 | Force Output Compare for channel A |
| FOC1B | 6 | Force Output Compare for channel B |
TCCR1BTimer/Counter1 Control Register B
- Address
0x23 I/O 0x03
- Reset
0x00
- Access
- read/write
- 7ICNC1
- 6ICES1
- 5–
- 4WGM11
- 3WGM10
- 2CS12
- 1CS11
- 0CS10
4 fields
| Field | Bits | What it does |
|---|
| ICNC1 | 7 | Input Capture 1 Noise Canceler |
| ICES1 | 6 | Input Capture 1 Edge Select |
| WGM1 | 4:3 | Waveform Generation Mode |
| CS1 | 2:0 | Clock Select1 bits0 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
|
TCCR1ATimer/Counter1 Control Register A
- Address
0x24 I/O 0x04
- Reset
0x00
- Access
- read/write
- 7COM1A1
- 6COM1A0
- 5COM1B1
- 4COM1B0
- 3–
- 2–
- 1WGM11
- 0WGM10
3 fields
| Field | Bits | What it does |
|---|
| COM1A | 7:6 | Compare Output Mode 1A, bits |
| COM1B | 5:4 | Compare Output Mode 1B, bits |
| WGM1 | 1:0 | Waveform Generation Mode Bits |
TIFROverflow Interrupt Enable
- Address
0x25 I/O 0x05
- Reset
0x00
- Access
- read/write
- 7ICF1
- 6–
- 5OCF1B
- 4OCF1A
- 3TOV3
- 2OCF0B
- 1OCF0A
- 0TOV0
6 fields
| Field | Bits | What it does |
|---|
| ICF1 | 7 | Input Capture Flag |
| OCF1B | 5 | Timer Output Compare Flag 1B |
| OCF1A | 4 | Timer Output Compare Flag 1A |
| TOV | 3,0 | Timer Overflow Flag |
| OCF0B | 2 | Output Compare Flag 0 B |
| OCF0A | 1 | Output Compare Flag 0 A |
TIMSKTimer Interrupt Mask Register
- Address
0x26 I/O 0x06
- Reset
0x00
- Access
- read/write
- 7ICIE1
- 6–
- 5OCIE1B
- 4OCIE1A
- 3TOIE3
- 2OCIE0B
- 1OCIE0A
- 0TOIE0
6 fields
| Field | Bits | What it does |
|---|
| ICIE1 | 7 | Input Capture Interrupt Enable |
| OCIE1B | 5 | Output Compare B Match Interrupt Enable |
| OCIE1A | 4 | Output Compare A Match Interrupt Enable |
| TOIE | 3,0 | Overflow Interrupt Enable |
| OCIE0B | 2 | Timer/Counter Output Compare Match B Interrupt Enable |
| OCIE0A | 1 | Timer/Counter0 Output Compare Match A Interrupt Enable |
GTCCRGeneral Timer/Counter Control Register
- Address
0x27 I/O 0x07
- Reset
0x00
- Access
- read/write
- 7TSM
- 6–
- 5–
- 4–
- 3–
- 2–
- 1–
- 0PSR
2 fields
| Field | Bits | What it does |
|---|
| TSM | 7 | Timer Synchronization Mode |
| PSR | 0 | Prescaler Reset |
TWI Two Wire Serial Interface
TWSDTWI Slave Data Register
- Address
0x28 I/O 0x08
- Reset
0x00
- Access
- read/write
- 7TWSD7
- 6TWSD6
- 5TWSD5
- 4TWSD4
- 3TWSD3
- 2TWSD2
- 1TWSD1
- 0TWSD0
1 field
| Field | Bits | What it does |
|---|
| TWSD | 7:0 | TWI slave data bit |
TWSAMTWI Slave Address Mask Register
- Address
0x29 I/O 0x09
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2–
- 1–
- 0–
TWSATWI Slave Address Register
- Address
0x2A I/O 0x0A
- Reset
0x00
- Access
- read/write
- 7TWSA7
- 6TWSA6
- 5TWSA5
- 4TWSA4
- 3TWSA3
- 2TWSA2
- 1TWSA1
- 0TWSA0
1 field
| Field | Bits | What it does |
|---|
| TWSA | 7:0 | TWI slave address bit |
TWSSRATWI Slave Status Register A
- Address
0x2B I/O 0x0B
- Reset
0x00
- Access
- read/write
- 7TWDIF
- 6TWASIF
- 5TWCH
- 4TWRA
- 3TWC
- 2TWBE
- 1TWDIR
- 0TWAS
8 fields
| Field | Bits | What it does |
|---|
| TWDIF | 7 | TWI Data Interrupt Flag |
| TWASIF | 6 | TWI Address/Stop Interrupt Flag |
| TWCH | 5 | TWI Clock Hold |
| TWRA | 4 | TWI Receive Acknowledge |
| TWC | 3 | TWI Collision |
| TWBE | 2 | TWI Bus Error |
| TWDIR | 1 | TWI Read/Write Direction |
| TWAS | 0 | TWI Address or Stop |
TWSCRBTWI Slave Control Register B
- Address
0x2C I/O 0x0C
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2TWAA
- 1TWCMD1
- 0TWCMD0
2 fields
| Field | Bits | What it does |
|---|
| TWAA | 2 | TWI Acknowledge Action |
| TWCMD | 1:0 | |
TWSCRATWI Slave Control Register A
- Address
0x2D I/O 0x0D
- Reset
0x00
- Access
- read/write
- 7TWSHE
- 6–
- 5TWDIE
- 4TWASIE
- 3TWEN
- 2TWSIE
- 1TWPME
- 0TWSME
7 fields
| Field | Bits | What it does |
|---|
| TWSHE | 7 | TWI SDA Hold Time Enable |
| TWDIE | 5 | TWI Data Interrupt Enable |
| TWASIE | 4 | TWI Address/Stop Interrupt Enable |
| TWEN | 3 | Two-Wire Interface Enable |
| TWSIE | 2 | TWI Stop Interrupt Enable |
| TWPME | 1 | TWI Promiscuous Mode Enable |
| TWSME | 0 | TWI Smart Mode Enable |
SPI Serial Peripheral Interface
SPDRSPI Data Register
- Address
0x2E I/O 0x0E
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2–
- 1–
- 0–
SPSRSPI Status Register
- Address
0x2F I/O 0x0F
- Reset
0x00
- Access
- read/write
- 7SPIF
- 6WCOL
- 5–
- 4–
- 3–
- 2–
- 1–
- 0SPI2X
3 fields
| Field | Bits | What it does |
|---|
| SPIF | 7 | SPI Interrupt Flag |
| WCOL | 6 | Write Collision Flag |
| SPI2X | 0 | Double SPI Speed Bit |
SPCRSPI Control Register
- Address
0x30 I/O 0x10
- Reset
0x00
- Access
- read/write
- 7SPIE
- 6SPE
- 5DORD
- 4MSTR
- 3CPOL
- 2CPHA
- 1SPR1
- 0SPR0
7 fields
| Field | Bits | What it does |
|---|
| SPIE | 7 | SPI Interrupt Enable |
| SPE | 6 | SPI Enable |
| DORD | 5 | Data Order |
| MSTR | 4 | Master/Slave Select |
| CPOL | 3 | Clock polarity |
| CPHA | 2 | Clock Phase |
| SPR | 1:0 | SPI Clock Rate Selects0 fcl/41 fcl/162 fcl/643 fcl/128
|
WDT Watchdog Timer
WDTCSRWatchdog Timer Control and Status Register
- Address
0x31 I/O 0x11
- Reset
0x00
- Access
- read/write
- 7WDIF
- 6WDIE
- 5WDP5
- 4–
- 3WDE
- 2WDP2
- 1WDP1
- 0WDP0
4 fields
| Field | Bits | What it does |
|---|
| WDIF | 7 | Watchdog Timer Interrupt Flag |
| WDIE | 6 | Watchdog Timer Interrupt Enable |
| WDP | 5,2,1,0 | Watchdog Timer Prescaler Bits0 Oscillator Cycles 2K1 Oscillator Cycles 4K2 Oscillator Cycles 8K3 Oscillator Cycles 16K4 Oscillator Cycles 32K5 Oscillator Cycles 64K6 Oscillator Cycles 128K7 Oscillator Cycles 256K8 Oscillator Cycles 512K9 Oscillator Cycles 1024K
|
| WDE | 3 | Watch Dog Enable |
CPU CPU Registers
NVMCSRNon-Volatile Memory Control and Status Register
- Address
0x32 I/O 0x12
- Reset
0x00
- Access
- read/write
- 7NVMBSY
- 6–
- 5–
- 4–
- 3–
- 2–
- 1–
- 0–
1 field
| Field | Bits | What it does |
|---|
| NVMBSY | 7 | Non-Volatile Memory Busy |
NVMCMDNon-Volatile Memory Command
- Address
0x33 I/O 0x13
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2–
- 1–
- 0–
PRRPower Reduction Register
- Address
0x35 I/O 0x15
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4PRTWI
- 3PRSPI
- 2PRTIM1
- 1PRTIM0
- 0PRADC
5 fields
| Field | Bits | What it does |
|---|
| PRTWI | 4 | Power Reduction TWI |
| PRSPI | 3 | Power Reduction Serial Peripheral Interface |
| PRTIM1 | 2 | Power Reduction Timer/Counter1 |
| PRTIM0 | 1 | Power Reduction Timer/Counter0 |
| PRADC | 0 | Power Reduction ADC |
CLKPSRClock Prescale Register
- Address
0x36 I/O 0x16
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3CLKPS3
- 2CLKPS2
- 1CLKPS1
- 0CLKPS0
1 field
| Field | Bits | What it does |
|---|
| CLKPS | 3:0 | Clock Prescaler Select Bits0 11 22 43 84 165 326 647 1288 256
|
CLKMSRClock Main Settings Register
- Address
0x37 I/O 0x17
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2–
- 1CLKMS1
- 0CLKMS0
1 field
| Field | Bits | What it does |
|---|
| CLKMS | 1:0 | Clock Main Select Bits |
OSCCALOscillator Calibration Value
- Address
0x39 I/O 0x19
- 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 |
MCUCRMCU Control Register
- Address
0x3A I/O 0x1A
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4BODS
- 3SM2
- 2SM1
- 1SM0
- 0SE
3 fields
| Field | Bits | What it does |
|---|
| BODS | 4 | BOD Sleep |
| SM | 3:1 | Sleep Mode0 Idle1 ADC noise reduction2 Power-down4 Standby
|
| SE | 0 | Sleep Enable |
RSTFLRReset Flag Register
- Address
0x3B I/O 0x1B
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3WDRF
- 2–
- 1EXTRF
- 0PORF
3 fields
| Field | Bits | What it does |
|---|
| WDRF | 3 | Watchdog Reset Flag |
| EXTRF | 1 | External Reset Flag |
| PORF | 0 | Power-on Reset Flag |
CCPConfiguration Change Protection
- Address
0x3C I/O 0x1C
- Reset
0x00
- Access
- read/write
- 7–
- 6–
- 5–
- 4–
- 3–
- 2–
- 1–
- 0–
SPStack Pointer
- Address
0x3D I/O 0x1D
- Reset
0x00BF
- Access
- read/write
- Size
- 16-bit
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 |