Hi everyone,
I'm trying and failing to make use of PCINT pins on a 1284P, most likely due to also having LED's on the input pins. That will be fixed tonight (i.e. LED will be yanked) but I have some additional questions I hope that someone can help me with. I am using a 1284p with the EnableInterrupt library, the Mighty 1284p Optibootloader, and version 1.6.6 of the Arduino IDE.
My current proposed connection implementation is as follows:
Wire Terminal - 470 Resistor - GPIO pin on 1284P.
The GPIO pin would be configured via the pinMode (x, PULLUP_INTERNAL) command.
Then I'd use a ISR from the library and have the 1284p report a reed switch, pushbutton, or even NPN transistor grounding the Wire Terminal input.
The 470 Ohm resistor is simply there to limit current in case something goes wrong on the outside. I doubt it would have a significant impact on the PCINT signal if the pullups are indeed on the order of 50k as I have read elsewhere on the forum.
That said,
- Can I rely on the built-in pull-ups alone or would a stronger external pull-up be a better choice?
- Does the EnableInterrupt library enable built-in pull-ups? Or should I enable that function separately?
- Is such a use of current limiting resistors permissible? Or would I be better off without it?
Lastly, I wonder if anyone has used PCINTs with external zener diode protection and whether the use of a zener could influence things somehow?