I am familiar with the Arduino programming tools but have relatively small experience with embedded programming. When using decimal numbers in the Arduino I never had any issues, so when I recently started playing around with TI's Launchpad F28069M(TMS320F28069M Chip), I was surprised that my math was not yielding my expected results. While doing research, I realized that the TI chip has a fixed point processor which may explain why my decimals are being truncated to 0. (See brief code example)
My questions are the following:
My Code
Uint16 A;
main()
{
A = .25;
}
Result from Expression Window in TI's CCS: Expression Window CCS
Try with this code instead:
float A;
main()
{
A = .25;
}