◆IL MATTO // DEBUG GUIDE ◆ VAINOS
ELEC2301 · Lab 5 · University of Southampton

Il Matto: Common Problems & Fixes

A symptom-first debugging guide for the Il Matto AVR board. Find the symptom that matches what you're seeing and click it to jump to the fix, or type an error message into the search box. Tick off steps as you go; your ticks are remembered in this browser.

BOARD: Il Matto (ATmega644P)TOOLS: avrdude · Zadig · Automatto · C232HMAUTHOR: Ivan Ling

Symptoms

No symptom matches that. Try the quick diagnosis below, or browse the sections.

Not sure? Quick diagnosis

↑ symptoms A · Power & reset

AVRDude says “Broken Pipe”

I plugged in my Il Matto and tried running AVRDude, and it says “Broken Pipe”.

  1. Press the reset button. The green LED should not light up when you first plug in, and should light up after you press reset. That means the bootloader is ready to be programmed.
  2. Check the jumper and the switch. The jumper next to the LED must be on USR, not PWR. The power switch must be on USB, not EXT.
    Il Matto board: power switch set to USB and LED jumper set to USR
    Switch → USB · Jumper → USR
Why? What the jumper and switch actually do

The jumper selects what controls the LED.

  • USR: the LED is connected to pin PB7, which the bootloader turns on when it's ready to accept programming signals from USBasp. If the LED is blinking as soon as you power on, you've probably uploaded a program that uses PB7.
  • PWR: the LED turns on whenever the board is powered (i.e. the 3.3 V rail is active). This helps when debugging power problems, but it's no use for solving driver problems.

The EXT/USB switch selects external power pins or USB. The external battery connectors are usually disconnected, so you can use this switch as a quick power-cycle switch.

LED lights up after reset but programming still fails? Go to B · Zadig driver for USBasp.
LED never lights and the board shows as “Unknown Device”? Go to C · Install the bootloader.
↑ symptoms B · Zadig driver

In bootloader mode, but programming still fails

I plugged in, pressed reset, and my Il Matto is in bootloader mode (LED on), but programming still fails.

Check your Zadig configuration. Open Zadig, choose Options → List All Devices if needed, and select USBasp.

  1. Set USBasp to WinUSB. USBasp is used for programming, so it needs the WinUSB driver. If it shows something like usb-ser or Serial, it has the wrong driver. Pick WinUSB and click Replace Driver.
    Zadig with USBasp selected and WinUSB driver installed
    Correct: USBasp → WinUSB
  2. On a USB 3.0 port and WinUSB doesn't work? Change the driver to libusb0 instead.
    Zadig with USBasp using the libusb0 driver
    USB 3.0 alternative: USBasp → libusb0 (v1.2.6.0)
↑ symptoms C · Bootloader

“Unknown Device” and no LED after reset

I plugged in, the Il Matto doesn't light up when I press reset, and it shows up as “Unknown Device” in both Zadig and Device Manager.

Most likely your bootloader is not installed. Reflash it with the C232HM cable and the Automatto script.
  1. Connect the C232HM cable to the ISP port, matching the wire colours shown below (pin 1 is marked on the board).
    ISP header colour map: left column black, yellow, red; right column brown, orange, green; pin 1 marked
    ISP header wire colours. Left column: black, yellow, red. Right column: brown, orange, green.
  2. Put the C232HM in programming mode (WinUSB). In Zadig, if the cable shows up as FTDI or USB-Ser, change it to WinUSB. On a USB 3.0 port, try libusb0 if WinUSB doesn't work.
    Zadig with C232HM selected and WinUSB driver installed
    C232HM → WinUSB for programming
  3. Download Automatto as a ZIP from github.com/ivanling92/automatto (Code → Download ZIP).
    GitHub Code menu with Download ZIP option highlighted
    Code → Download ZIP
  4. Unzip it and open a terminal in that folder. Type the command below and follow the on-screen instructions. You should see a green OK.
    automatto

Automatto shows a red screen?

Fix whichever of these applies, then start again from step 1:

  1. Cables: check they're connected correctly. See the ISP colour map.
  2. Driver: check the C232HM driver is set to WinUSB (or libusb0 on a USB 3.0 port). See step 2 and the USB 3.0 tip.
  3. Toolchain: on a lab PC, make sure you've activated the AVR toolchain. On your own PC, make sure avrdude is installed. See D · Install avrdude.
↑ symptoms D · Toolchain

Installing avrdude & the AVR toolchain

avrdude isn't recognised, or Automatto fails because the toolchain is missing.

Lab PCs: just make sure you've activated the AVR toolchain before running anything. Personal PCs: pick your OS below.

Download and install WinAVR from SourceForge (WinAVR 20100110).

↑ symptoms E · Serial

Can't send Serial messages through the C232HM

Everything else works, but I can't send any Serial messages through the C232HM cable.

You need to install the FTDI drivers.
  1. First make sure the C232HM is in WinUSB mode in Zadig.
    Zadig with C232HM selected and WinUSB driver
    C232HM → WinUSB
  2. Download the FTDI drivers for your system from ftdichip.com/drivers/d2xx-drivers.
  3. Unzip the folder.
  4. Open Device Manager and find your C232HM cable. It should be under Universal Serial Bus Controllers or USB Connector Managers. Double-click it.
  5. On the Driver tab, click Update Driver.
    Device Manager driver tab showing the Update Driver button
    Driver tab → Update Driver
  6. Choose Browse my computer for drivers and navigate to the folder you extracted.
    Important: select the whole folder, not one of its sub-folders.
  7. Let it install. The C232HM should now appear correctly under Ports (COM & LPT).
↑ symptoms Reference

Driver cheat sheet

Which driver goes on which device, at a glance.

Device (as seen in Zadig)Used forDriverDetails
USBaspProgramming the Il Matto over USBWinUSB
or libusb0 on USB 3.0
B
C232HMFlashing the bootloader (Automatto via ISP)WinUSB
or libusb0 on USB 3.0
C
C232HMSerial messagesWinUSB in Zadig, then FTDI driver via Device Manager → shows under Ports (COM & LPT)E
Unknown DeviceNo bootloader on the chipDon't install a driver. Reflash the bootloader.C
↑ all symptoms