Go Down

Topic: Arduino ISP help (Read 1 time) previous topic - next topic

Hello! I bought this devicehttp://www.ebay.com/itm/271083240932?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649 on ebay and managed to programm ATTiny2313 using Arduino IDE.
How do I write on ATTiny2313 a hex file that I have already?
Thanks! :~

Erni

#1
Apr 25, 2013, 01:17 pm Last Edit: Apr 25, 2013, 01:29 pm by Erni Reason: 1
You can use avrdude from a commandline.

This line will upload blink.hex to a t2313:

avrdude -p attiny2313 -c stk500v1 -P COM3 -b19200 -Uflash:w:Blink.hex:i

If you enable verbose output in the Arduino IDE, you will se a line similar to the above.

An avrdude tutorial can be found here:

http://www.ladyada.net/learn/avr/avrdude.html

I installed WinAVR ... after restart I put in C :/ Windows folder code.hex file.
I connected the Arduino to the computer on COM3 - I installed Arduino1.0.3 and I uploaded ArduinoISP from Examples.
I disconnected the Arduino from the computer and I installed AVR Programmer bought on Ebay .
I uploaded blink of examples / basics and works - LED conected on pin 7  blinks
Then I typed Run - cmd - avrdude-p-c ATTiny2313 stk500v1-P COM3-b19200-Uflash: w: code.hex: ENTER and I got the error in the picture attached here
Please help me with a step by step tutorial :(

proto-pic

Hi - You need to use an external program - you may want to have a look for AVRDUDE (its in the arduino folder under \hardware\tools\avr\bin) - and a copy of avrdude.conf (found in hardware\tools\avr\etc)

To make things easier, I recommend finding a GUI - I use the one attached (from yuki-lab.jp) - there are many posts here, and on other sites to add support for other AVRs if required to avrdude. The programmer you should use is 'Arduino' - Hope this helps.


Drew
Engineering Support team for Proto-PIC.co.uk

Proto-Pic

Erni

#4
Apr 25, 2013, 05:36 pm Last Edit: Apr 25, 2013, 05:40 pm by Erni Reason: 1
Are you sure your programmer is connected to COM3 (look in your Arduino IDE tools)?
To test your connection try this:

avrdude -p attiny2313 -c stk500v1 -P COM3 -b19200 -v

and remember to change COM3 to whatever you are using

You could try to use arduino as programmer as proto-pic mentions like this

avrdude -p attiny2313 -c arduino -P COM3 -b19200 -v


I used these settings for the avrdude-GUI and when I press the Write or Erase-Write-Verify gives me this error
I wrong somewhere?  :(

Erni

I can see that you are vstill using COM3.

Did you veriy that ths is the correct port ?

spycatcher2k

Hi - Don't click display window - it's a bug
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

hiduino

You need to specify the baud rate to avrdude.

Add this to the Command line Option window.
Code: [Select]

-b19200



Docedison

@ catcher.. What's a bug? and what happens...?
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

hiduino

The GUI doesn't work correctly when the "Display Window" box is checked when Flash reading or writing.  For some reason it has trouble with the Windows file paths.  Works fine with the box unchecked.


Docedison

OK and Thank you in advance... Tinys have become very interesting to me...
Found this programmer (PCB) http://www.insidegadgets.com/projects/attiny-programmer-adapter/
$4.00 for a bare PCB and it looks Nice... Too.

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Docedison

Instructions with the GUI?... I "lost it" after I downloaded it..

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

We succeeded! :)
I tell you how I did it.
1. I created a Windows Batch File with the following instructions:
2. I put the batch file (in my case main.bat) and main.hex in the same folder.
3. We connected Arduino ISP programmer mounted on COM3.
4. We executed main.bat and ready

How to erase the chip now ?

Erni

From the tutorial:

Quote
-e: This erases the chip, in general we don't use this because we auto-erase the flash before programming.


so something like this:

avrdude -p attiny2313 -c stk500v1 -P COM3 -b19200 -e

Go Up