Exact match. Not showing close matches.
'[PIC] Reading BCD switch'
[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
- New search...