2

I have been building a standalone Arduino on a breadboard following the guide, Building an Arduino on a Breadboard. The guide is generally very good, however, I have yet to get the Arduino working, for a number of various reasons, be it misinterpreted, or misread instructions (the reset pull-up resistor connected to GND instead of Vcc, Tx to Tx, instead of Tx to Rx (and vice versa), to name but a few issues that I have had to resolve). However, I am sure that the following issue is not down to my careless interpretation or lack of attention.

Look at the photo taken from the webpage, Building an Arduino on a Breadboard, on the Arduino website, showing the Sparkfun AVR programming adapter connected to the ATmega IC.

Standalone Arduino breadboard

The MOSI on the adapter is shown to be connected, via a dark green wire, to pin 16 on the ATmega chip, whereas the instructions say:

Be sure to refer to the Arduino pin mapping for help wiring this up.

  • The MISO pin of your adapter will go to pin 18 or Arduino digital pin 12 of your Atmega chip.
  • The SCK pin of your adapter will go to pin 19 or Arduino digital pin 13 of your Atmega chip.
  • The RESET pin of your adapter will go to pin 1 of your Atmega chip.
  • The MOSI pin of your adapter will go to pin 17 or Arduino digital pin 11 of your Atmega chip.

According to the pinout below, Pin 16 is SS and pin 17 is indeed MOSI.

ATmega168 pin out

So, to my mind, the photo is definitely wrong. Indeed I was getting avrdude errors when trying to use a USBasp to load a bootloader, when using the wiring as shown in the photo. When I correctly wired MOSI, from the adapter, to pin 17, the avrdude errors disappeared.

Am I correct in my thinking? Has anyone else attempted to build this circuit, following the instructions on the Arduino website, and come across this issue?

I am just looking for confirmation that I am right, before I contact the owner of the web page.

  • 1
    Dark green wire is indeed incorrect. Not sure what it is you are asking here. Is it still not working with the correction you spotted? – Gerben Apr 28 '15 at 13:07
  • 1
    @Gerben - Thanks, I was just looking for confirmation that it was indeed wrong in the photo, and that I wasn't just making a stupid mistake. I shall try to contact the owner of the webpage to get the issue rectified, as I am sure that I am not the only person to get confused by this and lose time trying to figure out what is wrong. It does seem to be working better now, yes, since I have changed the wiring. – Greenonline Apr 28 '15 at 13:46
4

I have programmed AVR microcontrollers for a while. I would follow the datasheet, instead of the guide you have.

The Atmega168 Pin Mapping shows SS on 16, MOSI 17, MISO 18, SCK 19 and you will also need to connect to RST 1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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