JAJSH49C March 2019 – April 2024 DS90UB953A-Q1
PRODUCTION DATA
このセクションでは、DS90UB953A-Q1 および DS90UB954-Q1 の設定例を示します。ここでは、DS90UB953A-Q1 の GPIO1 の電圧を監視して、アラームをセットし、さらに DS90UB954-Q1 の INT ピンをアサートします。
# DS90UB953A-Q1 Settings
WriteI2C(0x17,0x3E) # Enable Sensor, Select GPIO1 to sense
WriteI2C(0x18,0x80) # Enable Sensor Gain Setting (Use Default)
WriteI2C(0x1A,0x62) # Set Sensor Upper and Lower Limits (Use Default)
WriteI2C(0x1D,0x3F) # Enable Sensor Alarms
WriteI2C(0x1E,0x7F) # Enable Sending Alarms over BCC
# Register 0x57 readout (bits 2 and 3), indicates if the voltage on the GPIO1 is below or above the thresholds set in the register 0x1A.
# DS90UB954-Q1 Settings
WriteI2C(0x23,0x81) # Enable Interrupts, Enable Interrupts for the camera attached to RX0
WriteI2C(0x4C,0x01) # Enable Writes to RX0 registers
WriteI2C(0xD8,0x08) # Interrupt on change in Sensor Status
# Register 0x51 and 0x52 readouts indicate Sensor data. Register 0x24[7] bit readout indicates the Alarm bit. The alarm bit can be routed to GPIO3/INT through GPIO_PIN_CTL and GPIO_OUT_SRC registers.