Connections from UNU R3 to program separate 328?

I’m a novice user. I’ve bought some additional ATMega328P chips and used the UNO to burn boatloaders to them successfully. I could just return these for programming to the UNO, but I gather that most users do this on an independent breadboard. I’d like to try that.

I have not yet obtained a ‘USB TTL Converter’ as I’m unclear which product to choose. And the UK ones I’ve seen seem rather expensive anyway.

But I understand from another post I received that “You don't need a separate cable but can just run leads from the UNO R3 board.” So, can someone please tell me exactly what the pin connections are from the UNO R3 board to the separately prepared ATM328P.

Terry, East Grinstead, UK

The Uno has a USB to TTL serial converter chip on board. You'll be using this chip to communicate directly between your computer and the ATmega328P on the breadboard. You will not be using the ATmega328P on your Uno at all, and in fact you must make sure there isn't a sketch running on the Uno that will produce serial output, otherwise this will interfere with communication between the computer and the ATmega328P on the breadboard.

The connections are:

Uno | ATmega328P on the breadboard

0 | PD0
1 | PD1
5V | VCC
GND | GND

Now, if you understand serial connections, this might seem wrong because pin 0 on the Uno is marked "RX" and PD0 is RXD while pin 1 on the Uno is marked "TX" and PD1 is TXD. We always want to make a RX-TX, TX-RX connection because RX stands for "receive" and TX stands for "transmit". However, the pin markings on the Uno refer to the ATmega328P, which you aren't using. The USB to TTL serial converter on the Uno is connected RX-TX, TX-RX, so pin 0 on the Uno is actually connected to the TX pin of the USB to TTL serial converter and pin 1 connected to RX on the converter. So you see you are actually making an RX-TX, TX-RX connection.

While it is possible to use an Uno as a USB to TTL serial converter, it's not terribly convenient. A dedicated USB to TTL serial converter is a very useful tool and you can get them for around $1 on eBay if you don't mind waiting for the shipping from China. It's much better to use an Uno as an Uno. When shopping for a USB to TTL serial converter, I recommend that you get one which uses the standard "FTDI header" pinout:

  • DTR or RTS
  • RX
  • TX
  • VCC
  • CTS
  • GND

That will allow you to plug the adapter right in to an Arduino Pro Mini, or many other boards that use this standard pinout. If you get an adapter with a non-standard pinout, you would need to use a mess of jumper wires to adapt it to the standard pinout. Some adapters don't even break out the DTR or RTS pin, without which you will need to manually reset the microcontroller at just the right time on every upload.

For good, cheap USB-serial adapters, search ebay for "CH340G 6pin" and get the black ones with the voltage switch (the black ones without the little voltage switch in the corner, and with a jumper between two of the pins on the end, don't break out DTR, and are also poorly made with the USB connector often loose. Don't get those). They're like $2 each shipped (from china), and work great. The green CH340G boards with the micro USB connector and voltage switch are also great, and only slightly more expensive - which you prefer depends on how your desk is laid out (ie, do you want a cable between computer and adapter).

Being ebay-from-china, with dozens of sellers with the same product and horribly engrish descriptions, the pictures are the way to identify what design the listing is for.

Using an Uno as a serial adapter sucks, you really want a USB TTL serial adapter. Without the DTR pine, you have about a half second window in which to press reset when uploading a sketch.

Many thanks both, really appreciate those detailed replies.

Could either of you post a link of an inexpensive serial adapter that you can recommend from practical experience please?

https://www.ebay.com/itm/191146797242

Those are the good ones. No specific endorsement of that seller - there are at least a dozen selling identical serial adapters (though some charge for shipping and some don't, despite all having about the same price point), and I don't make note of which ones I buy from.

The ones that look like the above one (note the little switch) on these search results are the good ones

Google for CH340G driver for your OS version to get the drivers for it

Thanks a bunch DrAzzy.

I've ordered that first one for $1.89. Delivery pretty long but meanwhile I've abandoned the 'no converter, just jumper cables' method here:

It made the connections I had been seeking clear, but the subsequent instructions were over my head.

Meanwhile, at least, I'll continue using the intuitive method of simply placing the target 328P on the UNO R3 board and programming it there.

When the adapter (or whatever it's called - I've seen several labels!) arrives I'll probably be back for more help please.

Terry, East Grinstead, UK