Hi,
I am currently working on MCF52259 ADC module. I am using an filtering equation to conver the raw value scanned to filter value. But the filtering equation returns the value in float which should be sent to Master via a 16 bit register. I have the following doubts now
1) can we declare float variables in micro controller programming?
2) How do i transfer the converted float value to master using 16 bit register?
Looking forward for the help
Regards
sai bhargavi
Yes, floating point is supported.
As for the second question, I'm not sure what you mean. What exactly is Master and the 16-bit register? A variable of type float is 4 bytes in size. You should either split it in 2 16-bit chunks and transfer in 2 steps, or convert the float to a 16-bit type (loosing some precision in the process) and send the converted 16-bit value.