Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
;
; tmrbyte ____---____-----___ new sample
; oldbyte _____---____-----__ state latch
; changes ____-__-___-____-__ changes, hi or lo
;
movf tmrbyte,W ; sample it
xorwf oldbyte,W ; changes, hi or lo
xorwf oldbyte,F ; update state latch (oldbyte = tmrbyte)
movwf changes ; b4 = '1' = a b4 state change
;
; tmrbyte ____---____-----___ new sample
; oldbyte _____---____-----__ state latch
; changes ____-__-___-____-__ changes, hi or lo
;
movf tmrbyte,W ; sample it
xorwf oldbyte,W ; changes, hi or lo
xorwf oldbyte,F ; update state latch (oldbyte = tmrbyte)
andlw b'00010000' ; Z=0 (change) or Z=1 (no change)