I was reading about external interrupts using the ATmega328p, and I saw in the chip datasheet under the paragraph "Bits 3:2 – ISC1n: Interrupt Sense Control 1 [n = 1:0]" the following table:
Value | Description
------+------------------------------------------------------------
00 | The low level of INT1 generates an interrupt request.
01 | Any logical change on INT1 generates an interrupt request.
10 | The falling edge of INT1 generates an interrupt request.
11 | The rising edge of INT1 generates an interrupt request.
From what I understand from the table title and the definition in the datasheet that ISC1n where n=1|0, is dedicated for INT1. And that ISC0n where n=1|0, is dedicated for INT0. However, in the table above, the value 00 is described as "The low level of INT1 generates an interrupt request.".
What I don't understand is how can ISC0n where n=1|0 be dedicated for INT0 but in the table above the value 00 (or ISC00) is used for INT1 ? I could totally be missing something but I would appreciate any guide.
2 Answers 2
From what I understand from the table title and the definition in the datasheet that ISC1n where n=1|0, is dedicated for INT1. And that ISC0n where n=1|0, is dedicated for INT0.
This is correct.
[...] in the table above the value 00 (or ISC00) is used for INT1
This is your misunderstanding. The value "00" in the table does not mean ISC00. The "Value" column of the table is the value you get by concatenating the bits ISC11 and ISC10. Thus:
- "Value = 00" means ISC11 = 0 and ISC10 = 0
- "Value = 01" means ISC11 = 0 and ISC10 = 1
- "Value = 10" means ISC11 = 1 and ISC10 = 0
- "Value = 11" means ISC11 = 1 and ISC10 = 1
-
Ohh I understand it now! Edgar that's an amazing explanation! Thank you so much!COMP– COMP2017年07月23日 14:36:53 +00:00Commented Jul 23, 2017 at 14:36
It's a typo. My revision of the datasheet (revision G) properly says "INT0".
-
Thanks for your quick reply!!! Where can I find the newest version of the PDF, Google seems to index the one with the typo first ?COMP– COMP2017年07月22日 23:31:01 +00:00Commented Jul 22, 2017 at 23:31
-
1The latest revision of any Atmel datasheet is available from Atmel's website. I have confirmed that revision B of the 328/328P datasheet does not have that typo.Ignacio Vazquez-Abrams– Ignacio Vazquez-Abrams2017年07月22日 23:34:09 +00:00Commented Jul 22, 2017 at 23:34
-
Cool I'll check on their website. Thank again!COMP– COMP2017年07月22日 23:35:19 +00:00Commented Jul 22, 2017 at 23:35
-
I think this is it: ATmega48A/PA/88A/PA/168A /PA/328/P DATASHEET - revision J.2017年07月22日 23:40:12 +00:00Commented Jul 22, 2017 at 23:40
-
Atmel split the 328/P parts into a separate datasheet recently (for a certain definition of "recently").Ignacio Vazquez-Abrams– Ignacio Vazquez-Abrams2017年07月22日 23:41:16 +00:00Commented Jul 22, 2017 at 23:41