Solved: blinkLED from Elliot Williams book

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello Im new to this forum and stuck already on the first example of the book AVR programming by Elliot Williams.

Im using Debian with the Arduino IDE version 2:1.0.5+dfsg2-4.1 plus an genuine Arduino as well as an knockoff (so I tried it with both). On my breadboard I have an Atmega88 and everything is according to the book page 28.

I was able to turn the Arduino into an ISP and load it with any other example code. So it seems to work but when I try to upload the blinkLED sketch I got this one:

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x01
avrdude: stk500_initialize(): (a) protocol error, expect=0x14, resp=0x10
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500_disable(): unknown response=0x12

 

I tried this also with an USBTinyISP but thats another story.

 

Whats the problem here?

 

Thank you

Atmel 328 (Atmega 88 20U) programmed by Arduino

Last Edited: Fri. Apr 19, 2019 - 01:16 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You haven't wired up the other half of the chip's power supply for a start.

the first example of the book AVR programming by Elliot Williams.

Can you show the diagram from that book or a link to it? Many people INCORRECTLY believe that AVCC and the other ground pin are optional.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It also looks like you have power for your breadboard coming from"Vin" - it should be coming from "5V"

This could have destroyed your chip if you were actually powering it from the DC Jack; if you were powering it from USB, you'd probably just get "not working."

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry for the delay, I was distracted && had to fix Fritzing (Debian installation).

Anyway, this is the sketch I made with Fritzing:

 

sketch of my breadboard

the resistor has 220Ω and the capacitor has 100nF

 

BR Chris

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But you need to wire the power pins on the other side of the chip as well as adding another cap there. See also #2 above.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Finally had to opportunity to finish this. It was the lack of power on pin 20 as js mentioned. But also the fact that I used an Atmega88 instead of a 168. So when I tried to upload the tiny code via Arduino to the chip, the Arduino IDE complained: avrdude: Expectred signature for ATmega is 1E 94 06. After putting a "real" 168 into the board it worked.

 

Thank you all.

 

BR Christian