Sale ends todayGet 30% off any course (excluding packages)
Ends in --- --- ---
Hello.
I want to send a transbrake signal to my maxxecu, from my transmission controller
But I'm having kinda hard finding out about bit mask , the transmission controller sends out 8 bit /flags on the same byte, so need to apply a bit mask to get it to work but not entirely sure if I got it right, how do I calculate the bit mask?
Best regards Henrik
Here is the data from the transmission controller
Mask = Result
80 = Shift right by 7 bits
40 = Shift right by 6 bits
20 = Shift right by 5 bits
10 = Shift right by 4 bits
08 = Shift right by 3 bits
04 = Shift right by 2 bits
02 = Shift right by 1 bit
01 = No bit shift
so the way I have done it now with bit mask 10 should be correct for reading transbrake ( bit 4)