Pages: [1]   Go Down
Author Topic: Programming an Atmega328 without Arduino  (Read 1883 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 55
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I used the arduino to create a program and then I installed the atmega328 in a curcuit that I built. I soldered the atmega directly to the board so I have to use a parallel programmer to put in a new updated program.

I built this parallel programmer to use with it and I have an in circuit programming port. I saved the PDE file and then I accessed the .HEX file in the applet, but I am not sure what the best way to go about getting the hex file onto the atmega is. If someone has some info on this please let me know. I downloaded winAVR, but I'm not sure if that is what I need.

Thanks for any advice,
Jeremy
« Last Edit: May 12, 2010, 03:53:27 pm by jman31 » Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 55
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Anyone?
Logged

Offline Offline
Edison Member
*
Karma: 3
Posts: 1001
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When working with an external programmer - you create a new entry in "boards.txt" which redirect upload to your programmer (rather than the Arduino bootloader). Once you selet this board (properly configured) you can upload directly through the Arduino IDE.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 55
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks BenF for the direction...

So change:

atmega328.upload.protocol=stk500
atmega328.upload.maximum_size=30720
atmega328.upload.speed=57600
atmega328.bootloader

To:

Parallel Programmer
parallel.protocol=dapa
parallel.force=true
# parallel.delay=200

Am I getting that right? I took that second set of commands from the "programmers.txt" file.

« Last Edit: May 13, 2010, 06:39:24 am by jman31 » Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 55
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried instead to change the "preferences.txt" file. I know I need to change the "upload.using=" line to one of the programmers in my "programmers.txt" file.

Here is my programmers.txt file. Can someone please explain to me the proper syntax to get this to work with the parallel programmer found HERE?.

avrisp.name=AVR ISP
avrisp.communication=serial
avrisp.protocol=stk500v1

avrispmkii.name=AVRISP mkII
avrispmkii.communication=usb
avrispmkii.protocol=stk500v2

usbtinyisp.name=USBtinyISP
usbtinyisp.protocol=usbtiny

parallel.name=Parallel Programmer
parallel.protocol=dapa
parallel.force=true
# parallel.delay=200

arduinoisp.name=Arduino as ISP
arduinoisp.communication=serial
arduinoisp.protocol=stk500v1
arduinoisp.speed=19200
« Last Edit: May 13, 2010, 10:02:50 am by jman31 » Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 55
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, I am slowly working this out. I added this to the programmers.txt file:

parallel.name=Parallel Programmer
parallel.protocol=stk200
parallel.force=true
parallel.delay=20

and changed the preferences.txt file to "upload.using=parallel"

Now it is trying to write the file but it gives me an error and says ""Wrong microcontroller found. Did you select the right board ..."

I have selected the correct board, so that can't be it. I also have the IC powered up with 5v so that shouldn't be a problem.

Any suggestions?
Thanks
Jeremy
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 55
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Anyone else have this problem? I wonder if I am using the wrong sytax still. Any suggestions? :-/
Logged

Pages: [1]   Go Up
Jump to: