1
\$\begingroup\$

I checked Electronics Stackexchange and other sources, but I can't figure out what's wrong with my set-up.

Some say that I need to check my connections, which I've done many times, checking all the wiring. Some say it is something with the clock. There's also this link where @Schalonsus suggests connecting the "clk pin of ATmega8", which I can't find anywhere in the online ATmega8 pin diagrams.

Here's a snapshot of the error:

screenshot

My wiring with no external power source. I connect VCC and GND pins of USBasp directly to the ATmega8. I also tried to power the ATmega8 using an external power source (5 V) but it results in the same situation:

enter image description here

enter image description here

enter image description here

My questions are:

  1. What is the "clk pin" mentioned in the above comment?
  2. What's wrong with my set-up?
  3. Can you provide a complete schematic on how to connect a USBasp to an ATmega8?
\$\endgroup\$
10
  • 2
    \$\begingroup\$ Has this MCU been in another circuit before, where a crystal oscillator was configured? If it was configured for a crystal, it will no longer communicate without one. \$\endgroup\$
    – Jens
    Aug 15, 2022 at 17:07
  • \$\begingroup\$ Thanks Jens! Really need your help. I just bought this brand new Atmega8 from a local store, plugged it to my brand new usbasp and these errors came out. @Jens \$\endgroup\$ Aug 15, 2022 at 17:10
  • \$\begingroup\$ Did this programmer work before with another MCU or is this the first attempt? I try to check whether the problem is on the MCU side or on the programmer side. \$\endgroup\$
    – Jens
    Aug 15, 2022 at 17:16
  • \$\begingroup\$ It is first attempt \$\endgroup\$ Aug 15, 2022 at 17:16
  • \$\begingroup\$ I will check what an "extreme burner" is.. \$\endgroup\$
    – Jens
    Aug 15, 2022 at 17:29

3 Answers 3

4
\$\begingroup\$

ADD-on: this link for serial programming (?), as @Justme pointed to ...

enter image description here

But see also the whole note ...

EX: https://www.electrodragon.com/product/avr-atmega8-168-328-min-development-board/

I use this also for programming.

enter image description here

First, please, always use the "decoupling" capacitor at the very nearest power digital pins ...

Note that sometimes ...
I have seen that all ground pins on the "10 pins connector" are not all wired.

You can use USBasp programmer under Arduino IDE.
Just add it as a "programmer" (probably already in).
Then under "sketches", use "upload" with an external programmer.

What is the "clk pin" mentioned in the above comment

It is the SCK pin of the MOSI, MISO for SPI communications.
But see also the first picture all above and the notes link ... (pulses on XTAL1)

Link

enter image description here

\$\endgroup\$
7
  • \$\begingroup\$ Updated the wiring. I think they're all good. The problem still persists. Thank you for your time ! :D. I missed the pin 22 in the picture but connecting it results in the same situation \$\endgroup\$ Aug 15, 2022 at 12:19
  • 1
    \$\begingroup\$ But where did you connect the AVCC? How does it relate to the programming circuit in any way? Shoudn't you connect it to the programming circuit supply? And when you say you connected pin 22, we don't know if you connected it correctly. \$\endgroup\$
    – Justme
    Aug 15, 2022 at 12:33
  • 1
    \$\begingroup\$ To the programmer, or somewhere else? The last picture just shows AVCC is not connected to programmer, but to some mystery wire on positive breadboard rail, if it is even connected anywhere. \$\endgroup\$
    – Justme
    Aug 15, 2022 at 13:18
  • 1
    \$\begingroup\$ Thank you! @Justme. Hope you can guide me some more. I'm a beginner in this field. I have a 5V power source connected to the breadboard. AVVC is connected to the VCC of the power source. Is that correct or what do I have to do to make the transfer work. Thanks for your time! :D \$\endgroup\$ Aug 15, 2022 at 15:10
  • 1
    \$\begingroup\$ See updated answer \$\endgroup\$
    – Antonio51
    Aug 15, 2022 at 17:08
3
\$\begingroup\$

Half of the chip is unpowered because it has multiple supply pins that are left unconnected.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ I followed the diagram that @Antonio51 sent. Could you tell me how to fix this ? \$\endgroup\$ Aug 15, 2022 at 11:41
  • \$\begingroup\$ AVCC (pin 20, i.stack.imgur.com/vedZ4.png) and GND (pin 22) aren't connected. \$\endgroup\$
    – Velvet
    Aug 15, 2022 at 11:57
  • \$\begingroup\$ Right ... When one uses a PCB ... these are all wired :-) \$\endgroup\$
    – Antonio51
    Aug 15, 2022 at 11:59
3
\$\begingroup\$

The first error message in the display log shows "Power On failed", you must solve this first. Use a separate 5 V supply and connect +5 V to pin 7 and pin 20 of the atMega8 and 0 V (GND) to pin 8 and pin 22.
A capacitor between pin 7 and 8 is important, use something between 100 nF and 1 uF.

Now add the connections to the programmer interface as Antonio51 has shown.

According to this tutorial you must set the SPI frequency to 375 kHz or lower to not overrun the 1 MHz clock of a fresh atMega8:
https://www.instructables.com/USING-EXtreme-Burner-for-AVR-Microcontroller-Progr/

The programmer should see the supply now.

\$\endgroup\$
3
  • \$\begingroup\$ Same error unfortunately \$\endgroup\$ Aug 16, 2022 at 7:30
  • 1
    \$\begingroup\$ Sorry, out of ideas. I once received a programmer with reverse pin assignment at one connector of the cable. Same trouble.. \$\endgroup\$
    – Jens
    Aug 16, 2022 at 12:55
  • \$\begingroup\$ Is there a good alternative of not using USBASP ?\ \$\endgroup\$ Aug 16, 2022 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.