SNLA267A March 2019 – June 2019 DS90UB953-Q1 , DS90UB954-Q1 , DS90UB960-Q1
## Sensing953GPIOsTo954GPIO.py
##
## revision 1.0 6/13/17
##
########
# Use 953 GPIO0 as input that can be fed to DES GPIO0
import time
UB954 = 0x60
UB953ID = 0x30
UB953 = 0x18
# Set up Port0
board.WriteI2C(UB954, 0x4C, 0x01) #Select Port 0
# Set up Back Channel Config (0x58)
#board.WriteI2C(UB954,0x58,0x5E) #50Mbps BC and Pass through on
# Set up SER ID
#board.WriteI2C(UB954,0x5B,UB953ID)
# Set up SER Alias ID
board.WriteI2C(UB954,0x5C,UB953) #Set up SER alias
# Set SER GPIO NOT as outputs
board.WriteI2C(UB953, 0x0D, 0x00) #no remote enable, no outputs
# Set SER GPIO0 as Input
board.WriteI2C(UB953, 0x0E, 0x01) #Only GPIO0 is output
# Set FC CTL for GPIO forwarding
board.WriteI2C(UB953, 0x33, 0x05) #One GPIO forwarded and DCA CRC Enabled (by default)
#Note, if you want to use forwarding for more GPIOs use convention below
#One GPIO = GPIO0 only
#Two GPIOs = GPIO0 and GPIO1 only
#Four GPIOs = GPIO0-3 sent
# Make all DES GPIOs input disabled
board.WriteI2C(UB954, 0x0F, 0x00) #GPIO0-6 Input Disabled
# Make DES GPIO0 linked to RX0 and GPIO0
board.WriteI2C(UB954, 0x10, 0x01) #0x10[4:2] = 000: RX Port 0
#0x10[7:5] = 000: received GPIO0-3
#0x10[1] = 0: Output value of GPIO0
#0x10[0] = 1: GPIO0 Output Enabled