Hi Guys,
I'm working on KL05Z. I accomplished 12 bit ADC of temperature of MCU and now I wish to send the result to PC.
I used the 16 bit variant to content the result , when I try to cast (byte), for sending data ,the result become " #".
Do you know how to solve this problem ?
your reply will be highly appreciate ,
Thanks,
Minh.
Hi
Usually one would send the value as ASCII coded hex (for example)
0x1234 from ADC could be sent as "1234" (4 bytes on the UART).
If you simply cast to a byte you will lose 8 bits of the value. You could also send as 2 binary values rather than 1 (0x1234 -> 0x12 + 0x34)
Regards
Mark