Go Down

Topic: Need help with AVR Programmer from MDFLY (Read 4973 times) previous topic - next topic

CrossRoads

Jul 21, 2011, 01:49 am Last Edit: Jul 21, 2011, 02:08 am by CrossRoads Reason: 1
Hey gang,
I have this inexpensive  AVR Programmer for Atmel chips.
I downloaded the Windows driver & installed it okay
http://www.mdfly.com/index.php?main_page=product_info&cPath=5_6&products_id=415

My question is - how do I use it?
The pins are MOSI, NC, RST, SCK, MISO on the top,
and VCC, GND, GND, GND, GND on the bottom.

Can I cable this up to the ICSP connector on a Duemilanove?
Or does it need to go to the same pins on a standalone board?

And then select something under the -0022 IDE menu?

I tried this approach
http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html
It has some issues with Windows Vista SP2  - the read boxes don't populate, altho the message boxes seem to have the correct info.
The Write-Verify seems to finish, altho it just stops when done with no messages.
Can't upload a sketch afterwards, get the common 'can't sync' 0014/0051 error message.

My end goal is to be able to download bootloader & sketch into a '1284P.
Thanks
Robert

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

No help at all?  Really?
I tried plowing ahead, selecting "AVR ISP" as the bootburning tool. Didn't work.
Comes back with "Error while burning bootloader.

avrdude: stk500_getsync(): not in sync: resp=0x30
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51"

Did manage to get something programmed in using bitbanging. I think the -0021
ATmegaBOOT_168_atmega328.hex . Every ten seconds the D13 LED turns on for 1 second.

But when I try and download, there is some hopeful looking flickering, then a long pause with no lights, and then
Binary sketch size: 1018 bytes (of a 30720 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Coding Badly

Quote
I tried plowing ahead, selecting "AVR ISP" as the bootburning tool. Didn't work.


AVRDUDE has a "usbasp" programmer type.  I have no idea if that is or is not important but, just in case, add this to programmers.txt ...

[font=Courier New]usbasp.name=MDFLY
usbasp.protocol=usbasp[/font]


...then try to use the "MDFLY" programmer to burn a bootloader.

CrossRoads

Thanks very much Coding.
I updated programmers.txt.
MDFLY showed up in the list -IDE reported "Done burning boatloader". That was a big improvement. Nice once a second blink from L.
Removed the programmer to ISP connections, installed the regular USB cable: and sketch still won't upload.
WIll try another chip, board tomorrow, and -0022. I need to get go bed.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

Hi Coding B,
Too hot too think last night, didn't get anything done.
Heading home earlier today, hopefully will make some progress!
Going to visit skyjumper tomorrow to start board assembly also.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Coding Badly


Hi CrossRoads,

So our Texas weather has reached you?

My neighbor, who knows nothing about predicting the weather, has become a phenomenal sage.  Last night he predicted we would have a 100 degree sunny day followed by an 80 degree clear night.  So far, he's made a perfect prediction.  I suppose, when every day for weeks has been exactly the same, it's not too difficult to figure out what tomorrow will bring.  To add insult to injury, we've been hankerin' to travel north to South Dakota but the weather there has been exactly the same as here.  I haven't been able to solder in weeks.  Dripping sweat keeps getting in the way!

I'll do what I can to help with the MDFLY.

Good luck with the boards!  I hope it goes well!

CrossRoads

Oh, 103F at Logan airport on the coast.
Supposed to cool down to 80s by 9PM.
I moved my stuff down to the basement, getting ready to try burning/downloading again.

Thanks on the boards.  I bought some +3.0 reading glasses on the way home to use as magnifiers.

Skyjumper having a problem with his Rev 2 board - parts all soldered on, getting 34 ohm from +5 to Gnd, will see if I can help him with that also.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

Ok, -0021, AVRISP reports "done burning bootloader" holding shift key does not verbose, so no insight.
Something seems to have gone in, L flashes once a second, maybe 1/10 of a second?
Loading blink sketch, get this:
Quote

Binary sketch size: 1010 bytes (of a 30720 byte maximum)
C:\Program Files\Arduino-0021\hardware/tools/avr/bin/avrdude -CC:\Program Files\Arduino-0021\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P\\.\COM10 -b57600 -D -Uflash:w:C:\Users\Owner\AppData\Local\Temp\build1389059892978748722.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:\Program Files\Arduino-0021\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM10
         Using Programmer      : stk500v1
         Overriding Baud Rate  : 57600
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=0x00
avrdude: Send: Q [51]   [20]
avrdude: Recv:
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

avrdude done.  Thank you.


Now with -0022:
Quote

Binary sketch size: 1018 bytes (of a 30720 byte maximum)
C:\Program Files\Arduino-0022\hardware/tools/avr/bin/avrdude -CC:\Program Files\Arduino-0022\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P\\.\COM10 -b57600 -D -Uflash:w:C:\Users\Owner\AppData\Local\Temp\build2061167065673453097.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:\Program Files\Arduino-0022\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM10
         Using Programmer      : stk500v1
         Overriding Baud Rate  : 57600
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=0x00
avrdude: Send: Q [51]   [20]
avrdude: Recv:
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

avrdude done.  Thank you.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

Not much documentation for the programmer. Has a jumper on it:
but no description

Description: This compact USB programmer is specially designed for Atmel AVR controllers. It is based on USBasp design and will work under multiple platforms, Linux, Mac OS and Windows. For more details, you can visit USBasp website.

Features:
Programming speed is up to 5KB/sec   << should this be a concern? Or a typo?
SCK option to support targets with low clock speed (< 1,5MHz)
Powered by USB
Standard 10-pin ISP connector
Compact design


Supported Devices:

AT Tiny Series?

ATtiny12 ATtiny13 ATtiny15 ATtiny25 ATtiny26
ATtiny45 ATtiny85 ATtiny2313

AT90 Series:

AT90S1200 AT90S2313 AT90S2333 AT90S2343 AT90S4414
AT90S4433 AT90S4434 AT90S8515
AT90S8535

ATMega Series?

ATmega8 ATmega48 ATmega88 ATmega168 ATmega328   << 328 is there
ATmega103 ATmega128 ATmega1280 ATmega1281 ATmega16
ATmega161 ATmega162 ATmega163 ATmega164 ATmega169
ATmega2560 ATmega2561 ATmega32 ATmega324 ATmega329
ATmega3290 ATmega64 ATmega640 ATmega644 ATmega649
ATmega6490 ATmega8515 ATmega8535

Documents (links)
AVRDUDE
Khazama AVR Programmer
Windows Driver
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

#9
Jul 23, 2011, 01:25 am Last Edit: Jul 23, 2011, 01:35 am by CrossRoads Reason: 1
avrdude 5.4 being used.
I see 5.10 is now out.

Schematic - J1 only seems to be used to power the board being programmed.
I don't see a J2, J3 (pad, traces, nothing), and R8 is not installed. Nor C4, sothis is not the correct shematic.

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

Alright, went to straight bit-bang method wih avrdude-GUI.
Give it erase-write-verify, L LED stays on a lot, no indication one way or the other that it passed or failed when the green bar completese. L changes to  3 quick flashes once a second with -0021 Optiboot_atmega328.hex.
Still won't take a sketch, goes back to 3 quick flashes afterwards.
Quote

Binary sketch size: 1030 bytes (of a 30720 byte maximum)
C:\Program Files\Arduino-0021\hardware/tools/avr/bin/avrdude -CC:\Program Files\Arduino-0021\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P\\.\COM10 -b57600 -D -Uflash:w:C:\Users\Owner\AppData\Local\Temp\build1231048727372032217.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:\Program Files\Arduino-0021\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM10
         Using Programmer      : stk500v1
         Overriding Baud Rate  : 57600
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=0x00
avrdude: Send: Q [51]   [20]
avrdude: Recv:
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

avrdude done.  Thank you.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

Same behavior with -0022 Optiboot_atmega328, and then a sketch
Quote

Binary sketch size: 1058 bytes (of a 30720 byte maximum)
C:\Program Files\Arduino-0022\hardware/tools/avr/bin/avrdude -CC:\Program Files\Arduino-0022\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P\\.\COM10 -b57600 -D -Uflash:w:C:\Users\Owner\AppData\Local\Temp\build8830200800411043262.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:\Program Files\Arduino-0022\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM10
         Using Programmer      : stk500v1
         Overriding Baud Rate  : 57600
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=0x00
avrdude: Send: Q [51]   [20]
avrdude: Recv:
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

avrdude done.  Thank you.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

OK! Seem to have a combination that works.
S/N CBO807 Duemilanove, -0022 optiboot_atmega328, MDFLY boot loaded, accepts new sketches.
S/N N0251 Duemilanove, -0022 optiboot_atmega328, MDFLY boot loaded, accepts new sketches.

However, ATMega328, call it #3, goes thru the motions, lights flash, but won't take a sketch. Think I have a bad chip - two others program ok using the same method.

So, I think I'm ready to tackle a 1284 next!
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up