ATMEGA16u2 as main microcontroller & programming

Hi

I have a small eelctronic design , that we completed, and in it core we had an ATMega16U2, and I would llike to know if I can use the Arduinio libraries and IDE to program it.

if this is possible?

please advise

Yes, look at this link: GitHub - NicoHood/HoodLoader2: 16u2 Bootloader to reprogram 16u2 + 328/2560 with Arduino IDE

Welcome to the forum.:slight_smile:

1 Like

Superb!! thank you

I will check and start testing :slight_smile:

Is there any documentation to show the arduino pin mapping for an ATMEGA 16u2
Thanks

Here is the pinout, people only use it on an Arduino board.

Haven't seen any standalone chips if that is what you after.

Thanks, but I'm looking for the standalone atmega16U2 pin assigment :frowning:

variants/HoodLoader2/pins_arduino.h lines 121–148

/*
16u2 Pinout
[NC] = Not connected on an Arduino Uno / Mega R3
D0 - PB0 PCINT0
D1 - PB1 PCINT1
D2 - PB2 PCINT2
D3 - PB3 PCINT3
D4 - PB4 PCINT4
D5 - PB5 PCINT5
D6 - PB6 PCINT6
D7 - PB7 PCINT7 TIMER1C
D8 - [NC] PC7 INT4
D9 - [NC] PC6 PCINT8 TIMER1A
D10 - [NC] PC5 PCINT9 TIMER1B
D11 - [NC] PC4 PCINT10
D12 - [NC] PC2 PCINT11
D13 - [NC] PD0 INT0 TIMER0B
D14 - [NC] PD1 INT1
D15 - PD2 INT2 USART1 RX
D16 - PD3 INT3 USART1 TX
D17 - PD4 INT5    RXLED
D18 - PD5 PCINT12 TXLED
D19 - [NC] PD6 INT6
D20 - PD7 INT7 328 / 2560 RESET
*/
1 Like

Yep, stumbled across the one @oqibidipo is showing was going to post it but they did before me. :grin:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.