hi...
i try to improve my program for led matrix. my original program mapping charakter not in PIC16f877A. i try to build my project with mapping charakter in PIC16F877A. after reading some refences i just found nigel's tutorial with mapping character uC and with assembly . the other use high laungauge such C or picbasic.
in nigel's it use multiply for get corret data table for ascii. my problem is i use 5x7 led matrix so my data 6 bytes for each character in nigel's use 8 bytes so he use multiply 8 for get correct table data. i searching on net how to multiply just found multiply for 2,4,8,16 etc nothing with 6.
help me to do multiply 6 or the other way to fecth data table for ascii .here code from nigel's.it's original from nigel's so still multiply by 8.
here my code
i try to improve my program for led matrix. my original program mapping charakter not in PIC16f877A. i try to build my project with mapping charakter in PIC16F877A. after reading some refences i just found nigel's tutorial with mapping character uC and with assembly . the other use high laungauge such C or picbasic.
in nigel's it use multiply for get corret data table for ascii. my problem is i use 5x7 led matrix so my data 6 bytes for each character in nigel's use 8 bytes so he use multiply 8 for get correct table data. i searching on net how to multiply just found multiply for 2,4,8,16 etc nothing with 6.
help me to do multiply 6 or the other way to fecth data table for ascii .here code from nigel's.it's original from nigel's so still multiply by 8.
Code:
Message
call String_Table ;get a character from the string table
xorlw 0x00 ;is it a zero? - if so end of string
btfsc STATUS, Z
goto run1
movwf tmp2
movlw 0x20 ;subtract to get character index value
subwf tmp2, w
call Load_Char
incf offsetL1, f ;increment 16 bit pointer to string
btfsc STATUS , Z
incf offsetH1, f
goto Message
Load_Char
movwf offsetL
clrf offsetH
bcf STATUS, C ;clear carry
rlf offsetL, f ;multiply index value by 8
rlf offsetH, f
bcf STATUS, C ;clear carry
rlf offsetL, f
rlf offsetH, f
bcf STATUS, C ;clear carry
rlf offsetL, f
rlf offsetH, f
movlw 0x6 ;each character stroge 6 bytes
movwf cacah
next call ASCII_Table
movwf 27h
call shift
call gerak
incf offsetL, f ;increment 16 bit pointer to string
btfsc STATUS , Z
incf offsetH, f
decfsz cacah,1
goto next
return
Code:
ASCII_Table ;perform read from long table
movlw High(Table)
addwf offsetH, W
movwf PCLATH
movlw Low(Table)
addwf offsetL, w
btfsc STATUS , C
incf PCLATH, f
movwf PCL
String_Table ;perform read from long table
movlw High(String)
addwf offsetH1, W
movwf PCLATH
movlw Low(String)
addwf offsetL1, w
btfsc STATUS , C
incf PCLATH, f
movwf PCL
table ......
string....
here my code