Open Source & Linux Lab

It's better when it's simple

User Tools

Site Tools


etc:users:jcmvbkbc:hardware

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
etc:users:jcmvbkbc:hardware [2014/10/14 05:45] – jcmvbkbcetc:users:jcmvbkbc:hardware [2026/08/29 16:52] (current) – jcmvbkbc
Line 17: Line 17:
   * 1, 2: Vcc (connected)   * 1, 2: Vcc (connected)
   * 4, 6 and the rest of the low row: GND (connected)   * 4, 6 and the rest of the low row: GND (connected)
-  * 5: RX +  * 5: RX (I) 
-  * 7: CTS# +  * 7: CTS# (I) 
-  * 9: TX+  * 9: TX (O) 
 +  * 11: RI# (I) 
 +  * 13: RTS# (O) 
 +  * 17: DTR# (O): my modification
  
 == Driver == == Driver ==
   * http://ftdi-usb-sio.sourceforge.net/   * http://ftdi-usb-sio.sourceforge.net/
   * modprobe ftdi_sio vendor=0x15ba product=0x002a   * modprobe ftdi_sio vendor=0x15ba product=0x002a
 +  * echo -n "15ba 002a" > /sys/bus/usb-serial/drivers/ftdi_sio/new_id
 +
 +=== Xtensa JTAG ===
 +== Pin functions ==
 +  * 1: Vcc
 +  * 3: TRST#
 +  * 4: GND
 +  * 5: TDI
 +  * 7: TMS
 +  * 9: TCK
 +  * 13: TDO
 +  * 15: SRST# (doesn't work)
 +
 +== topology.xml controller line ==
 +  <controller id='Controller0' module='ft2232' probe='flyswatter' vid='0x15ba' pid='0x002a' usbser='OLVGHYS?' speed='10MHz'/>
 +
 +=== SPI master ===
 +== Pin functions ==
 +  * 5: MOSI
 +  * 7: CS0
 +  * 9: SCK
 +  * 13: MISO (pulled up by default)
 +
 +== PyFTDI-based example ==
 +API doc: https://eblot.github.io/pyftdi/api/spi.html
 +<code>
 +from pyftdi import ftdi, spi
 +
 +ftdi.Ftdi.add_custom_vendor(vid = 0x15ba)
 +ftdi.Ftdi.add_custom_product(vid = 0x15ba, pid = 0x002a)
 +
 +ftdi.Ftdi.show_devices()
 +
 +ctrl = spi.SpiController()
 +ctrl.configure("ftdi://0x15ba:0x002a:1/1")
 +port = ctrl.get_port(freq = 1000000, cs = 0)
 +
 +port.write(b'1234', start = True, stop = False) # address phase, 4 bytes
 +port.read(1, start = False, stop = False, droptail = 4) # dummy phase, 4 clock cycles
 +port.read(1, start = False, stop = True) # read phase, 1 byte
 +</code>
etc/users/jcmvbkbc/hardware.1413251150.txt.gz · Last modified: 2014/10/14 05:45 by jcmvbkbc