|
Re: Set Digital out
I'm not a programmer, and so this may not be at all helpful, but I speak Binary.
Let's say you have bits one through eight and you want to set them.
Setting Bit 1 looks like this: 00000001
Setting bit 8 looks like this: 10000000
Setting both looks like this: 10000001
The first number is 1 (01h), the second number is 128 (80h), the 3rd number is 129 (81h).
So, if bit 8 is set on and all the rest are off, you're sending 80h. To turn Bit 1 on without affecting bit 8, send 81h.
As another example (work this out on paper) Bits 1, 5 and 8 on = 91h, and 1 and 5 only is 11h. Get it?
EDIT: I see it uses a binary number like 10000001, so convert the hexadecimal values in my example above to binary.
__________________
I am N2IRZ - What's your callsign?
Last edited by DonRotolo : 04-04-2009 at 21:13.
Reason: hex to binary conversion
|