Interface Modules: Difference between revisions

From Smithnet Wiki
Jump to navigation Jump to search
m (1 revision imported)
m (2 revisions imported)
(No difference)

Revision as of 04:53, 8 May 2024

Hardware

USB to I2C Slave

  • "CJMCU-200" with FT200XD chipset
  • Not very useful

USB to I2C Master

Software:

/etc/udev/rules.d/11-ftdi.rules:

# FT232AM/FT232BM/FT232R
SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", MODE="0664"
# FT2232C/FT2232D/FT2232H
SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6010", MODE="0664"
# FT4232/FT4232H
SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6011", MODE="0664"
# FT232H
SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6014", MODE="0664"
# FT230X/FT231X/FT234X
SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6015", MODE="0664"

python3:

>>> from pyftdi.ftdi import Ftdi
>>> Ftdi.show_devices()
Available interfaces:
 ftdi://ftdi:232h:2:b/1   (Single RS232-HS

Show device URLs:

ftdi_urls.py

Show I2C devices on bus:

i2cscan.py ftdi://ftdi:232h:2:b/1

BME820 I2C Temp/Humidity Sensor

  • Schematic
  • Default address: (Jumper can be moved to switch 0x77 / 0x76)

TinyRTC

  • Default address:

Linux Interface

Packages: i2ctools, python-i2c

Detect buses:

 i2cdetect -l

BME820 I2C Temp/Humidity Sensor

  • Schematic
  • Jumper can be moved to switch address from 0x77 to 0x76

Linux Interface

Packages: i2ctools, python-i2c

Detect buses:

 i2cdetect -l

Board "CJMCU-232H" using the FTDI FT232H device. Similar to this.

USB interface to:

  • UART mode (default operation, at 9600 8N1)
  • MPSSE mode
    • SPI
    • I2C Master

Pinouts:

Pin UART Function SPI I2C GPIO
C0
C1
C2
C3
C4
C5
C6
C7
C8
C9
D0 TX
D1 RX
D2 /RTS
D3 /CTS
D4 /DTR
D5 /DSR
D6 /DCD
D7 /RI