Getting started with Atmega32u4 - Page 1
Forum section: electronics / beginners

author: Bibiricat
author_rank: Contributor
timestamp: October 08, 2012, 07:27:10 pm
content: Hello.I want to make some kind of arduino clone using the Atmega32u4, and after some research i found some schematics, but i also find out that i need to program some kind of bootloader using an external programmer .I was wondering if anyone ever build a programmer for an Atmel MC, and can post/link a schematic and explain what i must do to get started with that MC. I chose ATmega32u4 because that is what i saw on the Arduino, but i could also use an equivalent performance Pic.If anyone have some advice, schematic, links, i could rely use them.

author: Unknown
author_rank: Unknown
timestamp: October 08, 2012, 08:32:43 pm
content: If someone gives you the schematic of a programmer, containing another AVR, how is this going to help you? It's a chicken and egg problem, you need a programmer to build a programmer. Common solutions are to either buy a programmer or use bit-banging.Thisis a neat solution to this problem, in my opinion, although just getting a finished programmer from eBay may be cheaper.

author: Mechatrommer
author_rank: Super Contributor
timestamp: October 09, 2012, 02:18:09 am
content: Quote from: Bibiricat on October 08, 2012, 07:27:10 pmbuy an external programmer. the original is the best. a clone that looks like the original is better, a clone that doesnt look like the original is poorer, the one that lies naked without any casing, well, is ____.

author: flano
author_rank: Contributor
timestamp: October 09, 2012, 07:58:36 am
content: Hi,My recommendation would be to get a genuine AVRISP MKII. I have tried a number of clones, some work well, but others have problems with drivers. It can be a bit hit and miss.Mike

author: andete
author_rank: Contributor
timestamp: October 09, 2012, 08:54:20 am
content: You can program the bootloader via another Arduino. Some google foo should find you the instructions.However, like others suggest I'd invest in a genuine Atmel AVRISP MkII. It is not that expensive and works great.

author: LEECH666
author_rank: Frequent Contributor
timestamp: October 09, 2012, 08:56:37 am
content: You can build this very simple and very crude programmer ( called SP12,http://www.mechaos.de/avr_prog.php|http://sbolt.home.xs4all.nl/e-spider_prog.html) to program a better programmer ( like this onewww.ladyada.net/make/usbtinyisp/) to programm an Arduino and most other AVRs.You can also turn an existing Arduino into an ISP programmer with a sketch that's included in the Arduino IDE.Some pictures:My implementation of the SP12 Programmer:https://picasaweb.google.com/oBsRVr666/SP12_Parallelport_Programmierer_Fuer_OpenWiiMy self built Arduino clone (based on Metaboard):https://picasaweb.google.com/oBsRVr666/RetarduinoUSBtinyISP Programmer (AVR Stick) on perfboardhttps://picasaweb.google.com/oBsRVr666/DIY_USBtinyISP

author: amyk
author_rank: Super Contributor
timestamp: October 09, 2012, 09:15:16 am
content: Yes, anything that can do simple bit-banging will let you program an MCU cheaply.Since you're already wanting to build something you can buy pre-made (an Arduino), maybe you could try manually programming the bootloader onto the chip by using DIP switches and pushbuttons.

author: LEECH666
author_rank: Frequent Contributor
timestamp: October 09, 2012, 09:26:12 am
content: This would come in handy ... in that case. xD

author: free_electron
author_rank: Super Contributor
timestamp: October 09, 2012, 02:31:22 pm
content: Quote from: flano on October 09, 2012, 07:58:36 amBingo. The clones are all avrdude based and pure 'bovine byproduct'.I need to do a teardown of a real one and a clone and the difference will be clear...

author: Bored@Work
author_rank: Super Contributor
timestamp: October 09, 2012, 03:03:12 pm
content: Quote from: free_electron on October 09, 2012, 02:31:22 pmavrdude has nothing to do with the quality of clone hardware. avrdude is a programming software that came into existence because Atmel refuses to support anything but Windows. avrdude in turn tries to support as many programming hardware as possible, Atmel's own one (thats how it started), and other hardware that evolved over time.If you are so cheeky to use original Atmel hardware on Linux, Mac or BSD you still need avrdude to drive the hardware.

author: free_electron
author_rank: Super Contributor
timestamp: October 09, 2012, 04:20:08 pm
content: Brainfart. i don't remember the name of those cheapo programmers. I toss all that open-sores / broken source tripe on one pile.i bought one from one-hung-lo in what looks to be a very good copy of even the case... rip it apart and it's a whole different can of worms ...Images from top to bottom ( left real , right fake )case frontcase bottomgutscloseup of a FAKE AVRISP MKIICloseup of a REAL AVRISP MKIInote how the real one has all sorts of extra protection circuitry , level shifters and even an additional switching convertor to keep on board voltages stable.The fake one is a kludge that sometimes works , sometimes doesn't work. Stops working in the middle etc ..There is nothing worse than having to debug the debug tool in the middle of a project...

author: LEECH666
author_rank: Frequent Contributor
timestamp: October 09, 2012, 04:58:50 pm
content: So you're (probably rightfully) bashing clone hardware. But what has this to do with AVRdude?It does its job, usually. Sure it's not the first choice in a professional environment but for hobbyist use it's a reasonable piece of software.My 2 cents,Florian

author: Bored@Work
author_rank: Super Contributor
timestamp: October 09, 2012, 05:09:07 pm
content: Quote from: free_electron on October 09, 2012, 04:20:08 pmWell, well, I am not surprised that you have issues with using these "debug tools" - because they aren't. The AVRISP is a simple in-circuit programmer without any debugging features at all.

author: senso
author_rank: Frequent Contributor
timestamp: October 09, 2012, 06:15:04 pm
content: All the Atmega with hardware USB have a built-in bootloader, just read the datasheet and use FLIP to program your chip, or use one atmega32u4 to make an USBASP, and then you have a standalone programmer to program any avr, but the usb ones dont really need a programmer, unless you erase the bootloader.

author: free_electron
author_rank: Super Contributor
timestamp: October 09, 2012, 06:48:30 pm
content: Quote from: Bored@Work on October 09, 2012, 05:09:07 pmsemantics. a programmer is also a debug tool.point is : the fake one is crap with ot without the atmel provided tools. The real one works perfectly fine using the Atmel provided tools.

author: Kremmen
author_rank: Super Contributor
timestamp: October 09, 2012, 08:27:21 pm
content: Quote from: free_electron on October 09, 2012, 06:48:30 pmErr... only for very low values of "debug tool". Breakpoints, stack and call traces, variable/memory access triggers, watches etc etc ?? Not so much features of your run of the mill _programmer_.

author: TerminalJack505
author_rank: Super Contributor
timestamp: October 10, 2012, 11:18:48 pm
content: Wow! At least the cloners had the courtesy of using an Atmel part in their clone.

author: Bibiricat
author_rank: Contributor
timestamp: October 13, 2012, 11:03:45 am
content: After some research i found that almost all of my collage teachers are using Microcip PIC, so i decided for now to stick with PIC's MC, as they also have the official Pickit 2 and 3, and would support me in making a test platform for all my ideas. Next year (after i graduate), i may return to Atmel, but for now, PIC it is !Edit:I have finally found an atmel equivalent pic, the PIC18F4550.Thanks for all you advice.