Spark Logic

ATmega16U2 connection guide

ATmega16U2 (QFN-32) connection guide. Power and reset. Program and read the signature over ISP.

PackageContactsDetails
TQFP-32 32 32 numbered contacts. See the individual package drawings for footprint dimensions.
QFN-32 33 32 numbered contacts. The underside pad appears below the contact map. See the individual package drawings for footprint dimensions.

Microchip Technology

Device variants · QFN-32

DeviceFlashSRAMEEPROMSupplyMax clockTemperature
ATmega16U2 16 KiB 512 B 512 B — — —
ATmega16U2-MU 16 KiB 512 B 512 B 2.7–5.5 V 16 MHz -40 to +85 °C

Power and reset

Required

Use a current-limited 5 V bench supply. Connect VCC and UVCC to the target rail and feed AVCC through the low-pass filter shown. Place the 1 µF ±10% capacitor close to UCAP and UGND. Use a 10 kΩ reset pull-up.

  • Target rail
    • Bench supply positive
  • Ground
    • Bench supply return
  • Reset
  • Filtered AVCC
  • USB regulator output
100 nF per supply pair between Target rail and GroundTarget rail100 nF per supply pairGround
10 kΩ between Target rail and ResetTarget rail10 kΩReset
Ferrite bead between Target rail and Filtered AVCCTarget railFerrite beadFiltered AVCC
100 nF between Filtered AVCC and GroundFiltered AVCC100 nFGround
1 µF ±10% between USB regulator output and GroundUSB regulator output1 µF ±10%Ground

Bench checks

  • With power off, check for a short across the supply. Power on and measure voltage at every supply pin and at reset.
  • The factory configuration uses the internal 8 MHz RC oscillator divided down to 1 MHz. Check CKSEL on a used device.
  • Keep the USB cable disconnected for this fixture. Use the 5 V USB bus-powered example when connecting a USB host.

AN2519 §§2–3 and 7799E · Pin descriptions and clock source

Connection scenarios

Program and read the signature over ISP

Start from the power and reset circuit. Attach a voltage-compatible AVR in-system programmer and use the target voltage as its reference. Connect reset, serial data in/out, and SCK as shown.

AVR programmer wired to target voltage reference, ground, reset, serial data in/out and clock.ProgrammerAVR targetVTGVCCGNDGNDRESETPC1MOSIPB2MISOPB3SCKPB1
  • Target voltage sense
    • Programmer VTG
  • Common ground
    • Programmer GND
  • Reset assertion
    • Programmer RESET
    • →
  • Serial data into target
    • Programmer MOSI
    • →
  • Serial data out of target
    • Programmer MISO
    • →
  • Programming clock
    • Programmer SCK
    • →

Bench checks

  • Read the device signature before writing flash or fuses. If it fails, verify target power, the clock source, programmer direction, and the selected device.
  • With the factory 1 MHz CPU clock, use an ISP SCK below 250 kHz, for example 125 kHz. PB2 is PDI, PB3 is PDO and PB1 is SCK.
  • Each SCK high and low interval must exceed two CPU clock cycles below 12 MHz and last at least three cycles at 12 MHz and above. Disconnect or isolate other peripherals that drive the programming lines.
  • Disable power output on the programmer if the target has its own bench supply. Confirm the programmer’s VTG behavior in its manual.

AN2519 §4.1 and 7799E · Serial Programming Pin Mapping

QFN-32 wiring map

External wiring example · Program and read the signature over ISP

Highlighted contacts are used in the required step or selected circuit. Select a contact to highlight its wiring nets.

QFN-32 · Marking side · Pin 1 at the upper left
Dashed outline shows the underside pad schematically. See the package drawing for the footprint.
Selected pin details

1 · XTAL1

Input · Clock inputs / oscillator

Oscillator amplifier input or external clock input, depending on clock fuses.

7799E · Pinout and peripheral signal descriptions

Electrical limits · Pin in the reference

Manufacturer documents

Each package lists the documented order codes and variants covered by this map. Select the marked model to see its peripheral assignments and memory. Check the exact order code and datasheet revision before laying out a PCB.