Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 231901

Forum Post: RE: TMS320F28335: Sending two different data values TPWM value & Duty value(CMPA/CMPB) through python code/Terminal using UART then how DSP recognize that serial communication identify the receive data in which buffer of SCIA or SCIC???

$
0
0
Hi Arsalan, Please be sure to check the board schematics located in C2000Ware ([C2000Ware]\boards\controlCARDs\TMDSCNCD28335). The switch controls the SCI RX connection. You would need two RS232 connections to the SCI module's designated GPIOs if you wanted to use both SCIA and SCIC. You can use one SCI port to send both values. In that case, you would send the string data from PC, receive the data, and then parse the data (first 4 characters for TPWM and last 4 characters for duty). Once you receive the eight characters into a buffer, you can take the last four characters and convert them to integers and fractional values to sum up to the duty value. Perhaps something like: Uint32 intPart = buffer[4] - '0'; Uint32 fractionalPart1 = buffer[6] - '0'; Uint32 fractionalPart2 = buffer[7] - '0'; Duty = intPart + (fractionalPart1 * 0.1) + (fractionalPart2 * 0.01); Best Regards, Allison

Viewing all articles
Browse latest Browse all 231901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>