Hi, I haven't used arduino in a long time, literally for several years. And now I'm not sure if I can use digital pins 0 and 1 as normal. So, for example, attach a button to them.
Hello,
Only if you don't use Serial
It varies by model. For the UNO, Nano, Mini, and Mega those pins are used by Serial. If you don't use Serial you can use them for digital I/O. For the Leonardo and Micro they are used by Serial1. If you don't use Serial1 you can use them for digital I/O.
The following diagram explains why DPin-0 and Dpin-1 of Arduino UNO are not recommended to use as general IO pins.
These pins are engaged with Serial Monitor and IDE for sketch debugging and sketch uploading.
However, these DPins could be used as general IO lines if the user knows the trick of temporarily disconnecting the external circuits from these pins during sketch uploading and then putting them back.
Thanks, I use arduino Uno. I do not use serial communication, everything goes through the display. But all the pins are full, and since I need to use an interrupt. So this way I wanted to move the button to pin 1.
tribalcz:
Thanks, I use arduino Uno. I do not use serial communication, everything goes through the display. But all the pins are full, and since I need to use an interrupt. So this way I wanted to move the button to pin 1.
How are you updating the firmware inside the chip? ICSP programming?
Even if you don't use the serial i/o, on an UNO R3 the 16u2 is still connected to those pins so they won't behave exactly the same as pins that are not not connected to anything else.
--- bill
bperrybap:
How are you updating the firmware inside the chip? ICSP programming?Even if you don't use the serial i/o, on an UNO R3 the 16u2 is still connected to those pins so they won't behave exactly the same as pins that are not not connected to anything else.
--- bill
For now, I use a prototyping board, specifically the Duino totem. This obviously allows you to load a program even with busy communication pins. There is no problem with playing the program even with busy pin 1.
Tomorrow I will produce a PCB on which there will be a separate 328P-PU. I will use an external programmer there.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.