arduino software sketches without arduino hardware

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.

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

Thanks for your response. will you kindly explain the steps...
I have already viewed the pages but they either use an arduino board or a boot-loader preloaded atmega chip. so they are of no help to me. :frowning:

http://tutorial.cytron.com.my/2011/09/30/how-to-program-arduino-by-using-avr-usbasp-programmer/

I have a fresh atmega8 chip (I can get an atmega328 if needed), usbasp, arduino software1.0.3 & a will to learn the arduino language.

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

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.

If you turn on verbose output you'll get some more debugging information and the location of the HEX file the IDE generates.

Thank you sir.

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.

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

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

Thanks Osgeld
:slight_smile: