This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
resources:eval:user-guides:ad7091r5 [10 Dec 2020 11:40] – created Cristian Pop | resources:eval:user-guides:ad7091r5 [10 Dec 2020 12:05] (current) – [Types Declarations] Cristian Pop | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== AD7091R5 User Guide ====== | ====== AD7091R5 User Guide ====== | ||
+ | ===== Overview ===== | ||
+ | The [[adi> | ||
+ | successive approximation analog-to-digital converter (ADC). | ||
+ | The [[adi> | ||
+ | and typically consumes only 24 µA at a 3 V supply in fast mode. | ||
+ | The [[adi> | ||
+ | with I2C interfaces. The conversion process can be controlled by | ||
+ | a sample mode via the CONVST/GPO1 pin, an autocycle mode | ||
+ | selected through software control, or a command mode in | ||
+ | which conversions occur across I2C write operations. | ||
+ | The device contains a wide bandwidth track-and-hold amplifier | ||
+ | that can handle input frequencies up to 1.5 MHz. The [[adi> | ||
+ | also features an on-chip conversion clock, an on-chip accurate | ||
+ | 2.5 V reference, and a programmable out of bounds user alert | ||
+ | function. | ||
+ | The [[adi> | ||
+ | with a channel sequencer that allows a preprogrammed | ||
+ | selection of channels to be converted sequentially. | ||
+ | The [[adi> | ||
+ | ultra low power dissipation without compromising performance. It | ||
+ | also features flexible power management options. An on-chip | ||
+ | configuration register allows the user to set up different operating | ||
+ | conditions. These include power management, alert functionality, | ||
+ | busy indication, channel sequencing, and general-purpose output | ||
+ | pins. The MUXOUT and ADCIN pins allow signal conditioning of the | ||
+ | multiplexer output before acquisition by the ADC. | ||
+ | ==== Supported devices ==== | ||
+ | * [[adi> | ||
+ | |||
+ | ==== Evaluation board ==== | ||
+ | * [[adi> | ||
+ | |||
+ | ===== No-OS Driver Description ===== | ||
+ | |||
+ | ==== Functions Declarations ==== | ||
+ | ^ Function | ||
+ | |<code c> | ||
+ | struct ad7091r5_init_param *init_param);</ | ||
+ | |<code c> | ||
+ | |<code c> | ||
+ | enum ad7091r5_mode mode);</ | ||
+ | |<code c> | ||
+ | enum ad7091r5_sleep_mode mode);</ | ||
+ | |<code c> | ||
+ | enum ad7091r5_port port, bool value);</ | ||
+ | |<code c> | ||
+ | enum ad7091r5_gpo0_mode mode, | ||
+ | bool is_cmos);</ | ||
+ | |<code c> | ||
+ | enum ad7091r5_cycle_timer timer);</ | ||
+ | |<code c> | ||
+ | enum ad7091r5_limit limit, | ||
+ | | ||
+ | | ||
+ | |<code c> | ||
+ | | ||
+ | enum ad7091r5_alert_type *alert);</ | ||
+ | |<code c> | ||
+ | enum ad7091r5_limit limit, | ||
+ | | ||
+ | | ||
+ | |<code c> | ||
+ | | ||
+ | |<code c> | ||
+ | uint8_t channel, | ||
+ | uint16_t *read_val);</ | ||
+ | ==== Types Declarations ==== | ||
+ | |||
+ | |<code c> | ||
+ | /** | ||
+ | * @enum ad7091r5_mode | ||
+ | * @brief Converter supported modes | ||
+ | */ | ||
+ | enum ad7091r5_mode { | ||
+ | /** Sample mode, conversion started by CONVST */ | ||
+ | AD7091R5_MODE_SAMPLE, | ||
+ | /** Command mode, conversion starts on the first pos edge of SCL */ | ||
+ | AD7091R5_MODE_COMMAND, | ||
+ | /** Sample mode, convert continuously */ | ||
+ | AD7091R5_MODE_AUTOCYCLE, | ||
+ | }; | ||
+ | |||
+ | /** | ||
+ | * @enum ad7091r5_sleep_mode | ||
+ | * @brief Converter supported sleep modes | ||
+ | */ | ||
+ | enum ad7091r5_sleep_mode { | ||
+ | /** Default operation: | ||
+ | * Sleep mode Off, Internal reference Off */ | ||
+ | AD7091R5_SLEEP_MODE_0, | ||
+ | /** Sleep mode Off, Internal reference On */ | ||
+ | AD7091R5_SLEEP_MODE_1, | ||
+ | /** Sleep mode On, Internal reference Off */ | ||
+ | AD7091R5_SLEEP_MODE_2, | ||
+ | /** Sleep mode On, Internal reference On */ | ||
+ | AD7091R5_SLEEP_MODE_3, | ||
+ | }; | ||
+ | |||
+ | /** | ||
+ | * @enum ad7091r5_port | ||
+ | * @brief Converter general purpose outputs | ||
+ | */ | ||
+ | enum ad7091r5_port { | ||
+ | /** GPO0 */ | ||
+ | AD7091R5_GPO0, | ||
+ | /** GPO1 */ | ||
+ | AD7091R5_GPO1, | ||
+ | /** GPO2 */ | ||
+ | AD7091R5_GPO2, | ||
+ | }; | ||
+ | |||
+ | /** | ||
+ | * @enum ad7091r5_gpo0_mode | ||
+ | * @brief Port 0 configuration | ||
+ | */ | ||
+ | enum ad7091r5_gpo0_mode { | ||
+ | /** GPO0 is output port */ | ||
+ | AD7091R5_GPO0_ENABLED, | ||
+ | /** GPO0 is Alert indicator */ | ||
+ | AD7091R5_GPO0_ALERT, | ||
+ | /** GPO0 is busy indicator, device is converting */ | ||
+ | AD7091R5_GPO0_BUSY, | ||
+ | }; | ||
+ | |||
+ | /** | ||
+ | * @enum ad7091r5_cycle_timer | ||
+ | * @brief Timer used for autocycle mode | ||
+ | */ | ||
+ | enum ad7091r5_cycle_timer { | ||
+ | /** 100 uS */ | ||
+ | AD7091R5_CYCLE_TIMER_100uS, | ||
+ | /** 200 uS */ | ||
+ | AD7091R5_CYCLE_TIMER_200uS, | ||
+ | /** 400 uS */ | ||
+ | AD7091R5_CYCLE_TIMER_400uS, | ||
+ | /** 800 uS */ | ||
+ | AD7091R5_CYCLE_TIMER_800uS, | ||
+ | }; | ||
+ | |||
+ | /** | ||
+ | * @enum ad7091r5_alert_type | ||
+ | * @brief Alert status | ||
+ | */ | ||
+ | enum ad7091r5_alert_type { | ||
+ | /** No alert */ | ||
+ | AD7091R5_NO_ALERT, | ||
+ | /** High alert */ | ||
+ | AD7091R5_HIGH_ALERT, | ||
+ | /** Low alert */ | ||
+ | AD7091R5_LOW_ALERT, | ||
+ | }; | ||
+ | |||
+ | /** | ||
+ | * @enum ad7091r5_limit | ||
+ | * @brief Limit type | ||
+ | */ | ||
+ | enum ad7091r5_limit { | ||
+ | /** Low limit */ | ||
+ | AD7091R5_LOW_LIMIT, | ||
+ | /** High limit */ | ||
+ | AD7091R5_HIGH_LIMIT, | ||
+ | /** Hysteresis */ | ||
+ | AD7091R5_HYSTERESIS, | ||
+ | }; | ||
+ | |||
+ | /** | ||
+ | * @struct ad7091r5_init_param | ||
+ | * @brief | ||
+ | */ | ||
+ | struct ad7091r5_init_param { | ||
+ | /* I2C */ | ||
+ | i2c_init_param *i2c_init; | ||
+ | /** RESET GPIO initialization structure. */ | ||
+ | struct gpio_init_param *gpio_resetn; | ||
+ | }; | ||
+ | |||
+ | /** | ||
+ | * @struct ad7091r5_dev | ||
+ | * @brief | ||
+ | */ | ||
+ | struct ad7091r5_dev { | ||
+ | /* I2C descriptor */ | ||
+ | struct i2c_desc *i2c_desc; | ||
+ | /** RESET GPIO handler. */ | ||
+ | struct gpio_desc *gpio_resetn; | ||
+ | }; | ||
+ | </ | ||
+ | ===== No-OS Downloads ===== | ||
+ | <WRAP round download 50%> | ||
+ | * {{https:// | ||
+ | </ |