Topic: 16 bit to 8 bit
hi how can i covert 16 bit to 8 bit i got canny7.2 my ecu transmit 16 bit engine temp but my gauge cluster need to recive
8 bit how can i do it can you show me example
You are not logged in. Please login or register.
CANNY logic forum → CANNY 5.2 / 7.2 duo → 16 bit to 8 bit
hi how can i covert 16 bit to 8 bit i got canny7.2 my ecu transmit 16 bit engine temp but my gauge cluster need to recive
8 bit how can i do it can you show me example
What is the mathematical expression for the transformation you want to perform?
divider
this is the setup i am working on buffer 2 is engine temp
the setup i am working on buffer 2 is engine temp
It's not entirely clear from the diagram what exactly you want to do. Your data reception is wrong. An example of the reception can be found here: https://cannylogic.com/docs/c72duo/can/ … ample-ex_1
In particular, the meaning of this fragment is not clear:
hi what i need is my ecu send 2 byte of data 0 to 65535 for engine temp
but my gauge read 1byte 0 to 255
For linear scaling input range 0..65535 to output range 0..255 you can:
divide the input value by 256: https://cannylogic.com/docs/fbd/arithme … ns/divide/
or use bitwise right shift to 8 bit: https://cannylogic.com/docs/fbd/bitwise … ght_shift/
or use linear interpolation from one range to another: https://cannylogic.com/docs/fbd/converters/map/
CANNY logic forum → CANNY 5.2 / 7.2 duo → 16 bit to 8 bit