Hi,
I Want to check the 8bits of 29 registers on each interrupt.
Means
In 1st interrupt the code checks bit 7 of the 29 registers.
In 2nd interrupt the code checks bit 6 of the 29 registers.
In 3rd interrupt the code checks bit 5 of the 29 registers.
In 4th interrupt the code checks bit 4 of the 29 registers.
In 5th interrupt the code checks bit 3 of the 29 registers.
In 6th interrupt the code checks bit 2 of the 29 registers.
In 7th interrupt the code checks bit 1 of the 29 registers.
In 8th interrupt the code checks bit 0 of the 29 registers.
Is there any method to add a variable to the bit ? Otherwise I have to write the same code 8 times.
I Want to check the 8bits of 29 registers on each interrupt.
Means
In 1st interrupt the code checks bit 7 of the 29 registers.
In 2nd interrupt the code checks bit 6 of the 29 registers.
In 3rd interrupt the code checks bit 5 of the 29 registers.
In 4th interrupt the code checks bit 4 of the 29 registers.
In 5th interrupt the code checks bit 3 of the 29 registers.
In 6th interrupt the code checks bit 2 of the 29 registers.
In 7th interrupt the code checks bit 1 of the 29 registers.
In 8th interrupt the code checks bit 0 of the 29 registers.
Is there any method to add a variable to the bit ? Otherwise I have to write the same code 8 times.
Code:
ISR_1
movlw .29
movwf Col_Counter
nxtbyte
bcf SR_Data ; 1
btfss INDF,7 ; 1
bsf SR_Data ; 1
bsf SR_Clock ; 1
bcf SR_Clock ; 1
movlw .2 ; 1
addwf FSR,F ; 1
decfsz Col_Counter,F ; 1
goto nxtbyte ; 2