try some asm
untested but should be close
bcnt var byte bank 1
dcnt var byte bank 1
dspbuff var byte[380] ;36 displays + 2 outside of display * 10
Code:
rotate_r: ' pic18
asm
banksel _bcnt ;ROW
movlw 10 ;10 rows
movwf _bcnt
clrf FSR0H
movlw low (_dspbuff)
movwf FSR0L
movlw 111 ;BUFFER SIZE low byte (380-1) 36 displays + 2 outside of display * 10-1
ADDWF FSR0L,F
movlw high (_dspbuff)
ADDWFC FSR0H
movlw 1 ;BUFFER SIZE high byte (380)
ADDWF FSR0H
banksel _bcnt ;note place bcnt and dcnt in same bank
MOVLW 38 ;36 displays + 2 outside of display
NROW
movwf _dcnt
bcf STATUS, C
Ncol
rrcf POSTDEC0 ,f ;PER COLUMN
DECFSZ _dcnt ,F
BRA Ncol
BNC NBNC
bsf PLUSW0,7 ;max displays would be 127 to use plusw
NBNC
DECFSZ _bcnt ,F
BRA NROW
banksel 0
endasm
this is my 4 panel code for reference
Code:
rotate: ;pic18
asm
banksel _bcnt ;ROW
movlw 8
movwf _bcnt
clrf FSR0H
movlw low (_dspbuff)
movwf FSR0L
movlw 31 ;BUFFER SIZE
ADDWF FSR0L,F
movlw high (_dspbuff)
ADDWFC FSR0H
banksel _bcnt
MOVLW 4
NROW
bcf STATUS, C
rrcf POSTDEC0 ,f ;PER COLUMN
rrcf POSTDEC0 ,f ;PER COLUMN
rrcf POSTDEC0 ,f ;PER COLUMN
rrcf POSTDEC0 ,f ;PER COLUMN
BNC NBNC
bsf PLUSW0,7
NBNC
DECFSZ _bcnt ,F
BRA NROW
endasm
Bookmarks