Python serial data aquisition

Flavio codeco coelho fccoelho at gmail.com
Tue Jan 11 09:09:46 CET 2005


mfuhr at fuhr.org (Michael Fuhr) wrote in message news:<41e1b833$1_3 at omega.dimensional.com>...
> If the actual byte and/or bit order is different then you'll have
> to modify the expression, but this should at least give you ideas.

Hi Michael, 

It all looks pretty god but there is a couple of things I still don't
understand, 1) in Steve's solution (which seems equivalent to your
own), he does the masking, shifts by seven, and then  sums the two
numbers while you, instead of summing, use a logical or. How can these
operations be equivalent? or are they? Is the logical or  equivalent
to a concatenation?

2) why 7? why do we have shift 7 bits? is that so the 8th bit on byte
one is aligned with the first bit on the second byte?

thanks:



More information about the Python-list mailing list