Connecting USB to Serial/TTL to Breadboard “Mega-P”
Now, with a Breadboard Mega built out, we need a way to get programs or sketches onto the microcontroller. One of many tools is a USB to Serial or TTL (Transitor-Transitor Logic) breakout board. The most common is FTDI232RL, but there are others. This board will allow one to UPLOAD a sketch onto the ATmega1284 without disturbing the bootloader in Flash or the EEPROM. Other ways use a programmer that erase and overwrite the microcontroller and the bootloader will be no more. Of course, you can use the programmer to put the bootloader back, but not both at the same time.
The target build will use the blue lines in the sketch. With the USB2TTL device disconnected from the USB, we will need to connect the DTR to the ATmega1284 RESET pin 9 through a 0.1uF ceramic capacitor. Without the capacitor, the DTR signal will not reset the microcontroller and the UPLOAD will fail.
Connect the GND of the USB2TTL to the GND of the breadboard ground rail. Next connections will be the communications. From the USB2TTL Tx/TxD connect to the ATmega1284’s Rx0 pin 14 and from the USB2TTL Rx/RxD to the the ATmega Tx0.
Now connect the 5V or Vcc (some USB2TTL boards can be configured for 3v3) from the USB2TTL to the breadboard 5VDC power rail.
Now, if this is the first time pluging in the USB2TTL you will need drivers for the device. For FTDI, the Arduino IDE and Multi-Platform IDE have them located the hardware folder of the IDE.
After a double or triple check of the connections, plug the USB2TTL into the USB and the board should power up. Remember, only ONE power source at a time and only a regulated 5VDC +/-0.5.