# AVR ATMEGA8 connection on breadboard

#### mukesh1

Joined Mar 22, 2020
37
Hi all!, I have stand-alone AVR ATMEGAA8 microcontroller so I want program ATMEGA8 by placing all required component on a breadboard. I got some information on the google search. I drew a connection diagram

Programmer

1. Do I need external hardware to program ATMEGA8?
2. if Yes than What hardware will be needed ?
3. If No than Where to connect the 10 pins of the programmer ?
4. Can that programmer program ATMEGA8 Chip?
5. What should be the value of crystal ?

#### BobaMosfet

Joined Jul 1, 2009
1,208
@mukesh1
It's been abandoned by the creators, but nerdkits.com is all about the ATMEGA... you will find many tutorials and forum threads their for all things ATMEGA.

#### MrChips

Joined Oct 2, 2009
21,877
If you want to program an Atmel AVR chip directly get the Pocket AVR Programmer.

The crystal might not work on a solderless breadboard with stray capacitance on the breadboard.

#### DickCappels

Joined Aug 21, 2008
6,591
Use an inexpensive ARVISP programmer, available many places, including THIS ONE which is a pretty good re-issue of a very popular AVR programmer that is now out of production.

The CPU clock (crystal) frequency needs to be more than 1/4 the programmer's bit rate, so that depends a lot on the range of bit rates the programmer can generate. At power-on reset the ATMEGA8 defaults to the 1 MHz calibrated on-chip RC clock. You can almost certainly program it with the programming software in AVRStudio.

#### mukesh1

Joined Mar 22, 2020
37
If you want to program an Atmel AVR chip directly get the Pocket AVR Programmer.

The crystal might not work on a solderless breadboard with stray capacitance on the breadboard.
few doubts in mind

1. Can that programmer program ATMEGA8 Chip?
2. Do I need any external hardware to program ATMEGA8?
3. if Yes than What hardware will be needed?
4. If No than Where to connect the 10 pins of the programmer?

I have a crystal with value 22.1184 written on it. I found atmega8 has an internal crystal. if external crystal doesn't work on the breadboard, Can atmega8 be programmed using the internal crystal?

#### MrChips

Joined Oct 2, 2009
21,877
Atmel AVR chips do not have internal crystal. You do not need crystal to program or run Atmel AVR.
Atmel AVR which includes ATmega8 has internal RC oscillator.
Atmel AVR uses SPI for programming.

Beside Vcc and GND, you need to connect four signals between the ATmega8 and the AVR SPI Programmer:
MISO
MOSI
SCK
RST

#### DickCappels

Joined Aug 21, 2008
6,591
You can Google USBASP to find out more than that programmer. Yes it will program an ATMEGA8 (notice that ATMEGA8 is among those listed in the advertisement. Indeed, the little board has an ATMEGA8 on it and if you connect a programming cable between the two boards and install a "Program" jumper on one board and plug the other board into USB you can use one board to program the other.

I built one, found the executable code online and used it for a couple of years until the Mac OS stopped supporting the particular type of data transfer over USB the programmer uses to talk with its host.

The most common code for this programmer is supported by AVRDUDE and I understand the current release of AVRStudio.

For reference: https://www.fischl.de/usbasp/

You should also read through the MEMORY PROGRAMMING section of the ATMEGA8 datasheet to help make sure you have everything hooked up correctly and understand what's going on.

Incidentally this same programmer, right down to the silkscreen on the PCB can be bought on eBay for between
US2 $and US$3, including programming cable and international shipping.

#### mukesh1

Joined Mar 22, 2020
37
I am trying to make small development just for fun. A lot can be learned from this work. I just kept all components on the zero PCB. I have not soldered them yet

Micro ATMEGA8
Push-button
Resistor
Male connector
crystal 11Mhz
capacitor 22 pF *2
Zero PCB

#### ericgibbs

Joined Jan 29, 2010
10,816
hi,
I would suggest you add a power On LED, also don't forget the onboard voltage decoupling capacitors.

E

#### BobaMosfet

Joined Jul 1, 2009
1,208
Hi all!, I have stand-alone AVR ATMEGAA8 microcontroller so I want program ATMEGA8 by placing all required component on a breadboard. I got some information on the google search. I drew a connection diagram

View attachment 215747

Programmer

1. Do I need external hardware to program ATMEGA8?
2. if Yes than What hardware will be needed ?
3. If No than Where to connect the 10 pins of the programmer ?
4. Can that programmer program ATMEGA8 Chip?
5. What should be the value of crystal ?
For programming any AVR 8-bit micro, I recommend the AVRMk II - It will cost about \$25 (US) but it's worth it, and lets' you program the chip easily. ISP connection is 6-pin.

As for connecting to a breadboard, you can always go with something like this:

Or if you just want to handle connections yourself:

#### DickCappels

Joined Aug 21, 2008
6,591
Remember to add those bypass capacitors from Vcc to GND -recommended is 10 uf to 100 uf electrolytic paralleled by a .01uf ceramic capacitor. I got that from Microchip application note AVR042. You might want to glace through it for other tips.