This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: MSP-EXP432P401R
Hi,
I am using 14bit ADC of MSP432, and having a problem on getting read data.
I tested adc14 example codes, (ex)adc14_single_differential_2s_compliment.c code) on code composer studio.
I connected MSP432 on PC using USB cable, and connected my sensor or 3.0V battery on P.5.4 and P5.5.
I complied it and executed it successully, but I can not find the analog-to-digital conversion data.
I tried to compile and execute LED blinking example, and it worked.
I guess that the result of getting ADC14 data is "MAP_ADC14_getResult(ADC_MEM0))" but, I can I get that numerical data?
Can I print it on console? Or, do I have to do another communication like series communication to read the AD conversion data?
CheolJun,
I would recommend modifying the ADC to read the data and send it out on the backchannel (user) UART. Look at the
uart_pc_echo_12mhz_brclk driverlib example on TI Resource explorer to see how to use the UART. You can then use any
terminal program to see the ADC data as it's generated.
The uart_pc_echo_12mhz_brclk example simply reads the incoming data in an interrupt handler and transmits that same data back out. To send out your own formatted data, you'll want to use a different API than what's used there.
The example uses the following line to send data (find this at the bottom of the uart_pc_echo_12mhz_brclk.c source file):
MAP_UART_transmitData(EUSCI_A0_BASE, MAP_UART_receiveData(EUSCI_A0_BASE));
Instead, use the code snippet below to transmit ADC data:
printf(EUSCI_A0_BASE, "ADC Value: %u \r\n", adc_unsigned_result).
Regards,
Bob Landers
Mr. Landers,
Thank you for nice reply.
Do I need to connect UART channel (P1.3 & P1.2) of msp432 board to PC with USB-UART connector?
I am wondering whether I can perform UART communication with (provided)microusb-USB connector.
Also, I tried just
printf(EUSCI_A0_BASE, "HI");
But on console, what I got is a box-shaped strange letter that you can see when you open mp3 file with notepad.
[Cortex M4_0] ...
Isn't it a right way to use it?
Have a nice day!
CheolJun Park
You don't need any additional connections on the LaunchPad to connect the backchannel UART. P1.2/P1.3 are already present on the J101 header. Since you're seeing some output, that means the jumpers (RXD,TXD) are present and connecting the EUSCI_A0 UART through the USB back to your PC.
**Attention** This is a public forum