Not sure how to explain this, but here goes:
I need to figure out how to split a value in a byte variable, into 2 bytes. Exactly like this:
Say a byte variable A as a decimal value of 34. I want to split that, into say, B and C. B has 3, C has 4.
So when A is 34, its split into 3-4. 3 goes into B, 4 goes into C.
So if its 9, 0 goes into B, 9, goes into C.
Or, if its 14, then 1 goes into B, 4 goes into C. if its 95, 9 goes into B, 5 goes into C.
Get what i mean? Is this possible?
The purpose is this: When I increment a number, I need to split this number into 2 bytes to go over a transmission packet.
So for example if the number is 62, the packet would 06 02.
[b:c3a212fefa][color=red:c3a212fefa](BASCOM-AVR version : 2.0.7.7 , Latest : 2.0.7.6 )[/b:c3a212fefa][/color:c3a212fefa]
↧