Part Number:BOOSTXL-SENSORS
Tool/software: Code Composer Studio
As I want to measure voltage with the accelerations, I add 14 bit ADC program as below
(1) initialize ADC14
(2) start ADC14 conversion and get data and send it as text.
I can get the voltage with acceleration all right.
input voltage 0.0 V
[Fri May 25 12:41:17.899 2018] accel,-832,440,16395,voltage,1
[Fri May 25 12:41:17.909 2018] accel,-830,442,16393,voltage,1
input voltage 1.3 V
3.3/2^14*6698 = 1.349 V
[Fri May 25 12:42:09.538 2018] accel,-834,450,16413,voltage,6698
[Fri May 25 12:42:09.548 2018] accel,-834,450,16413,voltage,6698
input voltage 3.1 V
3.3/2^14*15297 = 3.081 V
[Fri May 25 12:42:29.810 2018] accel,-830,439,16408,voltage,15297
[Fri May 25 12:42:29.820 2018] accel,-830,439,16408,voltage,15297
There is one problem.
When I tried to wait for the completion of the ADC14 as below -
while(ADC14_isBusy())
{
}
The program is stopped here forever.
So, I comment it out.
Are there any better way to wait for completion of the ADC14 conversion ?
Just wait for several micro-second and read the result is OK ?
Hope to receive some answer soon !
while(ADC14_isBusy()) { }