Component: ADC16bit ADS111x (Analog Input)

From Flowcode Help
Jump to navigationJump to search
Author Matrix TSL
Version 1.0
Category Analog Input


ADC16bit ADS111x component

A Precision Low power 16Bit I2C ADC 4 channes device with a Programmable comparator

Detailed description

No detailed description exists yet for this component

Examples

Simple example file to generate a two column CSV file that can be loaded into Microsoft Excel or LibreOffice Math.

The CSV Read/Write component is for simulation or App Developer.

For an embedded CSV read write see the File component

CSV Component used with App Developer -> File component: FC6 Icon.png CSV Test AD


The component requires linking to a File component to provide access to the file system for simulation and runtime, this could be the File SD, File RPI or File AppDeveloper components.


Macro reference

Initialise

Fc9-comp-macro.png Initialise
Sets up the I2C bus ready for communications with the device. Returned value: 0 = Success 
Fc9-u8-icon.png - BYTE Return


SampleSglRaw

Fc9-comp-macro.png SampleSglRaw
Performs a single ADC sample on the selected ADC channel 
Fc9-u8-icon.png - BYTE Channel
Range: 0-3 
Fc9-u8-icon.png - BYTE Mode
Single-Shot Mode - powers down when conversion has finished. Range 0 to 1. 0 = Continuous, 1 = Single-Shot 
Fc9-u8-icon.png - BYTE Gain
GAIN 0 = 6.144V, 1 = 4.096V, 2 = 2.048V, 3 = 1.024V, 4 = 0.512V 5 = +- 0.256V 
Fc9-u16-icon.png - UINT Return


SampleSglVolts

Fc9-comp-macro.png SampleSglVolts
Performs a single ADC sample on the selected ADC channel 
Fc9-u8-icon.png - BYTE Channel
Range: 0-3 
Fc9-u8-icon.png - BYTE Mode
Single-Shot Mode - powers down when conversion has finished. Range 0 to 1. 0 = Continuous, 1 = Single-Shot 
Fc9-u8-icon.png - BYTE Gain
GAIN 0 = 6.144V, 1 = 4.096V, 2 = 2.048V, 3 = 1.024V, 4 = 0.512V 5 = +- 0.256V 
Fc9-f32-icon.png - FLOAT Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Connections
Fc9-type-16-icon.png Device Address
ADDR connects either to the GDN, VDD, SDA or SCL to determing the address of the ADC.  
Fc9-type-16-icon.png Channel
Channel selection 
Fc9-type-5-icon.png SDA
Pin used for SDA (data signal) 
Fc9-type-5-icon.png SCL
Pin used for SCL (clock signal) 
Fc9-type-7-icon.png Stop Delay
On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications.  
Fc9-type-16-icon.png Baud Select
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
Baud rate to be used 
Fc9-type-5-icon.png RDY/ALRT
 
Fc9-conn-icon.png Configuation
Fc9-type-16-icon.png Samples Per Sec
 
Fc9-conn-icon.png Simulation
Fc9-type-16-icon.png Gain A0
Gain is for simulation only. The hardware ADC gain is set within the function parameter.  
Fc9-type-16-icon.png Gain A1
Gain is for simulation only. The hardware ADC gain is set within the function parameter.  
Fc9-type-16-icon.png Gain A2
Gain is for simulation only. The hardware ADC gain is set within the function parameter.  
Fc9-type-16-icon.png Gain A3
Gain is for simulation only. The hardware ADC gain is set within the function parameter.  
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_ADC16Bit_ADS111x.fcfx

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