Go Down

Topic: Understanding bits translations (Read 395 times) previous topic - next topic

KirAsh4

Hrm yes.  I somewhat understand that.  But I still don't know what I should be passing to AlarmBits ...  I see it getting passed within the library code and what not ...

KirAsh4

Figured it out!  Thanks for the hint!

The solution is to pass those bits in as hex values, so
Code: [Select]
once a second                  1111  = 0x0f
when secs match                1110  = 0x0e
when mins + secs match         1100  = 0x0c
when hrs + mins + secs match   1000  = 0x08

AWOL

Quote
The solution is to pass those bits in as hex values, so

Or as binary values,
0b1111  etc
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

KirAsh4

I suppose that would work too AWOL.  I just stuck to the same format that the library was using.  Though looking at it in binary format makes more sense since it actually matches exactly what the table shows and one doesn't have to convert it to HEX values.

AWOL

Or, if you've got a lot of these operations, give the individual bits names, and use OR operations to combine them.
Easier to read and therefore to maintain.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Go Up