I want to send 48 bytes from Bank 2 & 3 to 74HC595.Bytes must send in this order.
6fh,6B,67,63,5F
The code works the problem is this takes almost 5mS time to feed the 595's which is too long.
I want to compact my code to minimize ISR latency.
I use PIC16F88 - 4Mhz
6fh,6B,67,63,5F
The code works the problem is this takes almost 5mS time to feed the 595's which is too long.
I want to compact my code to minimize ISR latency.
I use PIC16F88 - 4Mhz
Code:
ISR
-----
-----
movlw 0EFh ;send Bank3 GPR 24 no's
call Load_S_FSR
movlw 6Fh ;send Bank2 GPR 24 no's
call Load_S_FSR
goto Make_Latch
Load_S_FSR
movwf S_FSR
movlw .24
movwf Counter
bsf STATUS,IRP
Setup_Feed
movf S_FSR,W
movwf FSR
movf INDF,W
movwf Temp
movlw .8
movwf Bit_Counter
;
Do_Feed_Loop
bcf STATUS,C
rlf Temp,F
;
Load_Shift_Reg
btfsc STATUS,C
Set_Data_Pin
bcf SR_Data ; set "DATA"
btfss STATUS,C
bsf SR_Data ; clear "DATA"
nop
Make_Clock
bsf SR_Clock ; "CLOCK" Low to High Transition
nop
bcf SR_Clock ; //
;
decfsz Bit_Counter,F
goto Do_Feed_Loop
;
Do_Next_Byte
movlw .4
subwf S_FSR,F
decfsz Counter,F
goto Setup_Feed
bcf STATUS,IRP
return
Last edited by a moderator: