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
- can be set to an alternate mode: async bitbang
- 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:6001if EESK is high (or left floating, as the device has weak internal pullup)0403:6004if EESK is low and the device is an FT232B0403:6005if 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 pin | category | FT8U232A | FT8U245A |
|---|---|---|---|
| 1 | EEPROM | EESK | EESK |
| 2 | EEPROM | EEDATA | EEDATA |
| 3 | power | VCC | VCC |
| 4 | control | RESET# | RESET# |
| 5 | control | RSTOUT# | RSTOUT# |
| 6 | power | 3V3OUT | 3V3OUT |
| 7 | USB | USBDP | USBDP |
| 8 | USB | USBDM | USBDM |
| 9 | power | GND | GND |
| 10 | IO | SLEEP# | PWREN# |
| 11 | IO | RXLED# | SI/WU# |
| 12 | IO | TXLED# | RXF# |
| 13 | power | VCCIO | VCCIO |
| 14 | IO | PWRCTL | TXE# |
| 15 | IO | PWREN# | WR |
| 16 | IO | TXDEN | RD# |
| 17 | power | GND | GND |
| 18 | IO | RI# | D7 |
| 19 | IO | DCD# | D6 |
| 20 | IO | DSR# | D5 |
| 21 | IO | DTR# | D4 |
| 22 | IO | CTS# | D3 |
| 23 | IO | RTS# | D2 |
| 24 | IO | RXD | D1 |
| 25 | IO | TXD | D0 |
| 26 | power | VCC | VCC |
| 27 | clock | XTIN | XTIN |
| 28 | clock | XTOUT | XTOUT |
| 29 | power | AGND | AGND |
| 30 | power | AVCC | AVCC |
| 31 | control | TEST | TEST |
| 32 | EEPROM | EECS | EECS |
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)
- bits 0-7: bmAttributes
- 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 } }