SLAAEB0 December 2023 MSPM0G1105 , MSPM0G1106 , MSPM0G1107 , MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G3105 , MSPM0G3105-Q1 , MSPM0G3106 , MSPM0G3106-Q1 , MSPM0G3107 , MSPM0G3107-Q1 , MSPM0G3505 , MSPM0G3505-Q1 , MSPM0G3506 , MSPM0G3506-Q1 , MSPM0G3507 , MSPM0G3507-Q1 , MSPM0L1105 , MSPM0L1106 , MSPM0L1303 , MSPM0L1304 , MSPM0L1305 , MSPM0L1306 , MSPM0L1343 , MSPM0L1344 , MSPM0L1345 , MSPM0L1346
The ADC to I2C subsystem example demonstrates how to use the internal ADC to convert an analog signal into a digital representation and transfer the result through I2C. The example configures the MCU to act as an external ADC, receive I2C commands from an I2C controller, and execute the received command accordingly. With simple example commands provided, users can utilize the framework to implement their own commands. Optionally, the MCU can also process the ADC data before transmitting the data via I2C, which is especially useful in applications that need to process the raw data into meaningful values. Download the code for the ADC to I2C Subsystem here.
The following figure shows a block diagram of the system.
The application requires the internal ADC and 1 instance of the I2C.
Sub-block Functionality | Peripheral Used | Notes |
---|---|---|
Analog signal capture | ADC | Called ADC12_0_INST in code |
Sending ADC data | I2C | Device is the target for this example |
Based on the requirements in the Required Peripherals table some compatible devices and corresponding EVMs are listed below. Other MSPM0 devices can be used with this subsystem as long as they have the required peripherals.
Compatible Devices | EVM |
---|---|
MSPM0Lxxx | LP-MSPM0L1306 |
MSPM0Gxxx | LP-MSPM0G3507 |