Atmega8 Datasheet Na Russkom
The programmer you have programs the ATmega8 through the ISP interface on the device. Here is the pinout of your programmer: You can see the circles and the one square? The square denotes the 1st pin, or MOSI. I think I found the right datasheet to your ATmega8 MCU, please double check the datasheet for the MCU that you have. Extracted from the ATmega8/ATmega8L datasheet found here: You can see that pin 19 (PB5) is the SCK pin. Pin 18 is MISO, 17 is MOSI, 1 is RESET. These are the pins that connect to the appropriate ISP pins that you can see in the first picture above.
Sep 1, 2015 - Many AVRs (like ATmega8, ATmega16, ATmega32) have internal RC. And Clock Options' section of the ATmega8 datasheet for details.
So your overall system will be like this: • Have the ATmega8 powered from a reliable DC 5V power source • Ensure the ATmega8 is grounded • Connect the pins of the ISP programmer to the appropriate pins on the ATmega8 • Pull up resistor (~10k) on the RESET pin. This is all you should need to get the programmer to talk to your MCU using your computer. Bazilevich makroekonomka navchaljnij posbnik. Best of Luck. The 'circles' and 'squares' are just conventions; in this case the square indicates pin 1. I'm not sure what you mean by 'all inputs are square in my item.'
If you look at the ribbon cable connector (at right in the image I added to your question), there is a triangle on the silkscreen that also denotes pin 1. (The red stripe on the ribbon cable is also usually for pin 1, but in the image it is shown backwards. I would trust the silkscreen.) The pinout (also added) shows you the purpose of each pin. MOSI, for example, is 'Master Out, Slave In.' You can find additional information about this if you research.
If you have a digital multi-meter with 'Diode Test' feature, you can use it as a connection tester (Here we it call a 'Beep-Check':D), you will simply find out what pin of the A-side connector is connected to the B-side connector. Learn the order of connections because it is a convention to connect pins of these flat-cables in that way. Kak sdelatj dinamometr svoimi rukami iz linejki. Next you will have to simply connect MOSI to MOSI, MISO to MISO, SCK to SCK and absolutely the NRST to NRST (as other friends said, it is better to pull-up NRST using a 10K~47K resistor - however the AVR already has this resistor. It is just for precaution). AND DON'T FORGET THE 'GND' PIN! Every two device with electric link must have common GROUND.
I must add and remark something to addition to what my friends, JYelton and Nick said: Please make sure that your ATmega8 (or whatever IC you are using) is powered from the external adapter (+5V) OR from the programmer. Not BOTH OF THEM!!! Otherwise, you may damage your computer's USB port, or the adapter (or in some cases even the programmer and the microcontroller)!!
I often read that it is good practice to connect VCC with AVCC. Even in the ATMega8 datasheet it says so: AVCC is the supply voltage pin for the A/D Converter, Port C (3.0), and ADC (7.6). It should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter. Note that Port C (5.4) use digital supply voltage, VCC.
But nowhere I can find an explanation as to why they have to be connected. A simple circuit for blinking a LED works without connecting VCC and AVCC. Do I just have to accept it, or is there a good reason? Mainly, it has to be connected because the manufacturer says it should.
Aside from that, they should for full operation of the chip (all ports/pins), to prevent floating pin issues on the AVCC side, to prevent noise on the digital side. There are issues where leaving the AVCC side unpowered causes parasitic power draw and can destablize the internal clock, or can prevent stable startup. Atmel designers have decided that having a separate Analog VCC and Ground is the best way of allowing relatively noise free analog section, by allowing users to add filtering and separation of the Digital and Analog Planes, even inside the ATmega. It's not just the ATMega8, afaik all ATMegas and even some ATTinys have this design. Good on you for asking for the reason!