Introduction

PwnPad is a cheap, easily to assemble, fun introduction to hardware hacking. You can find more about the project on its github repo https://github.com/twelvesec/PwnPad/tree/main

Arduino as ISP programmer

I encountered a lot of problems when trying to upload a bootloader to my atmega 328p, so hopefully this helps some people.

First off you might read that it will work with minimal setup and you don’t really need an external 16Mhz clock, decoupling capacitor or other stuff, well in my case it did not work with the minimal setup and I just “bricked” my atmega with a wrong fuse setting when trying to burn the bootloader.

In any case I would recommend the following components if you want to use an Arduino:

  • 2 22pF capacitors
  • 2 100nF capacitors
  • 1 10K resistor
  • 16Mhz crystal
  • Breadboard
  • Some wires

When you have all the components all thats left is to connect the arduino to the atmega for programming

Programming Arduino             Target atmega 328p

D10 (SS)                        Pin 1
D11 (MOSI)                      Pin 17
D12 (MISO)                      Pin 18
D13 (SCK)                       Pin 19

alt text

After connecting you can run Arduino IDE select File -> Examples -> Arduino as ISP and upload it to your arduino alt text I recommend also setting the verbose output in File -> Preferences during upload and compilation as it help debug any issues you might encounter.

Double check the connection from the arduino to the breadboard and if you are ready go into Tools setup it as shown on the screen and you can burn your bootloader.

alt text

if successfull you will get a similar output to this: alt text

Now your atmega 328p is ready to work as a replacement for you arduino chip or as the processor for PwnPad (After you upload the PwnPad sketch to it).

Some common issues I encountered (Mostly with bad connections):

  1. bad connection to the breadboard, results in device signature being 0x000000, check your connection try again alt text

  2. 16Mhz crystal faulty connection first you will get the fuses being written normally: alt text But after they are saved and the atmega clock changes to 16mhz external you will get an error and your atmega will show up with some kind of Invalid device signature alt text In this case your device is probably “bricked” and you will have to use a high voltage programmer to restore the default fuse settings and try again, I use avr fusebit doctor.