This page was exported from phaq
[ http://phaq.phunsites.net ] Export date: Thu Apr 25 20:04:59 2024 / +0000 GMT |
Years ago I wrote about using the Arduino Micro as an ISP for use with a standalone ATMEGA micro controller. I used this again every now and then, but got to the point where I wanted sort of a more permanent setup. As I had a spare Duemilanove and some prototype boards lying around, all I had to get was a DIP28 ZIF socket and start soldering. Here's the Layout: ATMEGA Pin 20 and 7 -> 5V With this setup, I opened the ArduinoISP sketch included with Arduino IDE. In my old tutorial I recommended downloading the sketch from Github, this has become obsolete. The one include with recent versions Arduino IDE is far more advanced. I had just these minor things changed in the sketch:
With this loaded onto the Duemilanove I could finally use it it burn standalone micros like a charm. So, I took the solution upfront. This works for me. The problem I had up to this point was a very unpleasant behaviour while burning the bootloader onto the micro, where I consistently got errors like these: /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -P/dev/cu.usbserial-AH01GO57 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xE2:m avrdude: Version 6.3, compiled on Jan 17 2017 at 12:01:35 Using Port : /dev/cu.usbserial-AH01GO57 Block Poll Page Polled Programmer Type : STK500 avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01 avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x10 While I never observed this misbehaviour when using the Arduino Micro, the Duemilanove constantly refused to burn to the chip. Unfortunately, there seems to be gazillions of people observing the very same error, but afar from "check the cabling", "check blahblah", there seems to be not much help on this matter. On the other hand, there are obsiously people, who never encountered this issue. Or it is device or implementation dependenant respectively. Only after hours of searching and reading, I found some people mentioning similar issues with serial programmers and how they got away with disabling serial signals. That very moment I remembered reading about Arduino doing Reset on Serial many years ago. I don't know, why this is not mentioned already in of the Arduino as ISP context (it should, I thinkg). At least there is official documentatio on how to disable reset on serial. There's multiple solutions, from soldering, to just sticking restistors. Since I didn't want to tamper with the Arduino PCB, I've just added a removable resistor between RST and 5V. Since I didn't have a 120 ohm resistor at hands, I had to combine a 100 and a 20 ohm resistor to achieve the same effect. Weehee! With the resistor in place, it finally works the way it should. |
Powered by [ Universal Post Manager ] plugin. HTML saving format developed by gVectors Team www.gVectors.com |