SLAAE25 May 2021 MSP430FR2355 , MSP430FR2355
A Timer is used to control the multiplex sequence and automatically start the ADC conversion.
In this timer periods, set three CCRx values for comparison, switch the LED in each comparison interrupt and run ADC acquisition.
The ADC conversion is triggered automatically. It takes two samples: one of the SAC0 output for DC tracking and one of the SAC2 output, to calculate the heart beat and oxygen level.
To conserve power, at the completion of the ADC conversion an interrupt is generated to tell the MCU to switch off the LED.