Programming a bootloader on a 32u4 chip

Hello everyone I'm trying to figure out what is the best way in programming a 32u4 chip. Which is known as a Arduino Leonardo. I would like to use it as a HID device and i can not do it with a standard arduino Leonardo board to big. Also I have resistors and Diodes on there so I'm having a friend of mine make me a custom board. Again asking what would be the best way to program a bootloader for it?

Thank you Joseph


The supplier is mouser and i do not think they will burn a boot loader in it. Also i have saw a few programmers out there. some of them cost a lot. Is there a good cheap one?

The best programmer is the USBasp. Get the 6 pin version on eBay for around $3 USD with free shipping if you don't mind waiting for it to come from China.

You can also turn an Arduino board into an "Arduino as ISP" programmer, which will work fine. However, it's so convenient to have a nice little dedicated programmer you can just connect to the ICSP header in a second so it's definitely worth grabbing a USBasp programmer if you're going down this road, even if you end up using the Arduino as ISP to get the bootloader burned now instead of waiting for shipping.

Is an Arduino Micro too big? That's the same chip.

The Teensy 2.x series also use the "Leonardo" chip. They have a lot more tools available to set up HID, Serial all at once.

The Teensy 3.2 is even smaller.

Hello morgan the arduino it's size is to height for being flat. But i haven't even thought about using a micro or maybe i think i can use a pro mini. Thank you i will look into that. I didn't even think about them little boards.

Pro Mini is a different chip. It won't do HID.

The Pro Micro is even smaller than the Micro. You can get the original ones from SparkFun or cheap clones from the usual places. The Pro Micro doesn’t have the ICSP header like the Micro but it already has the bootloader on it and if you do want to burn bootloader you can just connect jumpers to the appropriate pins along the edges of the board. I actually have an ICSP header adapter I made from stripboard for the Pro Micro or Pro Minis without ICSP header.

The arduino uno and arduino pro mini uses a 328p chip I'm pretty use i can do a HID unless I'm wrong. But i have done a Arduino Uno board as a HID device in the past Here is a video Click here. It did work And 'm pretty sure i can get it to work again and maybe i can do with a pro mini.

Your link got messed up. Here it is:

It's cool to prove that the V-USB thing is possible on the ATmega328P just for the sake of doing it but really there's no reason not to just use a chip that was specifically designed for this purpose instead of hacking one that wasn't designed for the purpose. The difference in price between Pro Mini and Pro Micro is not very significant, especially if you need to buy a USB-serial adapter to use the Pro Mini.