Pages: [1]   Go Down
Author Topic: arduino software sketches without arduino hardware  (Read 721 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
****
Karma: 1
Posts: 343
YES! It is possible. Even Impossible Says I m Possible. :)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

"Imagination is more important than knowledge."
-Einstein

SE USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Offline Offline
Sr. Member
****
Karma: 1
Posts: 343
YES! It is possible. Even Impossible Says I m Possible. :)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley-sad

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


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

"Imagination is more important than knowledge."
-Einstein

SE USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Code:
##############################################################

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

Code:
atmega8.upload.protocol=arduino
to
Code:
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


Offline Offline
Sr. Member
****
Karma: 1
Posts: 343
YES! It is possible. Even Impossible Says I m Possible. :)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

"Imagination is more important than knowledge."
-Einstein

Austin, TX
Offline Offline
Faraday Member
**
Karma: 63
Posts: 6049
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Offline Offline
Sr. Member
****
Karma: 1
Posts: 343
YES! It is possible. Even Impossible Says I m Possible. :)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you sir.
Logged

"Imagination is more important than knowledge."
-Einstein

Offline Offline
Sr. Member
****
Karma: 1
Posts: 343
YES! It is possible. Even Impossible Says I m Possible. :)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

"Imagination is more important than knowledge."
-Einstein

Offline Offline
Sr. Member
****
Karma: 1
Posts: 343
YES! It is possible. Even Impossible Says I m Possible. :)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

"Imagination is more important than knowledge."
-Einstein

SE USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Offline Offline
Sr. Member
****
Karma: 1
Posts: 343
YES! It is possible. Even Impossible Says I m Possible. :)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Osgeld
smiley
Logged

"Imagination is more important than knowledge."
-Einstein

Pages: [1]   Go Up
Jump to: