I have a bunch of ATmega16 & ATmega 32 (40-pin DIP), and I want to use Arduino IDE with it, to program them for various projects related to robotics (Like- taking readings from a bunch of sensors, driving DC motors and servos, that kinda stuff).
I also have a USBASP programmer (6 pin out).
How can I put the Arduino bootloader on the ATmega32?
What files need changing? Is there another programmer that is better for this?
Also, what else do I need (hardware and/or software) to connect the ATmega32 to a computer to
upload Arduino sketches onto it, and
be able to use the Serial.read and write commands?
I have the latest Arduino IDE version installed.
I'm kinda new to Arduino so it would be great if you could tell me the step by step process and the necessary hardware pin connections too.
Thanks,
These seem to help with the changes I need to make in the IDE, but they don't really go into the necessary hardware that I need to upload the bootloader and the sketches.
That is why I was wondering if anybody had done a full tutorial on it that tackles both the hardware and the IDE. I haven't found one so far.
I am planning to create a circuit on a breadboard first and then if that works, I will solder it all onto a general purpose PCB. So later I can just attach the USBASP, (and maybe the FT232RL USB to Serial break-out board from Sparkfun, I don't know what that's for, and if I need it or not. www.sparkfun.com/products/718 ) to the general purpose PCB and use it on all the Atmega16/32 I have.
The basic standalone designs will be the same as an ATmega328P just adjust for the different pinouts of the mega16/32.
VCC and GND
Decoupling capacitors, 0.1uF ceramic type. Close to each VCC and GND pins as possible.
10Kohm pull-up resistor to the reset pin.
Optional: External clocking, Crystal oscillator and 22pF capacitors.
Optional: Bootloader support, Tx/Rx pins, and auto-reset circuit (0.1uF capacitor between DTR and reset pin)
(Typically you would put a 1x6 pin header for the standard FTDI pinouts, https://www.sparkfun.com/products/9716)
(You can skip the bootloader and put on an 2x3 ICSP header for ISP programming, you will need this to burn bootloader anyway)
Perhaps others have found it out as well. Here you can download a 'hardware' dir you can simply unzip in sketchfolder/hardware containing old stk500 style bootloader, adapted boards.txt and a pins_arduino.h file for ATmega32: