AVR ATMEGA8 connection on breadboard

Thread Starter

mukesh1

Joined Mar 22, 2020
68
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

ATMEGA8.jpeg

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 ?
 

MrChips

Joined Oct 2, 2009
30,714
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
10,152
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.
 

Thread Starter

mukesh1

Joined Mar 22, 2020
68
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

Programmer link https://www.aliexpress.com/item/32777385821.html

  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
30,714
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
10,152
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.
 

Thread Starter

mukesh1

Joined Mar 22, 2020
68
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

compants.jpg

assemble.jpg
 

BobaMosfet

Joined Jul 1, 2009
2,110
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:

1598713273193.png

Or if you just want to handle connections yourself:

1598713488688.png
 

DickCappels

Joined Aug 21, 2008
10,152
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.
http://ww1.microchip.com/downloads/...ign-Considerations_ApplicationNote_AVR042.pdf

From experience I recommend that you use a socket for the controller -you're probably going to destroy some, and the reset button is not needed. You might want to put and ISP connector on the board -it will be a lot easier to progam that way : -)

Alternatively you can build or buy an ISP connector adapter like the one below so that you don't have to keep wiring ISP connectors on all of your circuit boards. It also saves space on the board.
1598761709834.png
http://www.es.co.th/detail.asp?Prod=005904983
 
Top