Mark Lazarides
Member
I want to run a routine seven times. Would something like this work?:
I'm not sure about my use (and understanding) of RRFNC. also am i checking the lsb using BTFSC COunter,1 ?
Any suggestions appreciated..
Mark
Code:
Counter equ 20 ; variable to put the counter in
; Main code here.
; At some point it'll call RoutineName
RoutineName
movlw b'01111111'
movwf Counter
RoutineLoop
Goto Transmit ; this being the routine to be done seven times
RRNFC Counter,1 ; roll the bits right, don't use carry, store result in counter?
BTFSC Counter,1 ; check counter. skip next line if it's clear?
Goto RoutineLoop ; repeat loop if there are still bits in Counter
Return ; if there are no bits in Counter return to where RoutineName was called
I'm not sure about my use (and understanding) of RRFNC. also am i checking the lsb using BTFSC COunter,1 ?
Any suggestions appreciated..
Mark