;******************************************************** ; ; The LED matrix control processing ; ; Author : sir Alex ;******************************************************** list p=pic16f876 include p16f876.inc __config _hs_osc & _wdt_off & _pwrte_on & _cp_off & _lvp_off & _boden_on errorlevel -302 ;Eliminate bank warning ;**************** Label Definition ******************** cnt500u equ 60 ;500usec counter Address cnt1m equ 61 ;1msec counter Address cnt100m equ 62 ;100msec counter Address cnt500m equ 63 ;500msec counter Address cnt1s equ 64 ;1sec counter Address count equ 70 scratch equ 71 flag equ 72 ; which Bank is active now frame equ 73 ; rendered frames counter time equ 74 verh equ 75 niz equ 76 buff_1 equ h'c0' ;invisible buffer to store one letter buff_2 equ h'c1' ;it is assumed here, that letter will be buff_3 equ h'c2' ;5 pixels in width buff_4 equ h'c3' ;and 2 pixels will separate one letter from another buff_5 equ h'c4' ;from this buffer new letter is shifted into videoram buff_6 equ h'c5' ;and so, becomes visible in the screen buff_7 equ h'c6' dsh_count equ 77 ; counter for column, that been shifted in from invisible buffer to videoram byte1 equ 78 ; three bytes for USART -> EEPROM transfer byte2 equ 79 byte3 equ h'7a' screenrefresh equ h'7b' ref2 equ h'7c' ; some multiplicative value to increase number of fraim repaints easily, actually the counter of outer cycle temprefresh equ h'7d' refstore equ h'7e' ;**************** Program Start *********************** org 0 ;Reset Vector goto init org 4 ;Interrupt Vector goto init ;**************** Initial Process ********************* org 5 init movlw d'16' ;default speed value movwf refstore bsf status,rp0 ;Change to Bank1 movlw b'11110000' movwf trisc clrf trisa ;Set PORTA to Output mode clrf trisb ;Set PORTB to Output mode bcf status,rp0 ;Change to Bank0 movlw h'00' ;Set LED off data movwf portb ;Output data call usart_init start movlw d'16' ;default speed value movwf refstore ; initializing EEPROM and preparing it for sequential reading call reset call eesend1 call eesend0 call eesend1 call eesend0 call eesend0 call eesend0 call eesend0 call eesend0 call eesend0 ;acknowlege call eesend0 call eesend0 call eesend0 call eesend0 call eesend0 call eesend0 call eesend0 call eesend0 call eesend0 ;acknowlege call eesend0 call eesend0 call eesend0 call eesend0 call eesend0 call eesend0 call eesend0 call eesend0 call eesend0 ;acknowlege call endcon call reset call eesend1 call eesend0 call eesend1 call eesend0 call eesend0 call eesend0 call eesend0 call eesend1 call eesend0 ;acknowlege ; clear videoram in Bank0 bcf status,rp0 movlw d'0' movwf count movlw 0x20 movwf fsr cyc1 movlw b'00000000' movwf indf incf fsr incf count btfss count,5 ; stop after 32 bytes goto cyc1 bsf status,rp0 movlw d'0' movwf count movlw 0xa0 movwf fsr ; clear videoram in Bank1 cyc2 movlw b'00000000' bsf status,rp0 movwf indf incf fsr incf count btfss count,5 goto cyc2 ; initializing process clrf frame movlw d'7' movwf dsh_count movlw b'00000000' movwf buff_1 movwf buff_2 movwf buff_3 movwf buff_4 movwf buff_5 movwf buff_6 movwf buff_7 movf refstore,0 movwf screenrefresh movlw d'1' movwf ref2 highrepeat ; top cycle, new iteration after columns are shifted repeat bcf status,rp0 ;Change to Bank0 ; check "intention of recording" pin btfss portc,5 goto recording ; if pin is low - read USART movlw b'00000000' movwf flag ; remember Bank0 movlw 0x20 ; prepare to read the first chunk of videoram movwf fsr ; indirect addressing clrf count egh0_b0 btfsc indf,0 ; checking and sending 0-th bit to shift register call dsend1 ; btfss indf,0 ; call dsend0 ; incf fsr,1 ; next column from bank0 incf count,1 ; count checked column btfss count,5 ; after 32 columns goto bank1 goto egh0_b0 ; if less then 32 columns - goto next column clrf count ; movlw b'00000001' ; remember bank movwf flag ; bsf status,rp0 ; Change to Bank1 movlw 0xa0 ; switching to the second chunk of videoram movwf fsr ; indirect addressing clrf count ; egh0_b1 ; collecting data for the second half of the first row of the screen (0-th bits of each column on Bank1) btfsc indf,0 ; checking and sending 0-th bit to shift register call dsend1 ; btfss indf,0 ; call dsend0 ; incf fsr,1 ; next column from bank1 incf count,1 ; count checked column btfss count,5 ; if less then 32 columns - goto next row goto egh0_b1 ; if less then 32 columns - goto next column clrf count bcf status,rp0 movlw b'00000000' movwf flag movlw b'00001000' ; I think this is a command to switch off decoder. but i'm not sure movwf porta call t1m ; I hoped that this will prevent the flickering of previous, already disabled row, But the cause was in base-emitter resistors for column transistors. call oport ; open latches and show the row for some time movlw b'00000000' ; now enable the first row movwf porta call t100m ;======================================================================= clrf count bcf status,rp0 movlw b'00000000' movwf flag clrf count movlw 0x20 movwf fsr egh1_b0 btfsc indf,1 call dsend1 btfss indf,1 call dsend0 incf fsr,1 incf count,1 btfss count,5 goto egh1_b0 clrf count movlw b'00000001' movwf flag bsf status,rp0 movlw 0xa0 movwf fsr clrf count egh1_b1 btfsc indf,1 call dsend1 btfss indf,1 call dsend0 incf fsr,1 incf count,1 btfss count,5 goto egh1_b1 clrf count bcf status,rp0 movlw b'00000000' movwf flag movlw b'00001000' movwf porta call t1m call oport movlw b'00000001' movwf porta call t100m ;=================================================================== clrf count bcf status,rp0 movlw b'00000000' movwf flag clrf count movlw 0x20 movwf fsr egh2_b0 btfsc indf,2 call dsend1 btfss indf,2 call dsend0 incf fsr,1 incf count,1 btfss count,5 goto egh2_b0 clrf count movlw b'00000001' movwf flag bsf status,rp0 movlw 0xa0 movwf fsr clrf count egh2_b1 btfsc indf,2 call dsend1 btfss indf,2 call dsend0 incf fsr,1 incf count,1 btfss count,5 goto egh2_b1 clrf count bcf status,rp0 movlw b'00000000' movwf flag movlw b'00001000' movwf porta call t1m call oport movlw b'00000010' movwf porta call t100m ;======================================================================= clrf count bcf status,rp0 movlw b'00000000' movwf flag clrf count movlw 0x20 movwf fsr egh3_b0 btfsc indf,3 call dsend1 btfss indf,3 call dsend0 incf fsr,1 incf count,1 btfss count,5 goto egh3_b0 clrf count movlw b'00000001' movwf flag bsf status,rp0 clrf count movlw 0xa0 movwf fsr clrf count egh3_b1 btfsc indf,3 call dsend1 btfss indf,3 call dsend0 incf fsr,1 incf count,1 btfss count,5 goto egh3_b1 clrf count bcf status,rp0 movlw b'00000000' movwf flag movlw b'00001000' movwf porta call t1m call oport movlw b'00000011' movwf porta call t100m ;====================================================================== bcf status,rp0 movlw b'00000000' movwf flag clrf count movlw 0x20 movwf fsr egh4_b0 btfsc indf,4 call dsend1 btfss indf,4 call dsend0 incf fsr,1 incf count,1 btfss count,5 goto egh4_b0 clrf count movlw b'00000001' movwf flag bsf status,rp0 movlw 0xa0 movwf fsr clrf count egh4_b1 btfsc indf,4 call dsend1 btfss indf,4 call dsend0 incf fsr,1 incf count,1 btfss count,5 goto egh4_b1 clrf count bcf status,rp0 movlw b'00000000' movwf flag movlw b'00001000' movwf porta call t1m call oport movlw b'00000100' movwf porta call t100m ;===================================================================== bcf status,rp0 movlw b'00000000' movwf flag clrf count movlw 0x20 movwf fsr egh5_b0 btfsc indf,5 call dsend1 btfss indf,5 call dsend0 incf fsr,1 incf count,1 btfss count,5 goto egh5_b0 clrf count movlw b'00000001' movwf flag bsf status,rp0 clrf count movlw 0xa0 movwf fsr clrf count egh5_b1 btfsc indf,5 call dsend1 btfss indf,5 call dsend0 incf fsr,1 incf count,1 btfss count,5 goto egh5_b1 clrf count bcf status,rp0 movlw b'00000000' movwf flag movlw b'00001000' movwf porta call t1m call oport movlw b'00000101' movwf porta call t100m ;====================================================================== bcf status,rp0 movlw b'00000000' movwf flag clrf count movlw 0x20 movwf fsr egh6_b0 btfsc indf,6 call dsend1 btfss indf,6 call dsend0 incf fsr,1 incf count,1 btfss count,5 goto egh6_b0 clrf count movlw b'00000001' movwf flag bsf status,rp0 clrf count movlw 0xa0 movwf fsr clrf count egh6_b1 btfsc indf,6 call dsend1 btfss indf,6 call dsend0 incf fsr,1 incf count,1 btfss count,5 goto egh6_b1 clrf count bcf status,rp0 movlw b'00000000' movwf flag movlw b'00001000' movwf porta call t1m call oport movlw b'00000110' movwf porta call t100m ; commented part can be used to enable the 8-th row ;======================================================================= ; bcf status,rp0 ; ; movlw b'00000000' ; movwf flag ; ; clrf count ; movlw 0x20 ; movwf fsr ; ; ;egh7_b0 ; btfsc indf,7 ; call dsend1 ; btfss indf,7 ; call dsend0 ; incf fsr,1 ; incf count,1 ; btfss count,5 ; goto egh7_b0 ; ; ; ; clrf count ; movlw b'00000001' ; movwf flag ; ; bsf status,rp0 ; movlw 0xa0 ; movwf fsr ; clrf count ;egh7_b1 ; btfsc indf,7 ; call dsend1 ; btfss indf,7 ; call dsend0 ; incf fsr,1 ; incf count,1 ; btfss count,5 ; goto egh7_b1 ; ; ; clrf count ; bcf status,rp0 ; movlw b'00000111' ; movwf porta ; call oport ; incf frame ; count each full rendering movf screenrefresh,0 ; number of frames can be changed by control symbol from eeprom xorwf frame,0 btfss status,z goto repeat ; if frame is less than screenrefresh decf ref2 ; outer cucle decrease movlw d'0' xorwf ref2,0 btfss status,z goto highrepeat ; if one image is rendered screenrefresh*ref2 times - we are shifting the string for one column datashift movf refstore,0 movwf screenrefresh movlw d'1' movwf ref2 bcf status,rp0 movlw 0x20 ; beginning of the first chunk of videoram movwf verh movwf niz incf niz movlw d'0' movwf count dsh1 movf niz,0 movwf fsr movf indf,0 movwf scratch movf verh,0 movwf fsr movf scratch,0 movwf indf incf verh incf niz incf count btfss count,5 goto dsh1 bsf status,rp0 movf 0xa0,0 bcf status,rp0 movwf 0x3f bsf status,rp0 movlw 0xa0 movwf verh movwf niz incf niz movlw d'0' movwf count dsh2 movf niz,0 movwf fsr movf indf,0 movwf scratch movf verh,0 movwf fsr movf scratch,0 movwf indf incf verh incf niz incf count btfss count,5 goto dsh2 ; shift one column from hidden buffer to videoram ; and shift columns inside buffer movf 0xc0,0 movwf 0xbf movf 0xc1,0 movwf 0xc0 movf 0xc2,0 movwf 0xc1 movf 0xc3,0 movwf 0xc2 movf 0xc4,0 movwf 0xc3 movf 0xc5,0 movwf 0xc4 movf 0xc6,0 movwf 0xc5 movf 0xc7,0 movwf 0xc6 clrf frame decfsz dsh_count goto repeat ifstop call getletter ; if all 7 columns already shifted in videoram - get a new letter buff movlw b'00000000' movwf buff_6 movwf buff_7 movlw d'7' movwf dsh_count clrf frame goto repeat ; subroutine that gets one byte from EEPROM in "sequential read" mode getadd bsf status,rp0 ; Change to Bank1 movlw b'00001000' movwf trisb ; Set PORTB3 to input bcf status,rp0 ; Change to Bank0 movlw b'00000000' ; remember bank movwf flag btfss portb,3 bcf scratch,7 ; MSB comes first btfsc portb,3 bsf scratch,7 call clck ; send clock impulse to EEPROM btfss portb,3 ; read next bit from EEPROM bcf scratch,6 btfsc portb,3 bsf scratch,6 call clck btfss portb,3 bcf scratch,5 btfsc portb,3 bsf scratch,5 call clck btfss portb,3 bcf scratch,4 btfsc portb,3 bsf scratch,4 call clck btfss portb,3 bcf scratch,3 btfsc portb,3 bsf scratch,3 call clck btfss portb,3 bcf scratch,2 btfsc portb,3 bsf scratch,2 call clck btfss portb,3 bcf scratch,1 btfsc portb,3 bsf scratch,1 call clck btfss portb,3 bcf scratch,0 btfsc portb,3 bsf scratch,0 call clck call eesend0 ; acknowlege return ; send one clock impulse to EEPROM clck bcf status,rp0 movlw b'00000000' movwf portb call wait movlw b'00000100' movwf portb call wait movlw b'00000000' movwf portb call wait btfsc flag,0 ; remember bank bsf status,rp0 call wait return ; send rising clock edge to EEPROM clck2 bcf status,rp0 movlw b'00000000' movwf portb call wait movlw b'00000100' movwf portb call wait btfsc flag,0 bsf status,rp0 call wait return ; send TRUE bit to eeprom (data + clock) eesend1 bsf status,rp0 movlw b'00000000' movwf trisb bcf status,rp0 movlw b'00001000' movwf portb call wait movlw b'00001100' movwf portb call wait movlw b'00001000' movwf portb call wait return ; send FALSE bit to eeprom (data + clock) eesend0 bsf status,rp0 movlw b'00000000' movwf trisb bcf status,rp0 movlw b'00000000' movwf portb call wait movlw b'00000100' movwf portb call wait movlw b'00000000' movwf portb call wait return ; creating "start condition" for EEPROM ; data line changes from high to low during high clock startcon bsf status,rp0 movlw b'00000000' movwf trisb bcf status,rp0 movlw b'00001000' ; data 1 appears at low clock movwf portb call wait movlw b'00001100' ; clock rises movwf portb call wait movlw b'00000100' movwf portb call wait return ; creating "end condition" for EEPROM ; data line changes from low to high during high clock endcon movlw b'00000100' movwf portb call wait movlw b'00001100' movwf portb call wait movlw b'00000000' movwf portb call wait return ; this is a recommended RESET procedure for EEPROM I'd found in a datasheet which I have forgotten ; RESET here means - to set in known state reset bsf status,rp0 movlw b'00001000' movwf trisb bcf status,rp0 call clck2 btfsc portb,3 call startcon call clck2 btfsc portb,3 call startcon call clck2 btfsc portb,3 call startcon call clck2 btfsc portb,3 call startcon call clck2 btfsc portb,3 call startcon call clck2 btfsc portb,3 call startcon call clck2 btfsc portb,3 call startcon call clck2 btfsc portb,3 call startcon call startcon return ; sends one bit to the 4094 shift register ; portb 6 is DATA ; portb 7 is CLOCK dsend1 bcf status,rp0 movlw b'00000000' movwf portb ; call wait movlw b'01000000' movwf portb ; call wait movlw b'11000000' movwf portb ; call wait movlw b'01000000' movwf portb ; call wait btfsc flag,0 bsf status,rp0 return dsend0 bcf status,rp0 ; movlw b'00000000' ; movwf portb ; call wait movlw b'00000000' movwf portb ; call wait movlw b'10000000' movwf portb ; call wait ; movlw b'00000000' ; movwf portb call wait btfsc flag,0 bsf status,rp0 return ; a couple of handmade timers... wait movlw d'0' movwf time wait1 incf time ; nop ; nop btfss time,1 goto wait1 return recording bcf status,rp0 btfsc portc,5 goto init btfss pir1,rcif goto $-3 movf rcreg,0 movwf byte1 btfsc portc,5 goto init btfss pir1,rcif goto $-3 movf rcreg,0 movwf byte2 btfsc portc,5 goto init btfss pir1,rcif goto $-3 movf rcreg,0 movwf byte3 call reset movlw b'10100000' movwf scratch call write movf byte1,0 movwf scratch call write movf byte2,0 movwf scratch call write movf byte3,0 movwf scratch call write call endcon goto recording write btfsc scratch,7 call eesend1 btfss scratch,7 call eesend0 btfsc scratch,6 call eesend1 btfss scratch,6 call eesend0 btfsc scratch,5 call eesend1 btfss scratch,5 call eesend0 btfsc scratch,4 call eesend1 btfss scratch,4 call eesend0 btfsc scratch,3 call eesend1 btfss scratch,3 call eesend0 btfsc scratch,2 call eesend1 btfss scratch,2 call eesend0 btfsc scratch,1 call eesend1 btfss scratch,1 call eesend0 btfsc scratch,0 call eesend1 btfss scratch,0 call eesend0 call eesend0 ; acknowledge return ; I think this should control Output Enable pin of 4094 shift-register oport bcf status,rp0 movlw b'00000000' movwf portc call wait movlw b'00001111' movwf portc call wait movlw b'00000000' movwf portc btfsc flag,0 bsf status,rp0 return ;******************************************************** ; Timer Subroutine for 10MHz clock ;******************************************************** ;************* 1msec Timer Subroutine ***************** t1m movlw d'2' ;(1) Set loop cnt1 movwf cnt1m ;(1) Save loop cnt1 tm1lp1 movlw d'20' ;(1)*2 Set loop cnt2 movwf cnt500u ;(1)*2 Save loop cnt2 tm1lp2 nop ;(1)*249*2 Time adjust nop ;(1)*249*2 Time adjust decfsz cnt500u,f ;(1)*249*2 cnt500u-1=0 ? goto tm1lp2 ;(2)*248*2 No, continue decfsz cnt1m,f ;(1)*2 cnt1m-1=0 ? goto tm1lp1 ;(2) No. Continue return ;(2) Yes. Cnt end ;Total 2501*0.4usec=1msec ;************* 100msec Timer Subroutine *************** t100m movlw d'20' ;Set loop counter movwf cnt100m ;Save loop counter tm2lp call t1m ;1msec subroutine decfsz cnt100m,f ;cnt100m - 1 = 0 ? goto tm2lp ;No. Continue return ;Yes. Count end ;************* 500msec Timer Subroutine *************** t500m movlw d'5' ;Set loop counter movwf cnt500m ;Save loop counter tm3lp call t100m ;100msec subroutine decfsz cnt500m,f ;cnt500m - 1 = 0 ? goto tm3lp ;No. Continue return ;Yes. Count end ;************** 1sec Timer Subroutine ***************** t1s movlw d'2' ;Set loop counter movwf cnt1s ;Save loop counter tm4lp call t500m ;500msec subroutine decfsz cnt1s,f ;cnt1s - 1 = 0 ? goto tm4lp ;No. Continue return ;Yes. Count end USART_Init ; ; Data speed for 24MHZ clock bsf STATUS,RP0 ; bank 0 movlw d'155' ; 9600 movwf SPBRG ; High speed mode. bsf TXSTA,BRGH ; Asynchronous mode bcf TXSTA,SYNC bcf STATUS,RP0 ; Bank 0. bsf RCSTA,SPEN ; ;---------------------Initialising transmitter------------------------------- ; bsf STATUS,RP0 ; Bank 1. ; Disable interrupt at the end of transmission. bcf PIE1,TXIE ; Disable transmission of the nineth bit bcf TXSTA,TX9 ; Enable transmission bsf TXSTA,TXEN ; ;----------------------Initialising receiver-------------------------------- ; ; Enable interrupt at the end of reception. ; bsf PIE1,RCIE bcf STATUS,RP0 ; Bank 0. ; Disable reception of the nineth bit bcf RCSTA,RX9 ; Disable addressing bcf RCSTA,ADDEN ; Enable reception bsf RCSTA,CREN return ; all further code is generated automatically until the END statement. ;************** CHARACTER GENERATOR getletter call getadd ; get byte from EEPROM bcf status,z bsf status,rp0 movlw d'204' ; compare received byte with '204' xorwf scratch,0 btfsc status,z goto start ; if it is 204 - run string from the beginning movlw d'205' xorwf scratch,0 btfsc status,z goto pause1 movlw d'206' xorwf scratch,0 btfsc status,z goto pause2 movlw d'207' xorwf scratch,0 btfsc status,z goto pause3 ;------------------------------ SPEED --------------------------- movlw d'210' xorwf scratch,0 btfsc status,z goto speed0 movlw d'211' xorwf scratch,0 btfsc status,z goto speed1 movlw d'212' xorwf scratch,0 btfsc status,z goto speed2 movlw d'213' xorwf scratch,0 btfsc status,z goto speed3 movlw d'214' xorwf scratch,0 btfsc status,z goto speed4 movlw d'215' xorwf scratch,0 btfsc status,z goto speed5 movlw d'216' xorwf scratch,0 btfsc status,z goto speed6 movlw d'217' xorwf scratch,0 btfsc status,z goto speed7 movlw d'218' xorwf scratch,0 btfsc status,z goto speed8 movlw d'219' xorwf scratch,0 btfsc status,z goto speed9 movlw d'220' xorwf scratch,0 btfsc status,z goto speed10 movlw d'221' xorwf scratch,0 btfsc status,z goto speed11 movlw d'222' xorwf scratch,0 btfsc status,z goto speed12 movlw d'223' xorwf scratch,0 btfsc status,z goto speed13 movlw d'224' xorwf scratch,0 btfsc status,z goto speed14 movlw d'225' xorwf scratch,0 btfsc status,z goto speed15 movlw d'226' xorwf scratch,0 btfsc status,z goto speed16 movlw d'227' xorwf scratch,0 btfsc status,z goto speed17 movlw d'228' xorwf scratch,0 btfsc status,z goto speed18 movlw d'229' xorwf scratch,0 btfsc status,z goto speed19 bsf pclath,3 ; prepare to call subroutine in Page1 from Page0 goto new ; call character generator pause1 movlw d'255' movwf screenrefresh movlw d'2' movwf ref2 goto ifstop pause2 movlw d'255' movwf screenrefresh movlw d'4' movwf ref2 goto ifstop pause3 movlw d'255' movwf screenrefresh movlw d'8' movwf ref2 goto ifstop speed0 movlw d'2' movwf refstore goto ifstop speed1 movlw d'3' movwf refstore goto ifstop speed2 movlw d'4' movwf refstore goto ifstop speed3 movlw d'5' movwf refstore goto ifstop speed4 movlw d'6' movwf refstore goto ifstop speed5 movlw d'7' movwf refstore goto ifstop speed6 movlw d'8' movwf refstore goto ifstop speed7 movlw d'9' movwf refstore goto ifstop speed8 movlw d'10' movwf refstore goto ifstop speed9 movlw d'11' movwf refstore goto ifstop speed10 movlw d'12' movwf refstore goto ifstop speed11 movlw d'13' movwf refstore goto ifstop speed12 movlw d'14' movwf refstore goto ifstop speed13 movlw d'15' movwf refstore goto ifstop speed14 movlw d'16' movwf refstore goto ifstop speed15 movlw d'17' movwf refstore goto ifstop speed16 movlw d'18' movwf refstore goto ifstop speed17 movlw d'19' movwf refstore goto ifstop speed18 movlw d'20' movwf refstore goto ifstop speed19 movlw d'22' movwf refstore goto ifstop ; henceforth we are on the Page1 of the program memory org 0x800 ; finishing process of placing a new letter in the hidden buffer buff movlw b'00000000' ; space between letters movwf buff_6 movwf buff_7 movlw d'7' ; buffer is full movwf dsh_count clrf frame ; no frames were rendered bcf pclath,3 ; return to the program memory bank0 goto repeat ; new movlw 0x0 xorwf scratch,0 btfsc status,z goto ltr_0x0 movlw 0x20 xorwf scratch,0 btfsc status,z goto ltr_0x20 movlw 0x21 xorwf scratch,0 btfsc status,z goto ltr_0x21 movlw 0x22 xorwf scratch,0 btfsc status,z goto ltr_0x22 movlw 0x23 xorwf scratch,0 btfsc status,z goto ltr_0x23 movlw 0x24 xorwf scratch,0 btfsc status,z goto ltr_0x24 movlw 0x25 xorwf scratch,0 btfsc status,z goto ltr_0x25 movlw 0x26 xorwf scratch,0 btfsc status,z goto ltr_0x26 movlw 0x61 xorwf scratch,0 btfsc status,z goto ltr_0x61 movlw 0x62 xorwf scratch,0 btfsc status,z goto ltr_0x62 movlw 0x63 xorwf scratch,0 btfsc status,z goto ltr_0x63 movlw 0x64 xorwf scratch,0 btfsc status,z goto ltr_0x64 movlw 0x65 xorwf scratch,0 btfsc status,z goto ltr_0x65 movlw 0x66 xorwf scratch,0 btfsc status,z goto ltr_0x66 movlw 0x67 xorwf scratch,0 btfsc status,z goto ltr_0x67 movlw 0x68 xorwf scratch,0 btfsc status,z goto ltr_0x68 movlw 0x69 xorwf scratch,0 btfsc status,z goto ltr_0x69 movlw 0x6a xorwf scratch,0 btfsc status,z goto ltr_0x6a movlw 0x6b xorwf scratch,0 btfsc status,z goto ltr_0x6b movlw 0x6c xorwf scratch,0 btfsc status,z goto ltr_0x6c movlw 0x6d xorwf scratch,0 btfsc status,z goto ltr_0x6d movlw 0x6e xorwf scratch,0 btfsc status,z goto ltr_0x6e movlw 0x6f xorwf scratch,0 btfsc status,z goto ltr_0x6f movlw 0x70 xorwf scratch,0 btfsc status,z goto ltr_0x70 movlw 0x71 xorwf scratch,0 btfsc status,z goto ltr_0x71 movlw 0x72 xorwf scratch,0 btfsc status,z goto ltr_0x72 movlw 0x73 xorwf scratch,0 btfsc status,z goto ltr_0x73 movlw 0x74 xorwf scratch,0 btfsc status,z goto ltr_0x74 movlw 0x75 xorwf scratch,0 btfsc status,z goto ltr_0x75 movlw 0x76 xorwf scratch,0 btfsc status,z goto ltr_0x76 movlw 0x77 xorwf scratch,0 btfsc status,z goto ltr_0x77 movlw 0x78 xorwf scratch,0 btfsc status,z goto ltr_0x78 movlw 0x79 xorwf scratch,0 btfsc status,z goto ltr_0x79 movlw 0x7a xorwf scratch,0 btfsc status,z goto ltr_0x7a movlw 0xff xorwf scratch,0 btfsc status,z goto ltr_0xff goto ltr_0xff ;************** LETTER IMAGES ltr_0x0 movlw b'00000000' movwf buff_1 movlw b'00000000' movwf buff_2 movlw b'00000000' movwf buff_3 movlw b'00000000' movwf buff_4 movlw b'00000000' movwf buff_5 goto buff ltr_0x20 movlw b'00000000' movwf buff_1 movlw b'00000000' movwf buff_2 movlw b'00000000' movwf buff_3 movlw b'00000000' movwf buff_4 movlw b'00000000' movwf buff_5 goto buff ltr_0x21 movlw b'00000000' movwf buff_1 movlw b'00000000' movwf buff_2 movlw b'10011110' movwf buff_3 movlw b'00000000' movwf buff_4 movlw b'00000000' movwf buff_5 goto buff ltr_0x22 movlw b'00000000' movwf buff_1 movlw b'00001110' movwf buff_2 movlw b'00000000' movwf buff_3 movlw b'00001110' movwf buff_4 movlw b'00000000' movwf buff_5 goto buff ltr_0x23 movlw b'00101000' movwf buff_1 movlw b'11111110' movwf buff_2 movlw b'00101000' movwf buff_3 movlw b'11101110' movwf buff_4 movlw b'00101000' movwf buff_5 goto buff ltr_0x24 movlw b'01001000' movwf buff_1 movlw b'01010100' movwf buff_2 movlw b'11111110' movwf buff_3 movlw b'01010100' movwf buff_4 movlw b'00100100' movwf buff_5 goto buff ltr_0x25 movlw b'01000110' movwf buff_1 movlw b'00100110' movwf buff_2 movlw b'00010000' movwf buff_3 movlw b'11001000' movwf buff_4 movlw b'11000100' movwf buff_5 goto buff ltr_0x26 movlw b'00000000' movwf buff_1 movlw b'00000000' movwf buff_2 movlw b'00000000' movwf buff_3 movlw b'00000000' movwf buff_4 movlw b'00000000' movwf buff_5 goto buff ltr_0x61 movlw b'01000000' movwf buff_1 movlw b'10101000' movwf buff_2 movlw b'10101000' movwf buff_3 movlw b'10101000' movwf buff_4 movlw b'11110000' movwf buff_5 goto buff ltr_0x62 movlw b'11111110' movwf buff_1 movlw b'10010000' movwf buff_2 movlw b'10010000' movwf buff_3 movlw b'10010000' movwf buff_4 movlw b'01100000' movwf buff_5 goto buff ltr_0x63 movlw b'01110000' movwf buff_1 movlw b'10001000' movwf buff_2 movlw b'10001000' movwf buff_3 movlw b'10001000' movwf buff_4 movlw b'10001000' movwf buff_5 goto buff ltr_0x64 movlw b'01100000' movwf buff_1 movlw b'10010000' movwf buff_2 movlw b'10010000' movwf buff_3 movlw b'10010000' movwf buff_4 movlw b'11111110' movwf buff_5 goto buff ltr_0x65 movlw b'01110000' movwf buff_1 movlw b'10101000' movwf buff_2 movlw b'10101000' movwf buff_3 movlw b'10101000' movwf buff_4 movlw b'10110000' movwf buff_5 goto buff ltr_0x66 movlw b'00000000' movwf buff_1 movlw b'00010000' movwf buff_2 movlw b'11111100' movwf buff_3 movlw b'00010010' movwf buff_4 movlw b'00000100' movwf buff_5 goto buff ltr_0x67 movlw b'10010000' movwf buff_1 movlw b'10101000' movwf buff_2 movlw b'10101000' movwf buff_3 movlw b'10101000' movwf buff_4 movlw b'01111000' movwf buff_5 goto buff ltr_0x68 movlw b'11111110' movwf buff_1 movlw b'00010000' movwf buff_2 movlw b'00010000' movwf buff_3 movlw b'00010000' movwf buff_4 movlw b'11100000' movwf buff_5 goto buff ltr_0x69 movlw b'00000000' movwf buff_1 movlw b'00000000' movwf buff_2 movlw b'11110100' movwf buff_3 movlw b'00000000' movwf buff_4 movlw b'00000000' movwf buff_5 goto buff ltr_0x6a movlw b'01000000' movwf buff_1 movlw b'10000000' movwf buff_2 movlw b'10000000' movwf buff_3 movlw b'01111010' movwf buff_4 movlw b'00000000' movwf buff_5 goto buff ltr_0x6b movlw b'11111110' movwf buff_1 movlw b'00100000' movwf buff_2 movlw b'01010000' movwf buff_3 movlw b'10001000' movwf buff_4 movlw b'00000000' movwf buff_5 goto buff ltr_0x6c movlw b'00000000' movwf buff_1 movlw b'10000010' movwf buff_2 movlw b'11111110' movwf buff_3 movlw b'10000000' movwf buff_4 movlw b'00000000' movwf buff_5 goto buff ltr_0x6d movlw b'11111000' movwf buff_1 movlw b'00001000' movwf buff_2 movlw b'01110000' movwf buff_3 movlw b'00001000' movwf buff_4 movlw b'11111000' movwf buff_5 goto buff ltr_0x6e movlw b'11111000' movwf buff_1 movlw b'00010000' movwf buff_2 movlw b'00001000' movwf buff_3 movlw b'00001000' movwf buff_4 movlw b'11110000' movwf buff_5 goto buff ltr_0x6f movlw b'01110000' movwf buff_1 movlw b'10001000' movwf buff_2 movlw b'10001000' movwf buff_3 movlw b'10001000' movwf buff_4 movlw b'01110000' movwf buff_5 goto buff ltr_0x70 movlw b'11111000' movwf buff_1 movlw b'00101000' movwf buff_2 movlw b'00101000' movwf buff_3 movlw b'00101000' movwf buff_4 movlw b'00010000' movwf buff_5 goto buff ltr_0x71 movlw b'00010000' movwf buff_1 movlw b'00101000' movwf buff_2 movlw b'00101000' movwf buff_3 movlw b'00101000' movwf buff_4 movlw b'11111000' movwf buff_5 goto buff ltr_0x72 movlw b'11111000' movwf buff_1 movlw b'00010000' movwf buff_2 movlw b'00001000' movwf buff_3 movlw b'00001000' movwf buff_4 movlw b'00010000' movwf buff_5 goto buff ltr_0x73 movlw b'10010000' movwf buff_1 movlw b'10101000' movwf buff_2 movlw b'10101000' movwf buff_3 movlw b'10101000' movwf buff_4 movlw b'01001000' movwf buff_5 goto buff ltr_0x74 movlw b'00001000' movwf buff_1 movlw b'00001000' movwf buff_2 movlw b'01111110' movwf buff_3 movlw b'10001000' movwf buff_4 movlw b'01001000' movwf buff_5 goto buff ltr_0x75 movlw b'01111000' movwf buff_1 movlw b'10000000' movwf buff_2 movlw b'10000000' movwf buff_3 movlw b'10000000' movwf buff_4 movlw b'01111000' movwf buff_5 goto buff ltr_0x76 movlw b'00111000' movwf buff_1 movlw b'01000000' movwf buff_2 movlw b'10000000' movwf buff_3 movlw b'01000000' movwf buff_4 movlw b'00111000' movwf buff_5 goto buff ltr_0x77 movlw b'01111000' movwf buff_1 movlw b'10000000' movwf buff_2 movlw b'01100000' movwf buff_3 movlw b'10000000' movwf buff_4 movlw b'01111000' movwf buff_5 goto buff ltr_0x78 movlw b'10001000' movwf buff_1 movlw b'01010000' movwf buff_2 movlw b'00100000' movwf buff_3 movlw b'01010000' movwf buff_4 movlw b'10001000' movwf buff_5 goto buff ltr_0x79 movlw b'00001000' movwf buff_1 movlw b'10010000' movwf buff_2 movlw b'01100000' movwf buff_3 movlw b'00010000' movwf buff_4 movlw b'00001000' movwf buff_5 goto buff ltr_0x7a movlw b'10001000' movwf buff_1 movlw b'11001000' movwf buff_2 movlw b'10101000' movwf buff_3 movlw b'10011000' movwf buff_4 movlw b'10001000' movwf buff_5 goto buff ltr_0xff movlw b'00000100' movwf buff_1 movlw b'00000010' movwf buff_2 movlw b'10100010' movwf buff_3 movlw b'00010010' movwf buff_4 movlw b'00001100' movwf buff_5 goto buff end