On my Uno, I set up the HoodLoader2 (link below) so I can program both the ATMega16u2 and the ATmega328P. I can communicate between the two using the serial port. However, I need the serial port to communicate between the Uno and the PC. Can I communicate between the 328 and 16u2 using a common digital pin? All I need to communicate is a simple yes/no state, preferably in both directions. In other words: can I connect a digital pin (say 12) on the Uno to, say, PB1 pin on the 16u2's ICSP header, set pin 12 value to HIGH on the 328P, then read that state on the 16u2 via PB1? And vice versa, via another pair of pins? There's a Q that's close to what I want (link below) and the user there (@jsotola) seems to have the knowledge, but I can't comment under his comment, as I don't have 50 reputation.


Accessing digital pins from the ATMega16u2

1 Answer 1


You could use from PB1 to PB3 from 16u2 (SCK, MOSI, MISO) wich are exposed to its ICSP. Add a wire from one of them to your atmega328 :)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.