FT232B and FT245B

The second generation of fixed-function D2xx devices, an upgrade to FT8U232A and FT8U245A. The devices are:

  • FT232BM: UART mode, 32-pin LQFP
  • FT232BL: UART mode, 32-pin LQFP (lead-free version)
  • FT232BQ: UART mode, 32-pin QFN
  • FT245BM: FIFO mode, 32-pin LQFP
  • FT245BL: FIFO mode, 32-pin LQFP (lead-free version)

Both FT232B and FT245B look exactly the same from the software perspective, and in fact may or may not be the same silicon.

Features:

  • is a full-speed USB 1.1 peripherial
  • single channel D2xx device, hardwired to either UART or FIFO base mode
  • 384-byte IN FIFO, 128-byte OUT FIFO
  • 48MHz internal base clock, generated from 6MHz crystal
  • 5V VCC supply for internal circuitry
  • separate 3.3V or 5V VCCIO supply for business-end IO
  • separate AGND and AVCC 5V supply for the clock multiplier
  • internal 3.3V LDO
  • internal power-on reset circuit
  • required external support circuitry:
    • USB D+ pullup
    • decoupling capacitor for internal LDO
    • 6MHz crystal or external clock
    • optionally, a 93C46 64×16-bit EEPROM; a 93C56 or 93C66 is also acceptable, but the device will not be able to access the extra space

On reset, the device samples the value of the EESK pin to determine the default VID:PID that will be used unless configured otherwise by the EEPROM. The default VID:PID is:

  • 0403:6001 if EESK is high (or left floating, as the device has weak internal pullup)
  • 0403:6004 if EESK is low and the device is an FT232B
  • 0403:6005 if EESK is low and the device is an FT245B

The bcdDevice value for the device is 0x0200 (same as FT8U2xxA) if no serial number has been configured, or 0x0400 if a serial number has been configured.

Pinout

The pinout is mostly, but not quite, compatible with FT8U2xxA.

LQFP / QFN pincategoryFT8U232AFT8U245A
1EEPROMEESKEESK
2EEPROMEEDATAEEDATA
3powerVCCVCC
4controlRESET#RESET#
5controlRSTOUT#RSTOUT#
6power3V3OUT3V3OUT
7USBUSBDPUSBDP
8USBUSBDMUSBDM
9powerGNDGND
10IOSLEEP#PWREN#
11IORXLED#SI/WU#
12IOTXLED#RXF#
13powerVCCIOVCCIO
14IOPWRCTLTXE#
15IOPWREN#WR
16IOTXDENRD#
17powerGNDGND
18IORI#D7
19IODCD#D6
20IODSR#D5
21IODTR#D4
22IOCTS#D3
23IORTS#D2
24IORXDD1
25IOTXDD0
26powerVCCVCC
27clockXTINXTIN
28clockXTOUTXTOUT
29powerAGNDAGND
30powerAVCCAVCC
31controlTESTTEST
32EEPROMEECSEECS

UART-mode IO pins have the following functions:

  • TXD, RXD, RTS#, CTS#, DTR#, DSR#, DCD#, RI#: standard UART pins
  • SLEEP#: device output, goes low when in USB suspend mode
  • RXLED#, TXLED#: active-low LED outputs
  • PWRCTL: device input, used to generate USB descriptors when EEPROM not present or not functional
    • 0: bus-powered
    • 1: self-powered
  • TXDEN: device output, high while TXD is actively transmitting data; can be used as transmitter enable for RS485 transceivers
  • PWREN#: device output, low when the device has been configured by the host and is not in suspend mode (can be used to gate power to the rest of the board)

FIFO-mode IO pins have the following functions:

  • D0-D7, TXE#, RXF#, RD#, WR, SI/WU#: standard FIFO-mode pins
  • PWREN#: like in UART mode

The EEPROM interface is 3-pin at the FTDI chip, while the EEPROM itself has a 4-pin interface. This is because the FTDI device uses a single tied data line. To connect the EEPROM, connect the FTDI EEDATA pin directly to the ROM's data input, and to the data output via a 2.2kΩ resistor.

EEPROM data format

The format is backwards-compatible with the one used by FT8U2xxA devices.

  • word 0x00: always 0
  • word 0x01: idVendor (USB VID)
  • word 0x02: idProduct (USB PID)
  • word 0x03: bcdDevice (should be 0x400 or 0x200 when serial number not present)
  • word 0x04: USB config (goes straight to configuration descriptor)
    • bits 0-7: bmAttributes
      • bit 5: remote wakeup enabled
      • bit 6: self-powered
      • bit 7: always set to 1
    • bits 8-15: bMaxPower (max power in units of 2mA)
  • word 0x05: device control
    • bit 0: IN endpoint is isochronous
    • bit 1: OUT endpoint is isochronous
    • bit 2: IO pulldown in suspend
    • bit 3: serial number enabled
    • bit 4: bcdUSB is present
  • word 0x06: bcdUSB
  • word 0x07: manufacturer string pointer
  • word 0x08: product description string pointer
  • word 0x09: serial number string pointer
  • words 0x0a..0x3f: string / user area
  • word 0x3f: checksum

String pointers are formatted as follows:

  • bits 0-6: pointer to descriptor within EEPROM (counted in bytes)
  • bit 7: always set to 1
  • bits 8-15: total length of descriptor in bytes

The string descriptors are stored in ROM with the descriptor header included, as follows:

  • word 0: header
    • bits 0-7: total length of descriptor in bytes (includes header)
    • bits 8-15: descriptor type (always 3 — string)
  • words 1 and up: string in UTF-16

The checksum can be computed as follows:

#![allow(unused)]
fn main() {
fn checksum(eeprom: &[u16; 0x40]) -> u16 {
    let mut res: u16 = 0xaaaa;
    for pos in 0..0x3f { // checksum word is NOT included — we're calculating it
        res ^= eeprom[pos];
        res = res.rotate_left(1);
    }
    res
}
}