Searching \ for 'MSB/LSB' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=msblsb
Search entire site for: 'MSB/LSB'.

Truncated match.
PICList Thread
'MSB/LSB'
1998\12\01@091453 by Steve Tomes

flavicon
face
what is the easy/fastest way to determin the MSB or LSB in a byte of data.
I want to raed a byte and then display either the MSB or the LSB on an 8
position bar graph while deleting the 2 LSB when displaying the MSB...and
deleting the 2 MSB when displaying the LSB.


Thank you all for grreat help!!!            STEVE TOMES

1998\12\03@032326 by Caisson

flavicon
face
> Van: Steve Tomes <spam_OUTstevetomTakeThisOuTspamGATE.NET>
> Aan: .....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU
> Onderwerp: MSB/LSB
> Datum: dinsdag 1 december 1998 14:57

Hello Steve,

> what is the easy/fastest way to determin the MSB or LSB in a byte of
data.
> I want to raed a byte and then display either the MSB or the LSB on an 8
> position bar graph while deleting the 2 LSB when displaying the MSB...and
> deleting the 2 MSB when displaying the LSB.

Your question is not quite clear to me, but I suspect that you want the
isolate one bit outof a byte.  That bit could be the one with the Highest
value, or the one with the Lowest value.  If that is what you want : read
on.  If it's not : please provide an example that clarifies the matter :-)

{subroutine start}
'Finding the Highest-value bit
'Size :17 bytes
'Result : W
'Uses : BARGRAPH

btfsc BARGRAPH,7
retlw 0x80
btfsc BARGRAPH,6
retlw 0x40
 :
 :
btfsc BARGRAPH,1
retlw 0x01
retlw 0x00

{subroutine end}

Greetz,
 Rudy Wieser

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...