SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By clintonb
#179544
I bought the atmega32 40 pin and a pocket program from spark fun to start programming. I haven't been able to initialize the MCU using avrdude because it reports RC=-1. It doesn't give much more helpful information that can help me solve the problem so I went through the info on the website. I found the switch that controls power target and no power which probably was the first problem. I wired it up according to the diagram.


Miso VCC. Mosi (pin6)

Sck. Mosi. Miso(pin 7)

Reset Gnd. Sick(pin 8)

Reset (pin 9)

Vcc (pin 10)

Gnd (pin11)

Can anyone perhaps tell me what I could be doing wrong? I noticed there's 2 plugs for connecting your MCU, the one has 10 pins and the other 6. Is there a setting or switch to tell the programming to use the 6 pin interface instead of the 10 pin interface?
#179628
There is no significant difference between the two connectors, so I chose the 6-pin. The first thing to do is to set an arbitrary orientation. I set mine with the cable to the right. With it set like that, the connector pin out is:

Cable coming out of the connector in this direction --->
GND °° RST
MOSI °° SCK
VCC °° MISO

From there, the connections to the MCU are as follows:

GND -> supply ground
VCC -> N.C., unless you are using the programmer to supply power. I don't recommend this, depending on your power requirements.
RST -> MCU pin #9 (Reset)
MOSI -> MCU pin #6 (MOSI/PB5)
MISO -> MCU pin #7 (MISO/PB6)
SCK -> MCU pin# 8 (SCK/PB7)