Difference between revisions of "Component: ADC 24bit ADS1220 (Analog Input)"

From Flowcode Help
Jump to navigationJump to search
 
Line 28: Line 28:
 
Example circuit schematic complete with component values. RREF should be a high accuracy resistor with a low PPM.
 
Example circuit schematic complete with component values. RREF should be a high accuracy resistor with a low PPM.
  
[[File:ADS1220_RTD3.png|center]]
+
[[File:ADS1220_RTD3.png|680px]]
  
 
==Macro reference==
 
==Macro reference==

Latest revision as of 11:12, 25 February 2026

Author Matrix TSL
Version 1.0
Category Analog Input


ADC 24bit ADS1220 component

A Precision Low power 24Bit SPI ADC 4 channel device with Programmable Gain Amplifier (PGA) and Data Rates up to 2 kSPS

Detailed description

No detailed description exists yet for this component

Examples

Example use case of a 3-wire RTD to read high resolution and high accuracy temperature.

FC6 Icon.png ADS1220_Test


Example circuit schematic complete with component values. RREF should be a high accuracy resistor with a low PPM.

ADS1220 RTD3.png

Macro reference

Initialise

Fc9-comp-macro.png Initialise
Initialize the ADS1220 ADC with default settings 
Fc9-u8-icon.png - BYTE Return


ReadRTDResistance

Fc9-comp-macro.png ReadRTDResistance
Reads the RTD sensor and returns resistance in ohms 
Fc9-f32-icon.png - FLOAT Return


ReadRTDTemperature

Fc9-comp-macro.png ReadRTDTemperature
Reads the RTD sensor and returns temperature in degrees Celsius using linear approximation - matches GitHub library get_temperature_from_rtd_ohms_with_linear_approx 
Fc9-f32-icon.png - FLOAT Return


SampleDiffRAW

Fc9-comp-macro.png SampleDiffRAW
Performs a differential ADC sample between two channels and returns 24-bit raw value. Not all channel combinations are possible, see datasheet p40 section MUX. Returns 0 if the channel selection is invalid. 
Fc9-u8-icon.png - BYTE ChannelA
Positive channel: 0-3 (AN0-AN3) 
Fc9-u8-icon.png - BYTE ChannelB
Negative channel: 0-3 (AN0-AN3) 
Fc9-u8-icon.png - BYTE Gain
PGA Gain: 0=1x, 1=2x, 2=4x, 3=8x, 4=16x, 5=32x, 6=64x, 7=128x 
Fc9-s32-icon.png - LONG Return


SampleDiffVolts

Fc9-comp-macro.png SampleDiffVolts
Performs a differential ADC sample and returns voltage in volts 
Fc9-u8-icon.png - BYTE ChannelA
Positive channel: 0-3 (AN0-AN3) 
Fc9-u8-icon.png - BYTE ChannelB
Negative channel: 0-3 (AN0-AN3) 
Fc9-u8-icon.png - BYTE Gain
PGA Gain: 0=1x, 1=2x, 2=4x, 3=8x, 4=16x, 5=32x, 6=64x, 7=128x 
Fc9-f32-icon.png - FLOAT Return


SampleSglRaw

Fc9-comp-macro.png SampleSglRaw
Performs a single-ended ADC sample on the selected channel and returns 24-bit raw value 
Fc9-u8-icon.png - BYTE Channel
Range: 0-3 (AN0-AN3) 
Fc9-u8-icon.png - BYTE Gain
PGA Gain: 0=1x, 1=2x, 2=4x, 3=8x, 4=16x, 5=32x, 6=64x, 7=128x 
Fc9-s32-icon.png - LONG Return


SampleSglVolts

Fc9-comp-macro.png SampleSglVolts
Performs a single-ended ADC sample and returns voltage in volts 
Fc9-u8-icon.png - BYTE Channel
Range: 0-3 (AN0-AN3) 
Fc9-u8-icon.png - BYTE Gain
PGA Gain: 0=1x, 1=2x, 2=4x, 3=8x, 4=16x, 5=32x, 6=64x, 7=128x 
Fc9-f32-icon.png - FLOAT Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Connections
Fc9-type-16-icon.png Channel
SPI Channel selector 
Fc9-type-16-icon.png Prescale
Prescale option selector 
Fc9-type-5-icon.png MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
Fc9-type-16-icon.png MOSI Remap Pin
Select which the target pin to assign the MOSI hardware pin functionality. 
Fc9-type-5-icon.png MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
Fc9-type-16-icon.png MISO Remap Pin
Select which the target pin to assign the MISO hardware pin functionality. 
Fc9-type-5-icon.png CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
Fc9-type-16-icon.png CLK Remap Pin
Select which the target pin to assign the CLK hardware pin functionality. 
Fc9-type-5-icon.png CS / SS
Chip Select / Slave Select Pin Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.  
Fc9-type-7-icon.png Use Ready Pin
Use DRDY pin to detect when conversion is complete. If disabled, polling will be used. 
Fc9-type-5-icon.png DRDY Pin
Data Ready pin - goes low when conversion is complete 
Fc9-conn-icon.png Configuration
Fc9-type-16-icon.png Data Rate
Programmable Data Rate (SPS) 
Fc9-type-16-icon.png Operating Mode
 
Fc9-type-16-icon.png Conversion Mode
 
Fc9-type-16-icon.png PGA Gain
Programmable Gain Amplifier (PGA) gain setting 
Fc9-type-16-icon.png Voltage Reference
Voltage reference source 
Fc9-type-15-icon.png Reference Voltage
 
Fc9-type-16-icon.png FIR Filter
 
Fc9-type-16-icon.png IDAC Current (uA)
IDAC excitation current in microamperes. Typical values: 100, 250, 500, 750, 1000. Default: 250uA 
Fc9-type-16-icon.png I1MUX
 
Fc9-type-16-icon.png I2MUX
 
Fc9-conn-icon.png RTD Configuration
Fc9-type-16-icon.png RTD Type
RTD sensor type - determines base resistance at 0°C 
Fc9-type-16-icon.png RTD Configuration
 
Fc9-type-14-icon.png Reference Resistor
High precision reference resistor value in ohms. Typically 400Ω for PT100 or 4000Ω for PT1000 
Fc9-type-15-icon.png Temperature Coefficient
 
Fc9-conn-icon.png Simulation
Fc9-type-7-icon.png Simulate Comms
Allows the communications to be simulated overriding the value on the panel slider controls. 

Component Source Code

Please click here to download the component source project: FC_Comp_Source_External_ADC24Bit_ADS1220_1.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_External_ADC24Bit_ADS1220_1.fcfx