Hi everyone!
Well after tons of "research" and a lot of failed attempts here i come to ask for help.
First I'll try to describe the problem as good as i can (Forgive my bad English, I'm from Argentina), and I'll accept any response or setup you guys recommend, consider me a total newbie on the Arduino subject so feel free to explain every last bit haha.
I'm currently trying to burn a "modified" bootloader on my ATMEGA8. Thing is I always get a "no response" "wrong signature" errors . I've tried so many methods i cant list them all, so i can't "provide an image of what I'm currently trying". I'll be more than glad to provide a picture of a recommended method.
So far I've tried this:
http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/comment-page-2/
This one seemed the optimal one, thing is when i try to upload the bootloader i get a no response error. This layout i can provide, I'm using an Arduino Severino ( http://arduino.cc/en/Main/ArduinoBoardSerialSingleSided3 ) (Built myself, it works perfectly, except that i had to remove the pin13 LED because it didint worked the first time and a lot of people suggested that and.. presto!) as an ISP to burn the bootloader that the blog suggest but to no avail.
Another good candidate, except they use the ATMEGA328 or ATMEGA168 and i dont know how to change the signature, or how to make it work on my ATMEGA8
"The real problem" A lot of people may wonder "Why Aoshido would you like to use a very very very old ATMEGA8 with his crappy internal oscillator" the thing is, i'm building a small project and i need to be able to program the chip, put it in a board with only a battery and the board components to work. Like a guy said in a thread that i read when i was looking for help...
I want to be able to program my big project, lets say turning a led on and off, make a board for that (Epoxy, a socket for the IC, a battery, a resistor and a led) and make it work.
Later, make another board, another program lets say 2 leds program the chip put it in the new board and also get it to work.
ANY Guidance would be greatly appreciated.
Anything that you need to further help me (Pictures, more data, whatever) please don't hesitate to ask, if i didn't provide something its because i don't really know!
Thanks a lot!
Aoshido:
2) "The real problem" A lot of people may wonder "Why Aoshido would you like to use a very very very old ATMEGA8 with his crappy internal oscillator"
There's nothing wrong with using that chip.
Aoshido:
the thing is, i'm building a small project and i need to be able to program the chip, put it in a board with only a battery and the board components to work.
ANY Guidance would be greatly appreciated.
My advice: Forget bootloaders, get an ISP programmer.
Hi, thanks for the help!
Thing is, i dont know how easy to get are those in argentina, and i rather not spend much (think that 1U$S is almost 8ARS) so a "10 bucks items" heres an 80$ item+ a lot of taxes :(.
Is there a way to build it, or to make a simpler one? or another way around it? By the way how does it works?
I have a bunch of ATmega8(L) chips, all programmed with an optiboot bootloader. If I want to make a very small project, I grab one and solder it directly onto a pcb proto board. I use a 4-pin header for RX,TX,DTR,GND to upload a sketch. The other components I need are: 10k from reset to Vcc; 100nF decoupling Vcc to GND; 100nF from reset to DTR.
The optiboot was created for the ATmega8, as you can read in that post. I used an USBasp programmer for that (very cheap on Ebay).
An extra board definition was added to boards.txt, since it is not a normal Arduino board.
To test the connections of a programmer (or Arduino as ISP) to an ATmega chip, you can use something like this: avrdude –c usbasp –p atmega8 -vvv
The -v shows extra information, the -vv more and the -vvv even more.
I have a bunch of ATmega8(L) chips, all programmed with an optiboot bootloader. If I want to make a very small project, I grab one and solder it directly onto a pcb proto board. I use a 4-pin header for RX,TX,DTR,GND to upload a sketch. The other components I need are: 10k from reset to Vcc; 100nF decoupling Vcc to GND; 100nF from reset to DTR.
The optiboot was created for the ATmega8, as you can read in that post. I used an USBasp programmer for that (very cheap on Ebay).
An extra board definition was added to boards.txt, since it is not a normal Arduino board.
Is there another way to upload the sketches? Like i said in a previous post, things like an USBasp programmer are no so easy to get here in Arg. Besides i'd like to use my arduino, or something easy to build. (If its possible!)
To test the connections of a programmer (or Arduino as ISP) to an ATmega chip, you can use something like this: avrdude –c usbasp –p atmega8 -vvv
The -v shows extra information, the -vv more and the -vvv even more.
Where do i put this commands? I'm not running it on linux, forgive my ignorance
It is not hard, but check the wiring very careful, it is easy to make a mistake.
This page has more explanation.
The avrdude is included in the Arduino software.
You could try openening a command (cmd) terminal and go to the folder.
It is located somewhere here: arduino-1.0.5/hardware/tools/avr/bin/avrdude.exe
Tutorial: AVR Tutorial - AVRDUDE
If your ATmega8 is already set to require an external clock, you cant reprogram it without providing one. Try using this version of the ArduinoISP sketch instead of the stock one:
I outputs a clock pulse on pin 9 of the Arduino you're using as a programmer, which you can connect to the xtal1 pin on the ATMega8 you're trying to program, so you can give it a clock if its expecting one.
This worked for me when I was trying to reprogram some ATMega8s that I thought were broken.
If you want to upload sketches without a bootloader, you don't need a dedicated ISP. You can use your Severino an an ISP as you are to upload the bootloader. You use it to upload sketches to the ATMega8 as detailed here: http://arduino.cc/en/Hacking/Programmer - you'll need to get the fuses set to run on the internal oscilator first though, and the easiest way to do that is probably to upload a bootloader, even if you won't use it.
its unfortunate many blame the internal clk accuracy for serial problems when its actually the 8mhz frequency that violates baud rate. ive seen many avr with 8mhz crystal fail at 115kbps. the truth is its easier to achieve reliable comms with slightly tweaked internal clk whereas using a crystal, at best of times, its right on the edge. bottom line: internal osc is more reliable than crystal under those conditions. and regarding stabilty youll see that internal osc variation is insignificant over practical temperature ranges.