How do I use usb to upload hex file created by avr studio

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi
In the past I have had many hours of satisfying project building using an atmega 8, assembled on a homemade breadboard and with a parallel port ponyprog programmer and using AVR studio.
Then I got distracted for a year or two and feeling the itch decided to see what was happening in the avr world. I discovered the Arduino system and bought an incredibly cheep duelamove compatible and did a few 'sketches' and all was well.
But I wanted to get back to assembler - so much more satifying and so much smaller code and so much faster... but my new whiz bang windows 7 computer (the old one turned up its toes) has no parallel port (or serial for that matter) - but hey we have usb, and thats what the arduino used so surely all would be well. Also I rather liked the use of a bootloader to download the flash program - since I always use the serial port to send debugging messages I could use this to update the flash and do away with isp bit banging.
You would think it would be easy the hard work has been done - but no try as I might I cant get my head around it. Now I know there is AVRDUDE and it comes with Winavr but - well its a command line thing for a start - and also although there is a GUI version it just wont work for me. In fact there does not seem to be a config file for the atmega 328p I am using.
Damn if I knew the protocol I might even write my own but I keep going round in circles.
Yes I have found this commandline to do the job but I'm reluctant to go down this route in this day and age - its not that I'm afraid of DOS like environment - its the need to change mindsets - its seems clunky somehow.

"avrdude -c arduino -p m328 -P usb -U flash:w:FILENAME"

I know how easy it is to mistype - a wrong letter and.......

Now I found a tutorial on this site all about bootloaders but I cant see it (I've added a post)

Am I missing something obvious?

Dave H

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Pretty well all the bootloaders use the UART, so you run into a similar problem that your PC will probably not have a COM port.
This is easily fixed by the multitude of USB-serial convertors available of e_bay. You won't even need to have a MAX202/232 on your board as some of the USB-serial convertors have TTL output.
You will need to have a programmer to start of with, to install the bootloader.
I have always used BLIPS when I have used bootloaders to upload code.

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just did a batch file and launch it as a tool in the avrstudio menu. Job done.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That is a good KISS approach! :)

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?