I opted to use a 12 MHz crystal in my design because I had some handy (bought for my CH340g-based FabFTDI). Also, the compiled .hex file is for an ATmega8 with 12 MHz crystal. If you are using a different crystal oscillator, you will need to recompile from source.
Only the TXD and RXD pins are implemented on the FTDI interface (no RTS/CTS).
The FTDI-Vcc is 3.6V. This means that it can work directly with 3.3V-based systems like the ESP8266. If you are interfacing with 5V boards, do not connect the FTDI-Vcc to the target Vcc, as I have not implemented 3.6V zeners for the USB D+ and D- lines.
Fab modules downloads (1269dpi):
Mill and stuff the PCB.
| Components | Components | | :——— | :——— | | 1 x ATmega8A-AU | 1 x Mini-USB | | 1 x 12 MHz Crystal | 1 x PinHD 2x3 ISP | | 1 x LED red | 1 x PinHD 1x6 FTDI | | 2 x 18pF capacitor | 1 x 0.1uF capacitor | | 2 x 49 ohm R | 1 x 1k5 ohm R | | 1 x 499 ohm R | 1 x 10k ohm R | | 1 x 0 ohm R |
Unlike the CH340g-based FabFTDI, the ATmega8-based FabFTDI board uses the V-USB software library to implement USB-to-TTL conversion, i.e. it has to be programmed with the correct firmware before it can be used.
You need both an ISP programmer like the FabISP and avrdude to program the FabFTDI-mega8 board. Instructions for installing avrdude can be found in the Fab Academy tutorials page. If you are using a different speed crystal oscillator, you will need to re-compile the firmware from source.
Download the FabFTDI-mega8 firmware.
Flash the firmware onto the FabFTDI-mega8 board using avrdude:
avrdude -c usbtiny -p m8 -U flash:w:cdcmega8.hex -U lfuse:w:0xff:m -U hfuse:w:0x8f:m
If you have managed to successfully flash the firmware onto the FabFTDI-mega8 board, give yourself a pat on the back. You are almost home.
Plug the FabFTDI-mega8 board into your computer’s USB port. Your computer should recognise the FabFTDI-mega8 board directly, as it implements the HIDinterface protocol.
On Windows machines, look for the COMport under Control Panel > System > Device Manager. On Linux or OSX machines, type the commands:
lsusb
ls /dev/ttyACM*
The FabFTDI-mega8 should appear as ID 16c0:05e1 Van Ooijen Technische Informatica Free shared USB VID/PID pair for CDC devices and /dev/ttyACM0
To perform loopback test on the FabFTDI-mega8 board, jumper the TXD and RXD pins. Open your favorite terminal emulation software, e.g. Arduino IDE or picocom. Select the device port.
E.g. for Arduino IDE on Linux, select Tools > Port > /dev/ttyACM0. Click Serail Monitor (Ctrl+Shift+M). Select Both NL & CR. Select the desired baud rate. Type a message on the transmit window and press Enter or click the Send button. You should see the message appearing ont the received data window.
As stated at the start of this tutorial, I have tested the FabFTDI-mega8 board up to 2 Mbps on loopback and 250 kbps on an ESP8266 module.
You can substitute the ATmega8A-AU with the ATmega328p-AU as the 2 devices are pin compatible.
Good luck and have fun with your FabFTDI board!
Copyright (c) 2017 Steven Chew…
MIT license