Skip to content

Setting it up

2010/03/21

Part 0 <<––>> Part 2

Getting the Arduino enviroment running, compiling the ArduinoISP example and uploading it to Duemilanove was easy. Setting up the connections to the target system (a Mega8 on a breadboard) was not a big deal. Just following the schema shown on the ArduinoISP tutorials page.

Thenafter I create a hex file with a “hello world” program that will blink an LED on the target system, just to have some stuff that is ment to be uploaded. It is also working as a visual feedback if it had worked.

After I read in a forums post that the arduino enviroment contains a AVRDUDE version .

I downloaded and installed AVR-urn-O-Mat. This is a GUI for AVRDUDE. I configured it to use avrdude.exe in \hardware\tools\avr\bin\avrdude.exe and \hardware\tools\avr\etc\avrdude.conf.

I choose
-v -v -v -v  -b 19200
for additional options. Selected mega8 as target and AVRISP as programmer type.

Tried reading the flash and got an error:

avrdude.exe: Device signature = 0x1e9406
avrdude.exe: Expected signature for ATMEGA8 is 1E 93 07
 Double check chip, or use -F to override this check.
avrdude.exe: Send: Q [51]   [20]

changed the programmer type to stk500 with the same results.

I saw that the version of avrdude in the ardurino package is 5.4. I thought I read that it should be at least 5.5.

I’ll give the version 5.10 from the WinAVR package a try. I copied the exe and the conf file from the WINAVR package over the original files in the Arduion tree.

Tried the different programmer types:

a) avrisp

result is an error:

avrdude.exe: stk500_program_enable(): protocol error, expect=0x14, resp=0x50
avrdude.exe: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

b) avrisp2

it seems to get endless timeouts.I killed the avrdude process.

c) avrispv2

same time outs

d) arduino

avrdude.exe: Expected signature for ATMEGA8 is 1E 93 07
avrdude.exe: Device signature = 0x1e9406
Double check chip, or use -F to override this check.
avrdude.exe: Send: Q [51]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [10]
avrdude.exe done.  Thank you.

d 1) I switched the device type to Mega168, which is the chip on the Arduino board, selected an existing file as output with fixed format “intel hex” . And it got no errors. I’m totally confused, no signature mismatch. But what did I read ? The flash of my mega8 target (what I wanted to) or the memory of my Arduino board, which sits in between and should be transparent ?

The downloaded file shows code at the beginning and at the end. But my mega8 is fabric new, there shouldn’t be anything. I assume this is the flash of the mega168 on the Arduino. The mega ISP at the start and the bootloader at the end. That is totally wrong and not what I wanted :-(

e) switch back to mega 8

programmer AVR910

It said it found a programmer but the type was not identified neither was the list of supported devices.

avrdude.exe: Recv: . [15]
Found programmer: Id = ""; type = 
Software Version = .

f) stk500

again timeouts

avrdude.exe: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude.exe: Recv: . [15]
avrdude.exe: Recv: . [15]
avrdude.exe: Recv: . [15]
avrdude.exe: Recv:
avrdude.exe: stk500_2_ReceiveMessage(): timeout

g) stk500V1

The start is not too bad

D:\Programme\arduinoIDE\hardware\tools\avr\bin\avrdude.exe -C D:\Programme\arduinoIDE\hardware\tools\avr\etc\avrdude.conf -p m8 -P com5 -c stk500v1 -v -v -v -v  -b 19200 -U flash:r:E:\xxx.hex:i
avrdude.exe: Version 5.10, compiled on Jan 19 2010 at 10:45:23
 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
 Copyright (c) 2007-2009 Joerg Wunsch
 System wide configuration file is "D:\Programme\arduinoIDE\hardware\tools\avr\etc\avrdude.conf"
 Using Port                    : com5
 Using Programmer              : stk500v1

 Overriding Baud Rate          : 19200
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [10]
 AVR Part                      : ATMEGA8
 Chip Erase delay              : 10000 us
 PAGEL                         : PD7
 BS2                           : PC2
 RESET disposition             : dedicated
 RETRY pulse                   : SCK
 serial program mode           : yes
 parallel program mode         : yes
 Timeout                       : 200
 StabDelay                     : 100
 CmdexeDelay                   : 25
 SyncLoops                     : 32
 ByteDelay                     : 0
 PollIndex                     : 3
 PollValue                     : 0x53
 Memory Detail                 :

 .......

 Programmer Type : STK500
 Description     : Atmel STK500 Version 1.x firmware
avrdude.exe: Send: A [41] . [80]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [02]
avrdude.exe: Recv: . [10]
avrdude.exe: Send: A [41] . [81]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [01]
avrdude.exe: Recv: . [10]
....
 Hardware Version: 2
 Firmware Version: 1.18
 Topcard         : Unknown
avrdude.exe: Send: A [41] . [84]   [20]
....
 Vtarget         : 0.0 V
 Varef           : 0.0 V
 Oscillator      : Off
 SCK period      : 0.1 us

....
avrdude.exe: Send: E [45] . [05] . [04] . [d7] . [c2] . [00]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [10]
avrdude.exe: Send: P [50]   [20]
avrdude.exe: Recv:
avrdude.exe: stk500_program_enable(): protocol error, expect=0x14, resp=0x50
avrdude.exe: initialization failed, rc=-1
 Double check connections and try again, or use -F to override
 this check.

avrdude.exe: Send: Q [51]   [20]
avrdude.exe: Recv:
avrdude.exe: stk500_disable(): protocol error, expect=0x14, resp=0x51

avrdude.exe done.  Thank you.

But finally it fails. Too bad

h) stk500V2

again timing out

Now I’m totally confused. Have to check the web to find the missing link. I guess I’m making assumptions that are wrong.

To be continued ….

Advertisements
One Comment

Trackbacks & Pingbacks

  1. making it work « Just tinkering Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: