Offline
Jr. Member
Karma: 1
Posts: 95
Tinkerer
|
 |
« on: February 24, 2013, 05:03:40 pm » |
hello,
I am a newbie in avr series microcontrollers. I am learning how to write code & burn microcontroller via avrstudio & usbasp serial programmer. I want to learn the arduino language to upload my own sketches to atmega8 & use it in specific boards for embedded projects. I have the arduino software & a usbasp serial burner(6pins)
is there any way to upload sketches directly to the atmega8 via the usbasp? or is there any way to get the arduino software generated hex file, so that I can burn it via extremeburner & usbasp?
kindly help.
|
|
|
|
|
Logged
|
“Being ignorant is not so much a shame, as being unwilling to learn.”
― Benjamin Franklin.
|
|
|
|
SE USA
Offline
Faraday Member
Karma: 33
Posts: 3621
@ssh0le
|
 |
« Reply #1 on: February 24, 2013, 06:19:22 pm » |
yes you can change boards.txt for your MCU to use AVRISP or USBASP to upload direct from the IDE or the hex file is usually stuffed away in a temp folder somewhere
exactly where is dependent on your OS
|
|
|
|
|
Logged
|
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL
|
|
|
|
|
|
SE USA
Offline
Faraday Member
Karma: 33
Posts: 3621
@ssh0le
|
 |
« Reply #3 on: February 24, 2013, 07:05:53 pm » |
well if you want to just upload through the IDE what you would do is find the boards.txt file (on my computer its under C:\Users\user\Desktop\arduino-1.0\hardware\arduino) edit it with something like notepad ++ or wordpad if your in the windows world, finding a section that looks like ##############################################################
atmega8.name=Arduino NG or older w/ ATmega8
atmega8.upload.protocol=arduino atmega8.upload.maximum_size=7168 atmega8.upload.speed=19200
atmega8.bootloader.low_fuses=0xdf atmega8.bootloader.high_fuses=0xca atmega8.bootloader.path=atmega8 atmega8.bootloader.file=ATmegaBOOT.hex atmega8.bootloader.unlock_bits=0x3F atmega8.bootloader.lock_bits=0x0F
atmega8.build.mcu=atmega8 atmega8.build.f_cpu=16000000L atmega8.build.core=arduino atmega8.build.variant=standard and change atmega8.upload.protocol=arduino to atmega8.upload.protocol=usbasp now if your chip is hooked up right when you hit upload in the ide it should go though the usbasp to program the atmega target
|
|
|
|
|
Logged
|
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL
|
|
|
|
Offline
Jr. Member
Karma: 1
Posts: 95
Tinkerer
|
 |
« Reply #4 on: February 24, 2013, 08:05:43 pm » |
I have made the exact changes that you suggested. I am gettting the following error while uploading a sketch via usbasp.
========================================================== Binary sketch size: 914 bytes (of a 7,168 byte maximum) avrdude: error: programm enable: target doesn't answer. 1 avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check. ==========================================================
|
|
|
|
|
Logged
|
“Being ignorant is not so much a shame, as being unwilling to learn.”
― Benjamin Franklin.
|
|
|
|
Austin, TX
Offline
Faraday Member
Karma: 41
Posts: 5171
CMiYC
|
 |
« Reply #5 on: February 24, 2013, 09:23:10 pm » |
If you turn on verbose output you'll get some more debugging information and the location of the HEX file the IDE generates.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 1
Posts: 95
Tinkerer
|
 |
« Reply #6 on: February 25, 2013, 09:07:00 am » |
Thank you sir.
|
|
|
|
|
Logged
|
“Being ignorant is not so much a shame, as being unwilling to learn.”
― Benjamin Franklin.
|
|
|
|
Offline
Jr. Member
Karma: 1
Posts: 95
Tinkerer
|
 |
« Reply #7 on: February 26, 2013, 05:11:52 am » |
I am trying to write the arduino bootloader hex file (ATmegaBOOT_168_atmega328.hex) in a fresh Atmega328 chip. When I load the hex file in the extremeburner software, the hexfile shows only FFFF. The hexcode is full of FFFF codes, no other hex number is there. Is it ok or is there any issues in the hex file...? Kindly explain the issue.
|
|
|
|
|
Logged
|
“Being ignorant is not so much a shame, as being unwilling to learn.”
― Benjamin Franklin.
|
|
|
|
Offline
Jr. Member
Karma: 1
Posts: 95
Tinkerer
|
 |
« Reply #8 on: February 26, 2013, 05:48:09 am » |
In file included from sketch_feb26a.ino:2: C:\Program Files\arduino-1.0.3\hardware\arduino\cores\arduino/Arduino.h:213:26: error: pins_arduino.h: No such file or directory
What to do...?
|
|
|
|
|
Logged
|
“Being ignorant is not so much a shame, as being unwilling to learn.”
― Benjamin Franklin.
|
|
|
|
SE USA
Offline
Faraday Member
Karma: 33
Posts: 3621
@ssh0le
|
 |
« Reply #9 on: February 26, 2013, 07:56:21 pm » |
that file should be in
(arduino location)\hardware\arduino\variants\standard
if it IS, it should be picking it up in the environment variables, what you could do is copy and paste it into
(arduino location)\hardware\arduino\cores\arduino
though I dont know what kind of greif that will cause you in the future with other arduinos (ie arduino mega), but maybe a quick fix for now
|
|
|
|
|
Logged
|
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL
|
|
|
|
Offline
Jr. Member
Karma: 1
Posts: 95
Tinkerer
|
 |
« Reply #10 on: February 27, 2013, 05:39:31 am » |
Thanks Osgeld 
|
|
|
|
|
Logged
|
“Being ignorant is not so much a shame, as being unwilling to learn.”
― Benjamin Franklin.
|
|
|
|
|