0
\$\begingroup\$

I have made a breadboard-arduino with an ATMega-328PU and the standard components taking help from Building an Arduino on a Breadboard. I interfaced the CT2102 Breakout Board with this assembly:

DTR - SCK
RXI - MOSI
TXO - MISO
RTS - Pin 1 On the ATMega

Before everything else, I downloaded ans installed the CP210x Drivers from their website. Now, it does come up on the list of "Attached USB devices" in the terminal window through the command ls /dev/cu.* and ls /dev/tty.*

To check if everything's working correctly, I issued the "Read Fuses" command which:

avrdude -P /dev/cu.SLAB_USBtoUART -b 19200 -c avrisp -p m328p -v

I hit the reset switch on the breadboard: following what hoipolloi said on Arduino Sketch upload issue - avrdude: stk500_recv(): programmer is not responding.

No luck! avrdude failed saying:

avrdude: stk500_recv(): programmer is not responding

Can anyone please help?

I tried connecting it with cu command, it says connected. But when I try reading data off of it (fuses) with

avrdude: initialization failed.
\$\endgroup\$
1
  • \$\begingroup\$ Your title is mistaken - "bit bang" does not apply. \$\endgroup\$ Commented Oct 24, 2014 at 13:07

2 Answers 2

1
\$\begingroup\$
  1. Has your AVR been programmed with the Arduino bootloader before?
  2. If not, see "Bootloading your chips" on the site you linked to.

Please note that there are different ways to program a bare AVR and an "Arduino":

The bare AVR does not have a booloader pre-installed. Therefore, it can only be programmed via an AVR in-circuit programmer (ISP) (hardware!). This uses the RESET, MISO, MOSI, and SCK pins (see the "Bootloading" section). avrdude can then be used for example to upload the bootloader.

Quote: "if you purchased some extra Atmega8 or Atmega168 chips from an online store they will have NOT been bootloaded with the Arduino bootloader (with the exception of Adafruit Industries). [...] You won't be able to program your chips using the USB to serial breakout board and the Arduino software [...]"

Only after the AVR has been set up with the Arduino bootloader can it be programmed via the USB-to-Serial adapter you already have. This connects to the TXD and RXD pins (and possibly also to the RESET pin).

Quote: "Connect the RX (pin 2) of your Atmega chip to the TX of the USB to serial board, and connect the TX (pin 3) of your Atmega chip to the RX of the USB to serial board."

\$\endgroup\$
0
\$\begingroup\$

As a matter of fact, the AVR did come with the bootloader preinstalled (flashed). To check what was going wrong, I removed the entire CT210x and then tried again, it was back to it's perpetuity: "programmer not responding".

Now, I re-checked the connection, enabled the "-v" flag in avrdude and hit the reset button just before or during the "Magic Bytes Transmission", and viola, it worked!

\$\endgroup\$

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.