0
Spliting value in 2 byte in generic frame
Hi everyone,
I need to send a generic frame, but the generic parameters are not always the same size. For example, in a certain mode, I have to send four 2-bytes parameter on my frame and in another mode, I have to send eight 1-byte parameter.
How can I manage this ? Can I split the 2-bytes parameters in two 1-byte parameter so I have just 8 generic 1-byte parameter (value depending on the mode) ?
Thanks in advance for your ideas.
Customer support service by UserEcho
No ideas ?
Hi use functions Modulus (mod) and divisor (div) to split the 2 byte value.
Splitting bytes.idsx
Take a look at BAND (Bit And) for splitting the byte into bits.
Use BAND to mask a byte or word.
Splitting bytes and bits.idax