Pages: [1] 2   Go Down
Author Topic: Arduino Mini 04 with ATmega328  (Read 9158 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just received an Arduino mini 04 with an ATmega328 (instead of an ATmega168) from Sparkfun and I am having issues uploading sketches to the board.  I have selected Arduino Mini as my board and have selected the correct COM Port.  I have wired the mini USB extension adapter and board according the guide here: http://arduino.cc/en/Guide/ArduinoMini  I am getting power to the arduino mini 04 board no problem. 
I tried to upload the Blink example sketch it continues to say "Uploading to I/O Board..."  and never finishes uploading even after 20 minutes.  I am running the latest Arudino 0022 onn a windows 7 machine.  Anyone have any idea why it stalls during the upload?
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 207
Posts: 12901
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hold down the Shift key when you click the Upload button.  What shows up in the output / status window?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

C:\Users\me\Documents\Arduino\arduino-0022\hardware/tools/avr/bin/avrdude -CC:\Users\me\Documents\Arduino\arduino-0022\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega168 -cstk500v1 -P\\.\COM6 -b19200 -D -Uflash:w:C:\Users\me\AppData\Local\Temp\build5884620712314103115.tmp\Blink.cpp.hex:i


avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "C:\Users\me\Documents\Arduino\arduino-0022\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM6
         Using Programmer      : stk500v1
         Overriding Baud Rate  : 19200
avrdude: ser_open(): setting dtr


And thats is nothing else it still says uploading to I/0 Board.  Does it think the mini is has a ATmega 168? would that cause an issue because the mini 04 I have has an ATmega328
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 207
Posts: 12901
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Does it think the mini is has a ATmega 168?

That isn't the problem.  AVRDUDE isn't reaching the microcontroller.  You could have a Motorola 68000 processor on the other end and the symptom would be the same.

Quote
avrdude: ser_open(): setting dtr

Looks like AVRDUDE is getting stuck in the kernel driver.  I can think of two things to try...

1. Ensure you are using the latest drivers for the "mini USB extension adapter"

2. Different USB cable
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I seem to have the same issue.  I also purchased a Mini from Sparkfun and the chip is a 328.  I have tried every trick I could find on these forums and nothing seems to work.

I have circuit with a reset button...I tried to time the reset...
I have an interface with the DTR line of the Mini USB adapter (newest version).  ( I copied off the the Nano schematic)  This does work because the indication LED blinks 3 times when I hit upload in the IDE.

No dice...

My circuit:



When I try to upload a sketch I always get the same output as everyone else with Mini upload problems:

"Binary sketch size: 2180 bytes (of a 14336 byte maximum)
C:\Program Files (x86)\arduino-0022\hardware/tools/avr/bin/avrdude -CC:\Program Files (x86)\arduino-0022\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega168 -cstk500v1 -P\\.\COM4 -b19200 -D -Uflash:w:C:\Users\saec-kv\AppData\Local\Temp\build6545575129176962314.tmp\AnalogInput.cpp.hex:i

avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "C:\Program Files (x86)\arduino-0022\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM4
         Using Programmer      : stk500v1
         Overriding Baud Rate  : 19200
avrdude: ser_open(): setting dtr
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x20
avrdude: Send: Q [51]   [20]
avrdude: Recv:
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0xcc

avrdude done.  Thank you."


Also, after the board is reset, it does the 3 quick LED flashes to state that the bootloader is running.  After a couple more seconds the LED will flash one time, with a longer on duration, and then is sends via serial the following error message:

"ERROR:pin 2-3"  I cannot find any documentation of where this error message comes from.  I have combed the source code for the bootloaders, avrdude, and anything else I can find.  Nothing...

Lastly,

I tried to re-burn the bootloader as a normal Mini (168) and I get this error message:

avrdude: Expected signature for ATMEGA168 is 1E 94 06
         Double check chip, or use -F to override this check.



Sorry for the long post.

Any Ideas?

~Matt

Logged

0
Offline Offline
Shannon Member
****
Karma: 206
Posts: 12164
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Mini 04 needs the reset button pressed when you upload in my experience.  If it has a 328 then try the Pro Mini 328 5V setting for the board.  Or the duemilanova - so long as the processor and clock speed match it ought to work.
Logged

[ I won't respond to messages, use the forum please ]

Netherlands, Arnhem
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Has anyone worked this one out yet?

I seem to have the same problem: arduino mini4 with AtMega 28p

I use the setup as described in: http://arduino.cc/en/Guide/ArduinoMini with the usb adapter also (old version_ so different from the example_ could this affect something?)

and after resetting, the led connected to pin13 flashes 3 times, and when i press upload (also tried different timing etc.) it says:

avrdude: stk500_getsync(): not in sync: resp=0x20
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0xc)

also tried different serial ports and different boards / combinations  in the tools menu but nothing seems to work
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Same problem

however i did notice the arduino is constantly sending 4 byte messages

captured over 5 seconds:

F5   B2   52   FA      F5   86   52   FA      F5   86   52   FA      F5   86   22   FA      F5   B6   52   FA      F5   86   52   FC      F5   86   52   FA      F5   86   52   FA      F5   86   52   FA      F5   86   52   FA      49   86   52   FA      F5   86   52   FA      F5   B1   52   FA      F5   86   22   FA      F5   86   22   FA      F5   86   52   FA      F5   A6   52   FA      F5   86   52   FA      F5   B1   52   FA   F5   86   52   FA
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

anyone got a solution yet ?
Logged

Versailles France
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

sparkfun mini usb  + Sparkfun arduino mini ( with AT328 and unknowed bootloader ) : same issue, same results...
I have looked carefully on arduino pro 5V to apply the same schematic ( reset , supply , DTR connection ) on these arduino mini .
I use arduino software with arduino pro 5V  16 Mhz setting : upload start..and nothing append.
Next step : upload bootloader from arduino software, and try again. I'm waiting my tinyusb board.I have choosed these Sparkfun solution to have efficienty hardware solution : it is not : A lot of time loosed...

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I finally got it to work:

So I returned the Arduino 04 mini and received arduino mini pro and had the same problem.  Then I thought it was the usb adapter so I ordered a the FTDI Basic Breakout - 5V.  Same problem same errors.

avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: Send: Q [51]   [20]
avrdude: Recv:
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

avrdude done.  Thank you.

Then I tried a different computer running windows XP and it worked!  It still does not work on the 64 bit windows 7 for some reason.  Both machines were using Arduino 0022.  I could also be a driver issue, but I did try updating the drivers for the USB breakout board at some point and it didn't help. 


Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Weird. I tried win xp but wihtin a vmware. I'll reinstall win xp on my test rig and give it a try
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everybody

Same problem here. Tried it on Mac OS X 10.6.7 and Windows XP (fresh installation).

Using:
-Arduino Mini 04 with ATmega328
-Arduino Serial USB Board (connected like showed in the guide)
-Arduino SW 0022           
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 101
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Same here. Any solutions?
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Problem solved!

Add the following lines to boards.txt:

Code:
mini328.name=Arduino Mini with ATmega328

mini328.upload.protocol=stk500
mini328.upload.maximum_size=28672
mini328.upload.speed=115200

mini328.bootloader.low_fuses=0xff
mini328.bootloader.high_fuses=0xd8
mini328.bootloader.extended_fuses=0x05
mini328.bootloader.path=bt
mini328.bootloader.file=ATmegaBOOT_168_atmega328.hex
mini328.bootloader.unlock_bits=0x3F
mini328.bootloader.lock_bits=0x0F

mini328.build.mcu=atmega328p
mini328.build.f_cpu=16000000L
mini328.build.core=arduino

Now you can select your board "Arduino Mini with ATmega328". Do a reset 1 second before upload.
Logged

Pages: [1] 2   Go Up
Jump to: