- 相關文件:Datasheet、Bit Bang Application Note、FTDIChip-ID™ Application Note
- 內建 128 bytes EEPROM 作為設定用,其中 Manufacturer, ManufacturerId, Description, SerialNumber 字串最長 96 bytes,沒用完的可作為 user area 或 FTDIChip-ID 使用。
- 可產生 6/12/24/48 MHz clock
- Big Band I/O
- Asynchronous:UART 8 IO 作為 8-bit data,CBUS 提供 RD# 跟 WR# 訊號
- Synchronous:同上
- CBUS Mode:CBUS0~CBUS3 4-bit GPIO
- 內建 3.3V 電源轉換,最大提供 50mA。
- 驅動程式
FT232RL IO 訊號
| Pin | Name | 預設功能 | Bit Bang | |
|---|---|---|---|---|
| CBUS mode | Asynchronous / Synchronous | |||
| 1 | TXD 輸出 | D0 | ||
| 5 | RXD 輸入 | D1 | ||
| 3 | RTS# 輸出 (Arduino Reset) | D2 | ||
| 11 | CTS# 輸入 | D3 | ||
| 2 | DTR# 輸出 (Arduino Reset) | D4 | ||
| 9 | DSR# 輸入 | D5 | ||
| 10 | DCD# 輸入 | D6 | ||
| 6 | RI# 輸入 | D7 | ||
| 23 | CBUS0 | TXLED# 輸出 | 4-bit GPIO | 其中兩個作為 RD# 及 WR# |
| 22 | CBUS1 | RXLED# 輸出 | ||
| 13 | CBUS2 | TXDEN 輸出,RS-485 用。 | ||
| 14 | CBUS3 | PWREN# 輸出,需外加 10kΩ pull high,USB 設定完 low,USB suspend 時 high。 | ||
| 12 | CBUS4 | SLEEP# 輸出,USB suspend 時 low。 | ||
內部 EEPROM,整理自 datasheet 及 libFTDI。
| parameter | address | value | 說明 |
|---|---|---|---|
| High Current I/Os | 0.2 | 0 | |
| 1 | 0x40 | IN endpoint size | |
| Vendor ID | 3~2 | 0403h | FTDI default VID |
| Product ID | 5~4 | 6001h | FTDI default PID |
| Device Type | 7~6 | 0x0600 | 0x0600=FT232R |
| Battery Powered | 8.4 | 0 | |
| Remote Wake Up | 8.5 | 1 | RI# low → wake up USB Host Controller in 20 ms |
| Bus Powered | 8.6 | 1 | |
| Load VCP Driver | 8.7 | 1 | Make the host to load VCP driver。此位置是猜測的。 |
| Max Bus Power Current | 9 | 90mA | 以 2 mA 為單位 |
| IN endpoint is isochronous | 0x0a.0 | 0 | |
| OUT endpoint is isochronous | 0x0a.1 | 0 | |
| Enable suspend I/O power down | 0x0a.2 | 0 | |
| Use serial number string | 0x0a.3 | 0 | |
| Change USB Version | 0x0a.4 | 0 | |
| Invert TXD | 0x0b | 0 | |
| Invert RXD | 0 | ||
| Invert RTS# | 0 | ||
| Invert CTS# | 0 | ||
| Invert DTR# | 0 | ||
| Invert DSR# | 0 | ||
| Invert DCD# | 0 | ||
| Invert RI# | 0 | ||
| USB Version | 0x0d~0x0c | 0x0200 | USB 2.0 Full Speed |
| Manufacturer Offset | 0x0e.6~0 | 0x18 | 指向 10, 0x03, "FTDI" |
| Manufacturer Enabled | 0xe.7 | 1 | |
| Manufacturer Size | 0x0f | 10 | byte 數含結尾 0,因每個字佔 2 bytes,所以需乘二 |
| Product Description Offset | 0x10.6~0 | 0x24 | 指向 32, 0x03, "FT232R USB UART" |
| Product Description Enabled | 0x10.7 | 1 | |
| Product Description Size | 0x11 | 32 | |
| Serial Number Offset | 0x12.6~0 | 0x46 | 指向 18, 0x03, "A6001dHI",A unique serial number |
| Serial Number Enabled | 0x12.7 | 1 | |
| Serial Number Size | 0x13 | 18 | |
| CBUS0 | 0x14.3~0 | 3 | 0=TXDEN, 1=PWREN#, 2=RXLED#, 3=TXLED#, 4=TXRXLED#, 5=SLEEP#, 6=CLK48, 7=CLK24, 8=CLK12, 9=CLK6, 10=Bitbang IO mode, 11=Bitbang WR#, 12=Bitbang RD# |
| CBUS1 | 0x14.7~4 | 2 | |
| CBUS2 | 0x15.3~0 | 0 | |
| CBUS3 | 0x15.7~4 | 1 | |
| CBUS4 | 0x16.3~0 | 5 | |
| Dynamic Content | 0x18~0x7f | 見說明 | 預設應該是放 Manufacturer, Production Description, 及 Serial 字串。字串含 0,每字佔兩個 byte。格式依序是長度,0x03,字串本身。 10, 0x03, "FTDI" 32, 0x03, "FT232R USB UART" 18, 0x03, "A6001dHI" |
| ChipID | 0x86~0x89 | 見說明 |
USB 的請求控制指令:
- reset (0x00)
- set baud rate (0x01)
- set data (0x02):設定 RS-232 參數
- set flow control (0x03)
- modem control (0x04):設定 DTR, RTS 等。
- poll modem status (0x05)
- set event char (0x06)
- set error char (0x07)
- set latency timer (0x09)
- get latency timer (0x0a)
- set bit mode (0x0b)
- read pins (0x0c)
- read eeprom (0x90)
- write eeprom (0x91)
實際應用
- UART
- 只用 TXD、RXD,或者再加 CTS#, DTR
- RTS# 換成 DTR 作為 Reset 用:SparkFun FTDI Basic Breakout
- FTDI Basic Breakout:除了 TXD/RXD 外,亦提供 CTS# 跟 DTR
- Breakout Board for FT232RL USB to Serial:提供所有 IO 接腳
- Arduino Serial USB Board:RTS 串 0.1 uF 到 Arduino Mini Reset
- SPI (使用 Synchronous BitBang 燒錄 Arduino bootloader)

沒有留言:
張貼留言