beautypg.com

4 pcmsk0 - pin change mask register a, 5 pcmsk1 - pin change mask register b – Rainbow Electronics ATtiny861_V User Manual

Page 52

background image

52

2588B–AVR–11/06

ATtiny261/461/861

Alternatively, the flag can be cleared by writing a logical one to it. This flag is always cleared
when INT1 is configured as a level interrupt.

• Bit 6 – INTF0: External Interrupt Flag 0

When an edge or logic change on the INT0 pin triggers an interrupt request, INTF0 becomes set
(one). If the I-bit in SREG and the INT0 bit in GIMSK are set (one), the MCU will jump to the cor-
responding Interrupt Vector. The flag is cleared when the interrupt routine is executed.
Alternatively, the flag can be cleared by writing a logical one to it. This flag is always cleared
when INT0 is configured as a level interrupt.

• Bit 5 – PCIF: Pin Change Interrupt Flag

When a logic change on any PCINT15 pin triggers an interrupt request, PCIF becomes set
(one). If the I-bit in SREG and the PCIE bit in GIMSK are set (one), the MCU will jump to the cor-
responding Interrupt Vector. The flag is cleared when the interrupt routine is executed.
Alternatively, the flag can be cleared by writing a logical one to it.

• Bits 4:0 – Res: Reserved Bits

These bits are reserved bits in the ATtiny261/461/861 and will always read as zero.

11.1.4

PCMSK0 – Pin Change Mask Register A

• Bits 7:0 – PCINT7:0: Pin Change Enable Mask 7..0

Each PCINT7:0 bit selects whether pin change interrupt is enabled on the corresponding I/O pin.
If PCINT7:0 is set and the PCIE1 bit in GIMSK is set, pin change interrupt is enabled on the cor-
responding I/O pin. If PCINT7..0 is cleared, pin change interrupt on the corresponding I/O pin is
disabled.

11.1.5

PCMSK1 – Pin Change Mask Register B

• Bits 7:0 – PCINT15:8: Pin Change Enable Mask 15..8

Each PCINT15:8 bit selects whether pin change interrupt is enabled on the corresponding I/O
pin. If PCINT11:8 is set and the PCIE0 bit in GIMSK is set, pin change interrupt is enabled on
the corresponding I/O pin, and if PCINT15:12 is set and the PCIE1 bit in GIMSK is set, pin
change interrupt is enabled on the corresponding I/O pin. If PCINT15:8 is cleared, pin change
interrupt on the corresponding I/O pin is disabled.

Bit

7

6

5

4

3

2

1

0

0x23 (0x43)

PCINT7

PCINT6

PCINT5

PCINT4

PCINT3

PCINT2

PCINT1

PCINT0

PCMSK0

Read/Write

R/W

R/W

R/W

R/w

R/W

R/W

R/W

R/W

Initial Value

1

1

0

0

1

0

0

0

Bit

7

6

5

4

3

2

1

0

0x22 (0x42)

PCINT15

PCINT14

PCINT13

PCINT12

PCINT11

PCINT10

PCINT9

PCINT8

PCMSK1

Read/Write

R/W

R/W

R/W

R/w

R/W

R/W

R/W

R/W

Initial Value

1

1

1

1

1

1

1

1