Two channel distance measurement

Job ID: 32661645

Budget: €2 – €6 EUR

MSP-EXP430FR4133 is the launchpad we have given .Your MSP-EXP430FR6989-LauchPad shall sample both analog signals simultaneously using a sampling frequency of 10 Hz. The analog signal for the left hand side (VA on the green board) is connected to P9.1. The
signal for the right hand side (VB on the green board) is attached to P9.2. Set P9SEL0 and P9SEL1 such
that P9.2 is used as A10 and P9.1 is used as A9 (see MSP430FR6989 Data Sheet).
Use 2.5 V as reference voltage (Register REFCTL0). The measured distance in cm is calculated by
dividing the digitized signal by 20. When the measured distance on the left hand side (right hand
side) is less than 20 cm, LED1 (LED2) shall be switched ON. The LCD shall display one of the measured distances. Use button S1 to switch between left and right hand side. When the left (right)
hand distance is displayed, Symbol TX (RX) shall be switched ON.
In the ADC initialization, select mode Sequence-of-Channels. Furthermore, select channels A9 in
ADC12MCTL0 and A10 in ADC12MCTL1. Furthermore, set the ADC12EOS bit int ADC12MCTL1 and
set ADC12MSC (Multiple channel sample) in ADC12CTL0.