Go Down

Topic: assembly program + avrdude gui + duemilanove (Read 2 times) previous topic - next topic

pcesar12

Hi Guys,

I have and Arduino Duemilanove Board (328P) and need to burn an assembly program in it.
It's an Led Blink program, and I already have the .hex file.
The problem is that everytime I try to burn it using the AVRdude it just doens`t work!
I tried every programmer (including the skt500v1, v2) and I`m selecting the right COM port.

When I use the Arduino Software everything works just fine, but I have to program it in Assembly (it's a work for graduation).

Help, please!

Thanks




Assembly Code:

.include   "m328Pdef.inc"

start:      

         SBI      DDRB,5


blink:              LDI      r20,250
         CALL       delay_n_ms
         SBI      PORTB,5
         LDI      r20,250
         CALL       delay_n_ms
         CBI      PORTB,5
         JMP       blink

.include   "delay_n_ms.h"

Erni

I don't have an Duemilanove, but on a Arduino Uno this uploads the blink328.hex file to the board. (the Uno connected via USB cabel)

avrdude -patmega328p -Pcom20 -carduino -D -U flash:w:blink328.hex:i


bperrybap

Run the IDE in verbose mode and you can see the
exact avrdude command that the IDE runs.

--- bill

AMPS-N

just install this programmer in to system select proper hex file directory and upload it .
AMPS

westfw

You're not using the same avrdude that Arduino uses.  And I don't see you specifying a COM speed, which is probably a good idea, since the duemilanove bootloader does not run at the same speed as the "real" stk500.  Add "-b57600" to the "command-line options window."  If that doesn't work, add "-v -v -v -v" and post the output again.

I would avoid the GUI interface to avrdude and just run it from the command line.  Just because I don't trust such things...

Go Up