External programmer + ATMEGA8-16PU

Hello!

I've been doing some prototypes and there are a couple of projects I would like to assembly on their own, as standalones.

Locally, I can find this chip: ATMEGA8-16PU
Somewhat cheap and most important for me, available locally.

a) Can I use my sketch, and compile it in the ide and then use a programmer to get the .hex file into the chip?

b) If it's not compatible, which series should I look for (168 / 328 only)?

c) I haven't yet bought a programmer, apart from being compatible with the chip there's something else I should look for?

Thanks in advance.

Fran.

a) Can I use my sketch, and compile it in the ide and then use a programmer to get the .hex file into the chip?

b) If it's not compatible, which series should I look for (168 / 328 only)?

c) I haven't yet bought a programmer, apart from being compatible with the chip there's something else I should look for?

A. If you can get a hardware programmer that is supported by the Arduino IDE you can load a bootloader program by selecting the ATmega8 board from the tools/board selection. You will have to have a 16mhz crystal or resonator wired to your mega8 chip to be compatable with the Arduino platform

B. No, there is a board selection option that supports the mega8 chip.

C. Again if you get one that is supported by the Arduino IDE (I use the USBtinyISP) you can use the Arduino system to load bootloader and later upload sketches to your chips.

Lefty

Thank you retrolefty.

I have a hard time finding a supported programmer (other than parallel port, but my laptop has no parallel port!!).

So if I was to use the programmer from avrstudio, just have to check it's compatible with chip, right?

If you already have an Arduino, or else an ATmega that you can program normally (FTDI, USB, etc.), then you can use the Arduino as ISP programming option. I recently used it to program some ATmega644s. Here's a link:

Ah very nice!

So I will be able to skip purchasing a programmer then. Thank you very much for the link.

No problem. I was equally excited when I first tried it :). It did give me a few difficulties though (most of which were related to the Sanguino bootloader), but just be careful that you follow the instructions.

Locally, I can find this chip: ATMEGA8-16PU

a) Can I use my sketch, and compile it in the ide and then use a programmer to get the .hex file into the chip?

The Arduino environment does support the ATmega8, but there are a couple of differences that you might need to be aware of:

  1. The mega8 has less memory than the 168 or 328. A max of 8k of flash memory and 1k of RAM (same as 168 but 1/2 of the 328.) Some of the applications that people are writing now simply do not fit in a Mega8.
  2. Three less PWM outputs. You only have PWM on pins 9, 10, 11. in general, the mega8 has "different" timers than 168 or 328.
  3. I don't know whether the people writing libraries are still paying attention to mega8; assorted libraries might not work on it (In particular, the ones that use the timers...)

Hi, today I finally tried to burn the bootloader using this instructions:

(arduino + breadboard).

I'm using an oscillator instead of a crystal. Atmega168 on arduino and atmega8 on breadboard.

I get this:
Expected signature for ATMEGA8 is 1E 93 07
Double check chip, or use -F to override this check.

is it safe to use that -F oprtion?
what am I doing wrong?

I got that error for a while when I was programming some ATmega644s. Here's what I did:

  • Make sure the IDE is expecting the right frequency, and make sure that you're using the right speed of Oscillator.
  • Make sure the oscillator isn't connected by long wires. These long wires can cause interference, so put the oscillator as close as possible.
  • Make sure you've put everything on the right pins! It sounds obvious, but I had the oscillator on the wrong pins for a while
  • Ensure you've got a pullup resistor attached to reset. Another seemingly obvious thing, but just make sure
  • Ensure that all your wires are connected correctly.
  • Finally, make sure that you do in fact have an ATmega8 :).

Hi, I just double checked connections and chip, according to the scheme it's all set and ready.

The oscillator I'm using is 16.000, wires connecting it are 3.5 cm long. Resistor is in place. Atmega8-16PU is there.

The step I'm missing is this:
"Make sure the IDE is expecting the right frequency"

How do I do that?