SLUUDD1 August   2025

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. Introduction
  5. FT4222_Python_Controller.py
    1. 2.1 I2C Commands
    2. 2.2 SPI Commands
  6. AFE20408_Page_Global_Def.py
  7. AFE20408_Page_0_Def.py
  8. AFE20408_Page_1_Def.py
  9. AFE20408_Page_2_Def.py
  10. AFE20408_Page_3_Def.py
  11. AFE20408_Page_4_Def.py
  12. AFE20408_Page_6_Def.py
  13. 10Main.py
  14. 11Common Sequences
    1. 11.1 Reset Sequence
    2. 11.2 ADC Configuration
    3. 11.3 DAC Configuration
  15. 12Common Issues
  16. 13Summary

AFE20408_Page_1_Def.py

Page 1 of the AFE20408 contains ADC configuration registers. The file contains variables for the registers and specific data combinations. You are required to write 0x0001 to the PAGE register before writing or reading from any register on this page.

This page contains the following registers:

Table 5-1 Page 1 Registers
Register Description
ADC_GEN_CFG Contains False Alarm configurations, ADC Auto/direct mode, and Shunt Range
ADC_CONV_CFG_0 Contains conversion rate configurations
ADC_CONV_CFG_1 Contains sample size configurations
ADC_HYST_0
ADC_HYST_1
SENSE0_UP_THRESH
SENSE0_LO_THRESH
SENSE1_UP_THRESH
SENSE1_LO_THRESH
ADC0_UP_THRESH
ADC0_LO_THRESH
ADC1_UP_THRESH
ADC1_LO_THRESH
TMP_UP_THRESH

Example:

    #Example: Configure ADC
    ftdiObject.spiWrite(PAGE_ADDRESS, PAGE_ADC_CONFIG)  #Set ADC page

    #Set the following parameters:
        #ADC False Alarm = 16
        #Sense False Alarm = 32
        #Temp False Alarm = 4
        #ADC in automode
        #Shunt range 163.84mV
    ftdiObject.spiWrite(ADC_GEN_CFG_ADDRESS, ADC_GEN_CFG_FALR_ADC_16 + ADC_GEN_CFG_FALR_SENSE_32 + ADC_GEN_CFG_FALR_TMP_4 + ADC_GEN_CFG_AUTOMODE_Automode + ADC_GEN_CFG_SHUNT_RANGE_163p84mVrange)
    #Set the following parameters in the ADC_CONV_CFG_0 register:
        #ADC Conversion rate = 152us
        #SENSE Conversion rate = 282us
        #Temperature conversion rate = 4122us
    ftdiObject.spiWrite(ADC_CONV_CFG_0_ADDRESS, ADC_CONV_CFG_0_CONV_RATE_ADC_152us + ADC_CONV_CFG_0_CONV_RATE_SENSE_282us + ADC_CONV_CFG_0_CONV_RATE_TMP_4122us)
    #Set the following parameters in the ADC_CONV_CFG_1 register:
        #ADC Samples = 16
        #SENSE Samples = 4
        #Temperature Samples = 1
    ftdiObject.spiWrite(ADC_CONV_CFG_1_ADDRESS, ADC_CONV_CFG_1_AVG_ADC_16samples + ADC_CONV_CFG_1_AVG_SENSE_4samples + ADC_CONV_CFG_1_AVG_TMP_1sample)