Component: ADC QUAD + DAC (PCF8591) (Analog Input)

From Flowcode Help
Revision as of 16:27, 7 January 2022 by Wiki bot (talk | contribs)
Jump to navigationJump to search
Author Matrix TSL
Version 1.0
Category Analog Input


ADC QUAD + DAC (PCF8591) component

An I2C device allowing for up to 4 x 8-bit analogue inputs as well as 1 x 8-bit analogue output. Up to 8 devices can be used together ona signel I2C bus.

Component Pack

BASICIO

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

Fc9-comp-macro.png EnableDAC
Enables and Disables the DAC output, Default Disabled. 
Fc9-bool-icon.png - BOOL Enabled
0=Disabled, 1=Enabled 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png WriteDAC
Writes a value to the digital to analogue output. 
Fc9-u8-icon.png - BYTE Value
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetupADC
Configures how the ADC inputs are wired 
Fc9-u8-icon.png - BYTE Configuration
Range: 0-3, Default 0 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SampleADC
Performs a single ADC sample on the selected ADC channel 
Fc9-u8-icon.png - BYTE Channel
Range: 0-3 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png Initialise
Sets up the I2C bus ready for communications with the device. 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-7-icon.png Scope Traces
Selects if the component pin connections are automatically generated on the data recorder window or not. Yes: Automatically add the component pins to a group on the data recorder which will reflect the sim data during simultion. No: Do not show the pin signals on the data recorder window. 
Fc9-type-7-icon.png Console Data
Selects if the console data is automatically generated or not 
Fc9-type-16-icon.png API
Specifies the injector component on the panel to interact with to provide comms simulation. 
Fc9-conn-icon.png Connections
Fc9-type-16-icon.png Device Address
The address pins are used to allow up to 8 individual devices to be connected onto an I2C bus. Sets the state of the pins. 
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-conn-icon.png Simulations
Fc9-type-7-icon.png Simulate Comms
Allows the communications to be simulated overriding the value on the panel slider controls.