The Micro1v8 is a compact Micro-USB to breakout board based on the FT230X full-speed USB Serial UART IC. It supports 1.8V logic levels on the serial interface out-of-the-box using a built-in reference voltage, and includes TX/RX LEDs to assist debugging.
Where to Buy
The Micro1v8 is available on Amazon:
Micro1v8 (2-Pack) - USB to 1.8V Serial Adapter with LEDs - FTDI FT230X chip |
International buyers: Our inventory is "Fulfilled by Amazon" which means that it's up to Amazon to decide where they ship. Currently, they do offer international shipping on our products to most countries. Thank you!
Uses
- Serial console for embedded Linux systems with 1.8V UARTs
- USB to 1.8V-3.3V serial interface for microcontroller development or debugging
- Reverse-engineering tool with flexible I/O voltages
- Bitbang GPIO mode for simple 1.8V-3.3V digital input and output
Features
- Built-in 1.8V regulator for 1.8V support out-of-the-box
- Single solder-jumper configuration to change to 3.3V I/O
- Support for any I/O voltage between 1.8V and 3.3V, using an external reference
- 5V tolerant inputs
- Includes TX and RX LEDs
- Tiny footprint – only 0.4" x 0.64" including Micro-USB B connector
- Standard 0.1" headers for I/O signals
- UART baudrates up to 3 Mbaud
- FT230XQ (website, datasheet) from FTDI (revision D or later)
- Driver support for Windows, OS X, Linux, and Android
- Internal reprogrammable EEPROM for VID/PID and other customization
- Unique pre-programmed serial number
Pinout
8 signals are brought out to pin holes with 0.1" spacing. They fit standard 0.1" male or female headers, mini grabbers, or you can also just solder wires directly.
For many uses, the four pins along the lower edge (VIO
, RX
, TX
, GND
) are all you’ll need. The signal names are shown on the bottom of the PCB.
Besides UART functionality, you can also reuse the CTS
, RTS
, RX
, and TX
pins as simple digital I/O.
Looking at the bottom of the PCB, counterclockwise from the top left:
Pin | Direction | Description |
---|---|---|
5V |
Out | 5V supply from USB (typ. 500mA max) |
CTS |
Out | Clear To Send handshake signal (CTS) |
VIO |
Either | I/O reference voltage. See I/O Voltage Configuration options below. |
RX |
In | Receive data |
TX |
Out | Transmit data |
GND |
— | Ground |
RTS |
In | Request To Send handshake signal (RTS) |
3.3V |
Out | 3.3V supply FT230X internal regulator (50mA max) |
The on-board TX (green) and RX (red) LEDs are internally connected to FT230X pins CBUS2
and CBUS1
, respectively. FT230X pins CBUS0
and CBUS3
are not connected.
I/O Voltage Configuration
J1 open: 1.8V or user-supplied VIO
J1 closed: 3.3V
The Micro1v8 defaults to a 1.8V I/O voltage on the TX, RX, CTS, and RTS lines. This 1.8V reference is internally generated and output on the VIO
pin. The reference is capable of driving up to 300mA and can be used to power external circuitry as well.
To configure the FT230X for another I/O voltage between 1.8V and 3.3V, you can connect an external reference to the VIO pin. Connecting a source above 1.8V will disable the internal regulator, and I/O voltage levels will be between 0 and the VIO voltage that you connect.
To change to 3.3V I/O levels, you can either connect the 3.3V pin to the VIO pin, or simply close the J1 solder jumper. To close () the solder jumper, add solder to both pads until a bridge is formed between them. To open () a previously-closed jumper, use a clean soldering iron or wick to remove the excess solder until the bridge goes away.
Note that the solder jumper must be open if you are providing an external reference on VIO
.
Comparison to the MicroFTX
The Micro1v8 is very similar to the earlier MicroFTX design:
- Same FT230XQ chip
- Same overall size
- Same I/O voltage ranges
With the following improvements:
- On-board 1.8V regulator and 1.8V default I/O level
- On-board TX and RX LEDs
- Simpler jumper configuration to switch to 3.3V operation
- Access to 5V and 3.3V regardless of selected I/O level
And the following tradeoffs:
- Changed pin layout (although
VIO
,RX
,TX
, andGND
still match) - No access to
CBUSx
pins
Drivers
Windows, Mac OS X
FTDI provides two types of drivers for their chips, including the FT230X that powers the Micro1v8:
- VCP (“Virtual COM Port”) makes the device appear as a serial port
- D2XX provides an API for bitbang and other direct access
Note that the FT-X EEPROM contains a bit which determines whether the Windows driver will create a Virtual COM Port (VCP) for a particular device. By default it does create one, but you can use FTDI’s FT_Prog utility to check or change the default. You can also force it to create a COM port by going into the device manager and overriding the settings manually.
Linux (serial port)
FTDI chips are handled by the kernel driver ftdi_sio
and create a serial device named like /dev/ttyUSB0
. All Linux distributions should support it out-of-the-box these days.
To allow non-root access to the /dev/ttyUSB*
device nodes, add your user to the dialout
group and log-in again:
$ adduser $USER dialout
Linux (direct access)
If you don’t need the device node, or if you want to use bitbang IO like in the example below, a library like libftdi can be used independently of the kernel version.
To allow non-root access with libftdi or similar, create (or download) a file named /etc/udev/rules.d/10-ftx.rules
containing:
SUBSYSTEM=="usb", ACTION=="add", \
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", GROUP="plugdev"
Android
FTDI’s Java D2xx library supports the FT230XQ on Android 3.2 and above. They also provide a UART terminal application on the Play store.
Bitbang GPIO
The FT230X supports bitbang GPIO (general-purpose input/output) modes that allow you to set and read digital pins directly. It’s a great way to let your computer drive a simple binary output, or to read the state of a switch. For full details, see the FT230X website and datasheet. FTDI’s bitbang app note AN232R-01 is also a useful reference.
Two forms of bitbang are supported by the chip. They are enabled with FD_SetBitMode
(D2XX) or ftdi_set_bitmode
(libftdi):
BITMODE_BITBANG
uses theRX
,TX
,CTS
, andRTS
pins and works out of the boxBITMODE_CBUS
uses theCBUSx
pins, but needs to be enabled first in the EEPROM
Note that the Micro1v8 does not expose the CBUSx
pins, so BITMODE_CBUS
would probably only be useful for manual control of the onboard LEDs.
On Linux, libftdi provides an easy way to use bitbang. The python bindings are poor, but it’s straightforward in C. This program will toggle the RX
, TX
, CTS
, and RTS
pins every time it’s run:
#include <ftdi.h>
#include <err.h>
int main(int argc, char *argv[])
{
struct ftdi_context ftdi;
unsigned char x;
/* Initialize and find device */
if (ftdi_init(&ftdi) < 0)
err(1, "ftdi_init");
if (ftdi_usb_open(&ftdi, 0x0403, 0x6015) < 0)
err(2, "can't open device");
/* Enable bitbang */
if (ftdi_set_bitmode(&ftdi, 0xff, BITMODE_BITBANG) < 0)
err(3, "can't enable bitbang mode");
/* Read state & flip it */
if (ftdi_read_pins(&ftdi, &x) < 0)
err(4, "can't read");
x ^= 0xff;
if (ftdi_write_data(&ftdi, &x, 1) < 0)
err(5, "can't write");
/* Close device */
ftdi_usb_close(&ftdi);
ftdi_deinit(&ftdi);
return 0;
}
To test it out, download this file as ftdi-bitbang.c
, compile, and run it:
$ sudo apt-get install libftdi-dev build-essential
$ gcc -o ftdi-bitbang ftdi-bitbang.c -lftdi
$ ./ftdi-bitbang
Non-standard Baudrates
The FT230X supports custom baudrates up to 3Mbaud. If you’re using Python’s pySerial module, custom baudrates should just work like any other baudrate:
#!/usr/bin/python
import serial
ser = serial.Serial(port = "/dev/ttyUSB0", baudrate = 2000000)
ser.write("hello, world")
ser.close()
Here is a low-level example of how to configure custom baudrates in C on a Linux system:
#include <termio.h>
#include <fcntl.h>
#include <err.h>
#include <linux/serial.h>
static int rate_to_constant(int baudrate) {
#define B(x) case x: return B##x
switch(baudrate) {
B(50); B(75); B(110); B(134); B(150);
B(200); B(300); B(600); B(1200); B(1800);
B(2400); B(4800); B(9600); B(19200); B(38400);
B(57600); B(115200); B(230400); B(460800); B(500000);
B(576000); B(921600); B(1000000);B(1152000);B(1500000);
default: return 0;
}
#undef B
}
/* Open serial port in raw mode, with custom baudrate if necessary */
int serial_open(const char *device, int rate)
{
struct termios options;
struct serial_struct serinfo;
int fd;
int speed = 0;
/* Open and configure serial port */
if ((fd = open(device,O_RDWR|O_NOCTTY)) == -1)
return -1;
speed = rate_to_constant(rate);
if (speed == 0) {
/* Custom divisor */
serinfo.reserved_char[0] = 0;
if (ioctl(fd, TIOCGSERIAL, &serinfo) < 0)
return -1;
serinfo.flags &= ~ASYNC_SPD_MASK;
serinfo.flags |= ASYNC_SPD_CUST;
serinfo.custom_divisor = (serinfo.baud_base + (rate / 2)) / rate;
if (serinfo.custom_divisor < 1)
serinfo.custom_divisor = 1;
if (ioctl(fd, TIOCSSERIAL, &serinfo) < 0)
return -1;
if (ioctl(fd, TIOCGSERIAL, &serinfo) < 0)
return -1;
if (serinfo.custom_divisor * rate != serinfo.baud_base) {
warnx("actual baudrate is %d / %d = %f",
serinfo.baud_base, serinfo.custom_divisor,
(float)serinfo.baud_base / serinfo.custom_divisor);
}
}
fcntl(fd, F_SETFL, 0);
tcgetattr(fd, &options);
cfsetispeed(&options, speed ?: B38400);
cfsetospeed(&options, speed ?: B38400);
cfmakeraw(&options);
options.c_cflag |= (CLOCAL | CREAD);
options.c_cflag &= ~CRTSCTS;
if (tcsetattr(fd, TCSANOW, &options) != 0)
return -1;
return fd;
}
Download this example: linux-custom-baudrate.c.
EEPROM Customization
The FT230X includes a 2048-byte reprogrammable EEPROM that configures the chip. Features that can be customized in the EEPROM include:
- USB vendor ID, product ID, device strings
- Device serial number
- I/O pin drive strength
- UART signal polarity inversion
- CBUS pin selection, allowing the LEDs on the Micro1v8 to be configured as:
- TX/RX LED outputs (default)
- USB sleep status and control
- Battery charge detection output
- Bitbang GPIO
- Off (tristate)
The easiest way to reprogram the EEPROM is using FTDI’s FT_Prog utility for Windows. Version 2.6.6 and later support the FT-X series chips. The user manual has more information.
The open-source libftdi library includes functions to access and change the EEPROM contents, and a standalone utility ftdi_eeprom
that uses these functions. However, libftdi’s FT-X support is not necessarily complete and may not yet have been updated to support the FT-X chips. Note that incorrectly changing the EEPROM contents may lead to a chip that is difficult to recover.
Other third-party tools to program the EEPROM exist, like ftx-prog.
Contact
For questions or comments, e-mail hwsupport@jim.sh.