Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How does DSP convert the number sent by serial port into floating-point data
How does DSP convert the number sent by serial port into floating-point data
There are many ways to store and represent floating-point numbers. Sign bit, exponent bit and decimal bit are divided in different ways. There are floating-point numbers represented by IQMATH in TI fixed-point DSP. In floating-point DSP, there are usually special instructions (such as 67X+ series INTSP instructions), which can directly convert fixed points into floating points. Generally speaking, you can convert directly in the source program. Suppose your serial port sends a fixed number of points. You store the data sent by serial port in Uint8 rcvbuf[i]. Since the serial port generally receives one byte at a time, the fixed point of reception is usually 16 or 32 bytes, so the value can be assigned first: uint32inttemp = (rcvbuf [I].