Pages: [1] 2   Go Down
Author Topic: Arduino ISP help  (Read 1017 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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! smiley-confuse
Logged

Denmark
Offline Offline
Edison Member
*
Karma: 35
Posts: 1029
Happy Hobbyist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: April 25, 2013, 06:29:58 am by Erni » Logged

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

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 smiley-sad
Logged

Scotland
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Proto-PIC Technical Support Team
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

* avrdude-GUI.zip (11.78 KB - downloaded 12 times.)
Logged

Engineering Support team for Proto-PIC.co.uk

Proto-Pic


Denmark
Offline Offline
Edison Member
*
Karma: 35
Posts: 1029
Happy Hobbyist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

« Last Edit: April 25, 2013, 10:40:34 am by Erni » Logged

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

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?  smiley-sad
Logged

Denmark
Offline Offline
Edison Member
*
Karma: 35
Posts: 1029
Happy Hobbyist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I can see that you are vstill using COM3.

Did you veriy that ths is the correct port ?
Logged

Scotland
Offline Offline
God Member
*****
Karma: 11
Posts: 988
Have you had your Arduino fix today?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi - Don't click display window - it's a bug
Logged

Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

Wahiawa, Hawaii
Offline Offline
God Member
*****
Karma: 27
Posts: 582
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to specify the baud rate to avrdude.

Add this to the Command line Option window.
Code:
-b19200

Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 44
Posts: 2808
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@ catcher.. What's a bug? and what happens...?
Logged

--> 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

Wahiawa, Hawaii
Offline Offline
God Member
*****
Karma: 27
Posts: 582
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 44
Posts: 2808
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

--> 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

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 44
Posts: 2808
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Doc
Logged

--> 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

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

We succeeded! smiley
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 ?
Logged

Denmark
Offline Offline
Edison Member
*
Karma: 35
Posts: 1029
Happy Hobbyist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1] 2   Go Up
Jump to: