Jump to content

Component: ADC (MCP356X) (Analog Input)

From Flowcode Help
Revision as of 11:08, 17 November 2021 by Wiki bot (talk | contribs) (Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | MatrixTSL |- | width="20%" style="color:gray;" | Version | 1.0 |- | width="20%" style="color:gray;...")
Author MatrixTSL
Version 1.0
Category Analog Input


ADC (MCP356X) component

An external ADC featuring 2, 4, or 8 channel 24-bit input. Capable of reading each channel independently or in differential mode. Communication using an SPI bus up to 20MHz.

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

Downloadable macro reference

SampleADC
Performs a single ADC sample and returns the result as a 24-bit value 
- BYTE PositiveChannel
0=CH0 - 7=CH7, 8=GND, 9=VDD, 11=REF+, 12=REF-, 13=TP, 14=TM, 15=VCM 
- BYTE NegativeChannel
0=CH0 - 7=CH7, 8=GND, 9=VDD, 11=REF+, 12=REF-, 13=TP, 14=TM, 15=VCM 
[[File:]] - Return


Initialise
Confgures the SPI bus ready for communications and initialises the MCP356X device. Returns true if device is responding to commands. 
[[File:]] - Return



Property reference

Properties
Device Type
 
Device Address
These bits are fixed from the manufacturer and by default are 01. Used as Bits 6 and 7 of the command byte. Alternative bits must be requested from the manufacturer. 
Clock Selection
 
Sensor Bias Current
 
ADC Bias Current
 
AMCLK Prescaler
 
Oversampling Ratio
 
ADC Gain
 
IRQ Mode
 
Scope Traces
Selects if the scope traces are automatically generated or not 
Console Data
Selects if the console data is automatically generated or not 
API
Selects the API Slave to use to send and receive real world SPI data during simulation. 
Connections
Channel
SPI Channel selector 
Prescale
Prescale option selector 
MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
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.  
Use IRQ
No: Use polling of the status register to determine when an ADC sample is complete. Yes: Use the IRQ interrupt pin to determine when an ADC sample is complete. 
IRQ Pin
Connected to the IRQ pin of the device, goes low on an interrupt event such as sample complete. 
Simulations
Simulate Comms
No: Simulation is done using panel sliders. Yes: Send SPI data via API interface and show real time data using panel sliders.