Searching \ for '[PIC] Reading BCD switch' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: massmind.org/techref/microchip/devices.htm?key=pic
Search entire site for: 'Reading BCD switch'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Reading BCD switch'
2009\06\10@215020 by inventerprises

face picon face
[added a subject]

> START        movf    GPIO,0            ;move GPIO to w
>            movwf    COUNT            ;move w to COUNT
>            movlw    0Fh                ;put 0Fh in w
>            xorwf    COUNT,1            ;xor w with COUNT to mask

Dave, wouldn't AND be the story ?

movfw gpio  ;read whole port
andlw b'00001111'  ;mask out high nybble, retain low nybble
movwf count  ;store

When you say it doesn't turn off, I suspect that it does but using
xorwf may set count to a large value. If you wait long enough (up
to 255 seconds) you should see it turn off


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