I am using Tiva C Series TM4C123GH6PM with Code Composer Studio for getting data from another microcontroller of the same type. Well, I get the data in bytes. The Goal of project is to assemble each 8 bytes and convert them to double then send these double to the computer. I have to use USART to send the data to the computer.
When I use USART, I have two Methods:
- One to get data from a USART_x: UARTCharGet(UART1_BASE)
- The other to send the data over USART_x: UARTCharPut(UART0_BASE,d)
The problem consists in having two methods that accept only characters. So using these methods for double is impossible since a double is 8 bytes and a character is one byte. I am trying to send doubles to my computer. Any idea?
The second Problem is to write a program from the side of the computer to get the data (bytes) from the microcontroller.
Should I write this program in c (an alternative is using matlab because I will use these data for simulation)? How can I access com-Port in c (or in matlab if it is possible)?