date time define sda=1 rem Daten ext. EEPROM define scl=2 rem Clock ext. EEPROM define device 16C84,wdt_off,xt_osc,protect_off rem PIC-Type, kein Watchdog rem xtal 4.096 rem Quarzbasis EVM 4096 kHz xtal 24.576 rem 50 Baud bei 4096 kHz rem xtal 27.036 rem 45,45 Baud bei 4096 kHz tris ra,240 rem Port RA0-RA3 = Ausgaenge tris rb,2 rem RB6 = Ausgang, sonst Eingaenge i2cinit ra,sda,scl rem I2C definieren rem 2.13 Verlagerung WR/ZV (Unterprogramm LCD_CMJ) in den Festspeicher rem 2.14 EEPROM-Speicher nochmals verdoppelt (24LC64) rem Umschaltbare Speicherauslesegeschwindigkeit am Port RB.0 rem Variablenuebersicht rem ------------------- rem a RTTY Zeichen 1 rem b RTTY Zeichen 2 rem c,d Textzeichen fuer das LCD-Display rem e,f Anfangs- und Endbytepaaradresse Bank 0 serielles EEPROM rem fuer Fixtexte rem g noch frei let h=0 rem Hilfsvariable EE_WRITE let i=0 rem Subadresse EEPROM Schreiben let j=0 rem Subadresse EEPROM Lesen rem k noch frei let l=0 rem Hilfsvariable BU/ZI-Ebene let m=1 rem I2C Bank 1 Adresse EEPROM Schreiben let n=1 rem I2C Bank 1 Adresse EEPROM Lesen rem o Matrixberechnungen BAUDOT>ASCII 16C84-internes EEPROM rem p noch frei rem q bis r compilerintern, nicht benutzbar rem s bis z 16 Bit Variable noch ungenutzt, Verknuepfung mit rem 8 Bitvariablen beachten (gemeinsamer Speicherbereich) wait 400 rem Eigeninit LCD-Display let e=0 rem LCD-Grundeinstellung let f=2 gosub fixtext wait 50 rem sicherheitshalber warten rem Begruessung schreiben rem via V.24-Port (ser.LCD) let e=6 rem "BaRo-Term V2.14 #xxx" let f=41 rem ... gosub fixtext cold: wait 500 rem Pause fuer LCD-Begruessung inp rb.2 inp rb.5 high ra.0 loopa: gosub halt rem Abfrage Stop-Schalter high rb.7 rem Eingang pull-up serin rb,7,300,a rem erstes Zeichen am RB.7 Pin lesen shr a rem 3 Binaerstellen rechts shiften shr a rem z.B. ZI=11011(000) > (000)11011 shr a if a=27 then let l=32 rem ZI=11011 if a=31 then let l=0 rem BU=11111 if a=27 then goto loopa rem ZI braucht keine Anzeige if a=31 then goto loopa rem gleiches gilt fuer BU let a=a+l rem springe in die BU- oder ZI-Ebene read a,o rem lese aus der Umkodierungstabelle let a=o rem und konvertiere Baudot nach ASCII inp rb.0 gosub Umw_A rem Tastenbehandlung RB.0 high rb.0 loopb: gosub ee_read rem Abfrage RX/Speicher-Schalter high rb.7 serin rb,7,300,b rem zweites Zeichen lesen shr b rem 3 Binaerstellen rechts shiften shr b shr b if b=27 then let l=32 rem ZI=11011 if b=31 then let l=0 rem BU=11111 if b=27 then goto loopb rem ZI braucht keine Anzeige if b=31 then goto loopb rem gleiches gilt fuer BU let b=b+l rem springe in die BU- oder ZI-Ebene read b,o rem lese aus der Umkodierungstabelle let b=o rem und konvertiere Baudot nach ASCII inp rb.0 gosub Umw_B rem Tastenbehandlung RB.0 high rb.0 weiter: inp rb.4 gosub ee_write rem Tastenbehandlung RB.4 high rb.4 rem EEPROM beschreiben gosub lcd_ab rem ins Display schreiben goto loopa rem die naechsten 2 Zeichen lesen Umw_A: if rb.0=1 then return rem keine WR/ZV oder 2.ZW unterdruecken if a=13 then let a=32 rem WR in ZW umwandeln (0D>20) if a=10 then let a=32 rem ZV in ZW umwandeln (0A>20) if a<>32 then goto loopb rem 32 ist hex20=ZW if b=32 then goto loopa rem vorheriges Zeichen war auch ZW return rem also unterdruecken Umw_B: if rb.0=1 then return rem keine WR/ZV oder 2.ZW unterdruecken if b=13 then let b=32 rem WR in ZW umwandeln if b=10 then let b=32 rem ZV in ZW umwandeln if b<>32 then goto weiter rem 32 ist hex20=ZW if a=32 then goto loopb rem vorheriges Zeichen war auch ZW return rem also unterdruecken lcd_ab: serout rb,6,7200,a,b rem als ASCII zum Port RA0 return rem senden fuer ser.LCD-Anzeige ee_read: high rb.2 rem Schaltereingang pull-up if rb.2=1 then return rem nicht aus dem ext. EEPROM lesen let e=78 rem "" schreiben let f=87 gosub fixtext ee_rea1: i2cwrite 160,n,0 rem Adressposition 1.Byte rem n=1 fuer 24LC64 beim Start 1.Bank for j=0 to 126 rem liest eine Bank aus i2cread 161,a i2cread 161,b rem nutzt Chip-Autoincrement gosub lcd_ab rem Zeichen aufs LCD schreiben high rb.0 if rb.0=0 then wait 5 rem und 5ms if rb.0=1 then wait 65 rem oder 65ms warten high rb.2 rem Schaltereingang pull-up if rb.2=1 then gosub rx rem Abkuerzung "" schreiben if rb.2=1 then goto loopa rem und auf Empfangsbetrieb gehen high rb.3 if rb.3=0 then goto ee_del rem ggf. EEPROM loeschen gosub halt rem Text Anhalten zulassen next j let n=n+1 rem naechste Bank lesen if n=32 then gosub ee_r_end rem Subadresse letzte Bank + 1 goto ee_rea1 rem bis zur letzten Bank wiederholen return rx: let e=98 rem "" ins Display schreiben let f=105 gosub fixtext return rem EEPROM-Auslesen abgeschlossen ee_r_end: let n=1 rem Anfangsadresse Bank 2 EEPROM-read ee_r_end1: let e=114 rem "" ins LCD schreiben let f=123 gosub fixtext wait 5000 rem 5 Sekunden warten goto loopa rem auf Empfangsbetrieb gehen return halt: high rb.5 rem Schaltereingang pull-up if rb.5=1 then return rem "Dauerbett" bis Schalter goto halt rem wieder geoeffnet wird rem normalerweise muesste hier ein rem "RETURN" stehen ee_write: if rb.4=1 then let h=0 if rb.4=1 then return rem nicht in das ext. EEPROM schreiben if h<>1 then gosub wr_msg rem Hinweis nur einmal schreiben i2cwrite 160,m,i,a,b rem schreibe beide Zeichen ins EEPROM wait 5 rem schoener Mist, das wird zeitlich eng let i=i+2 rem Subadresse EEPROM um 1 erhoehen if i=254 then gosub bank rem Zaehler fuer naechste Bank berechnen rem letzten 2 Bytes je Bank muessen rem leer bleiben if m=31 then gosub wr_end rem Warnung fuer vollen Speicher senden if m=32 then gosub ee_w_end rem nun isser voll der Speicher return rem EEPROM Beschreiben abgeschlossen ee_w_end: let m=1 rem Anfangsadresse Bank 1 EEPROM Write let h=0 rem Merkervariable fuer Write-msg gosub led_hi rem LED "VOLL" ausschalten gosub ee_r_end1 rem gleiches Behandeln wie im Lesefall return wr_msg: let e=134 rem "" anzeigen let f=145 gosub fixtext let h=1 rem sonst o.a. msg alle 2 Zeichen im LCD return wr_end: if i=2 then gosub led_low rem Subadresse letzte Bank return bankdel: let a=35 rem Balken (15 x ##(je Bank)) let b=35 rem ins Display schreiben gosub lcd_ab let a=255 rem sonst landen '##' im EEPROM let b=255 bank: let m=m+1 rem naechste Bank beschreiben let i=0 return led_low: low ra.0 return led_hi: high ra.0 return fixtext: i2cwrite 160,0,e rem Adressposition Anfangsbyte, Bank 0 for j=e to f rem liest einen Fixtext aus i2cread 161,a i2cread 161,b rem nutzt Chip-Autoincrement gosub lcd_ab rem Zeichen aufs LCD schreiben wait 5 rem und 5ms warten next j return ee_del: rem EEPROM-Loesch-Unterprogramm let e=158 rem "" let f=177 rem "" gosub fixtext let m=1 rem Anfangsaddresse Bank 1 write let i=0 let a=255 rem Zellen auf "FF" let b=255 ee_del1: i2cwrite 160,m,i,a,b rem schreibe beide Zeichen ins EEPROM wait 5 rem schoener Mist, das wird zeitlich eng let i=i+2 rem Subadresse EEPROM um 2 erhoehen if i=254 then gosub bankdel rem Zaehler fuer naechste Bank berechnen rem letzten 2 Bytes je Bank muessen rem leer bleiben if m=16 then gosub ee_del2 rem nun isser voll der Speicher goto ee_del1 ee_del2: let m=1 rem nach dem Loeschen wieder let i=0 rem an die Anfangsadresse (write) let n=1 rem Anfangsadresse Bank 1 read let j=0 let e=198 rem "" let f=209 gosub fixtext gosub ee_r_end1 return end ; This file is produced by PiX 1.09 TITLE "RTTY214.ASM" LIST P=16C84 INDIR EQU 00H ; Indirect pointer RTCC EQU 01H ; Real time clock / counter PCL EQU 02H ; Program counter low byte STATUS EQU 03H ; Status register CY EQU 0 ; Carry/borrow bit DC EQU 1 ; Digit carry Z EQU 2 ; Zero flag PD EQU 3 ; Power down T0 EQU 4 ; Time-out bit RP0 EQU 5 ; Register page select bits RP1 EQU 6 ; Not used in 16C84 RP2 EQU 7 ; Not used in 16C84 FSR EQU 04H ; Indirect pointer PORTA EQU 05H ; PORT A PORTB EQU 06H ; PORT B EEDATA EQU 08H ; Eeprom data EEADR EQU 09H ; Eeprom address PCLATH EQU 0AH ; Program counter high byte INTCON EQU 0BH ; Interrupt control TRISA EQU 085H ; Data direction port A TRISB EQU 086H ; Data direction port B EECON1 EQU 088H ; Eeprom control W EQU 0 ; W reg. as destination F EQU 1 ; F file as destination ORG 0000H L0000 BTFSC STATUS,03H ;Skip if bit = 0 GOTO L000D NOP GOTO L0006 L0004 NOP GOTO L0312 L0006 BTFSC STATUS,04H ;Skip if bit = 0 GOTO L000D MOVF 11H,W MOVWF PCLATH MOVF 10H,W MOVWF PCL GOTO L000D L000D MOVLW 0F0H TRIS PORTA MOVLW 002H TRIS PORTB BSF STATUS,005H MOVLW 0F9H ANDWF PORTA,F BCF STATUS,005H CALL L03E9 CLRF 27H CLRF 28H CLRF 29H CLRF 2BH MOVLW 001H MOVWF 2CH MOVLW 001H MOVWF 2DH MOVLW 090H MOVWF 10H MOVLW 001H MOVWF 11H MOVLW 0FFH MOVWF 12H CALL L0365 CLRF 24H MOVLW 002H MOVWF 25H INCF 1BH,F CALL L028D MOVLW 032H MOVWF 10H MOVLW 000H MOVWF 11H MOVLW 0FFH MOVWF 12H CALL L0365 MOVLW 006H MOVWF 24H MOVLW 029H MOVWF 25H INCF 1BH,F CALL L028D MOVLW 0F4H MOVWF 10H MOVLW 001H MOVWF 11H MOVLW 0FFH MOVWF 12H CALL L0365 CALL L031B MOVLW 004H IORWF PORTB,F CALL L0318 CALL L031B MOVLW 020H IORWF PORTB,F CALL L0318 CALL L031B MOVLW 0FEH ANDWF PORTA,F CALL L0318 XORLW 0FFH IORWF PORTA,F L004C INCF 1BH,F CALL L01FE CALL L031B MOVLW 07FH ANDWF PORTB,F CALL L0318 XORLW 0FFH IORWF PORTB,F MOVLW 006H MOVWF 17H MOVLW 080H MOVWF 16H MOVLW 020H MOVWF 15H MOVLW 0D0H MOVWF 13H CLRF 18H CLRF 19H CALL L031E MOVF 10H,W MOVWF 20H BCF STATUS,000H RRF 20H,F BCF STATUS,000H RRF 20H,F BCF STATUS,000H RRF 20H,F MOVF 20H,W MOVWF 14H MOVLW 01BH MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L0072 BSF FSR,005H MOVLW 020H MOVWF 2BH BCF FSR,005H L0072 MOVF 20H,W MOVWF 14H MOVLW 01FH MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L007C BSF FSR,005H CLRF 2BH BCF FSR,005H L007C MOVF 20H,W MOVWF 14H MOVLW 01BH MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L0084 GOTO L004C L0084 MOVF 20H,W MOVWF 14H MOVLW 01FH MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L008C GOTO L004C L008C MOVF 20H,W MOVWF 10H MOVF 2BH,W MOVWF 12H ADDWF 10H,F MOVF 10H,W MOVWF 20H CALL L0376 MOVF 20H,W MOVWF EEADR CALL L038B MOVF EEDATA,W MOVWF 2EH MOVF 2EH,W MOVWF 20H CALL L031B MOVLW 001H IORWF PORTB,F CALL L0318 INCF 1BH,F CALL L0111 CALL L031B MOVLW 0FEH ANDWF PORTB,F CALL L0318 XORLW 0FFH IORWF PORTB,F L00A7 INCF 1BH,F CALL L016F CALL L031B MOVLW 07FH ANDWF PORTB,F CALL L0318 XORLW 0FFH IORWF PORTB,F MOVLW 006H MOVWF 17H MOVLW 080H MOVWF 16H MOVLW 020H MOVWF 15H MOVLW 0D0H MOVWF 13H CLRF 18H CLRF 19H CALL L031E MOVF 10H,W MOVWF 21H BCF STATUS,000H RRF 21H,F BCF STATUS,000H RRF 21H,F BCF STATUS,000H RRF 21H,F MOVF 21H,W MOVWF 14H MOVLW 01BH MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L00CD BSF FSR,005H MOVLW 020H MOVWF 2BH BCF FSR,005H L00CD MOVF 21H,W MOVWF 14H MOVLW 01FH MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L00D7 BSF FSR,005H CLRF 2BH BCF FSR,005H L00D7 MOVF 21H,W MOVWF 14H MOVLW 01BH MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L00DF GOTO L00A7 L00DF MOVF 21H,W MOVWF 14H MOVLW 01FH MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L00E7 GOTO L00A7 L00E7 MOVF 21H,W MOVWF 10H MOVF 2BH,W MOVWF 12H ADDWF 10H,F MOVF 10H,W MOVWF 21H CALL L0376 MOVF 21H,W MOVWF EEADR CALL L038B MOVF EEDATA,W MOVWF 2EH MOVF 2EH,W MOVWF 21H CALL L031B MOVLW 001H IORWF PORTB,F CALL L0318 INCF 1BH,F CALL L0139 CALL L031B MOVLW 0FEH ANDWF PORTB,F CALL L0318 XORLW 0FFH IORWF PORTB,F L0102 CALL L031B MOVLW 010H IORWF PORTB,F CALL L0318 INCF 1BH,F CALL L0209 CALL L031B MOVLW 0EFH ANDWF PORTB,F CALL L0318 XORLW 0FFH IORWF PORTB,F INCF 1BH,F CALL L0161 GOTO L004C L0111 BTFSS PORTB,00H ;Skip if bit = 1 GOTO L0115 DECF 1BH,F RETLW 000H ;'.' L0115 MOVF 20H,W MOVWF 14H MOVLW 00DH MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L011E MOVLW 020H MOVWF 20H L011E MOVF 20H,W MOVWF 14H MOVLW 00AH MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L0127 MOVLW 020H MOVWF 20H L0127 MOVF 20H,W MOVWF 14H MOVLW 020H MOVWF 10H SUBWF 14H,F BTFSC STATUS,02H ;Skip if bit = 0 GOTO L012F GOTO L00A7 L012F MOVF 21H,W MOVWF 14H MOVLW 020H MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L0137 GOTO L004C L0137 DECF 1BH,F RETLW 000H ;'.' L0139 BTFSS PORTB,00H ;Skip if bit = 1 GOTO L013D DECF 1BH,F RETLW 000H ;'.' L013D MOVF 21H,W MOVWF 14H MOVLW 00DH MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L0146 MOVLW 020H MOVWF 21H L0146 MOVF 21H,W MOVWF 14H MOVLW 00AH MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L014F MOVLW 020H MOVWF 21H L014F MOVF 21H,W MOVWF 14H MOVLW 020H MOVWF 10H SUBWF 14H,F BTFSC STATUS,02H ;Skip if bit = 0 GOTO L0157 GOTO L0102 L0157 MOVF 20H,W MOVWF 14H MOVLW 020H MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L015F GOTO L00A7 L015F DECF 1BH,F RETLW 000H ;'.' L0161 MOVLW 006H MOVWF 17H MOVLW 040H MOVWF 16H MOVLW 002H MOVWF 15H MOVLW 087H MOVWF 13H MOVF 20H,W CALL L033C MOVF 21H,W CALL L033C DECF 1BH,F RETLW 000H ;'.' L016F CALL L031B MOVLW 0FBH ANDWF PORTB,F CALL L0318 XORLW 0FFH IORWF PORTB,F BTFSS PORTB,02H ;Skip if bit = 1 GOTO L0179 DECF 1BH,F RETLW 000H ;'.' L0179 MOVLW 04EH MOVWF 24H MOVLW 057H MOVWF 25H INCF 1BH,F CALL L028D L017F CALL L03E9 CALL L03D9 MOVLW 0A0H ANDLW 0FEH CALL L03A6 MOVF 2DH,W CALL L03A6 MOVLW 000H CALL L03A6 CALL L03E9 CLRF 29H MOVLW 07EH MOVWF 1CH L018C CALL L03E9 CALL L03D9 MOVLW 0A1H IORLW 001H CALL L03A6 CALL L03B6 MOVF 10H,W MOVWF 20H CALL L03E9 CALL L03E9 CALL L03D9 MOVLW 0A1H IORLW 001H CALL L03A6 CALL L03B6 MOVF 10H,W MOVWF 21H CALL L03E9 INCF 1BH,F CALL L0161 CALL L031B MOVLW 0FEH ANDWF PORTB,F CALL L0318 XORLW 0FFH IORWF PORTB,F BTFSC PORTB,00H ;Skip if bit = 0 GOTO L01AF MOVLW 005H MOVWF 10H MOVLW 000H MOVWF 11H MOVLW 0FFH MOVWF 12H CALL L0365 L01AF BTFSS PORTB,00H ;Skip if bit = 1 GOTO L01B8 MOVLW 041H MOVWF 10H MOVLW 000H MOVWF 11H MOVLW 0FFH MOVWF 12H CALL L0365 L01B8 CALL L031B MOVLW 0FBH ANDWF PORTB,F CALL L0318 XORLW 0FFH IORWF PORTB,F BTFSS PORTB,02H ;Skip if bit = 1 GOTO L01C2 INCF 1BH,F CALL L01E2 L01C2 BTFSS PORTB,02H ;Skip if bit = 1 GOTO L01C5 GOTO L004C L01C5 CALL L031B MOVLW 0F7H ANDWF PORTB,F CALL L0318 XORLW 0FFH IORWF PORTB,F BTFSC PORTB,03H ;Skip if bit = 0 GOTO L01CE GOTO L02BD L01CE INCF 1BH,F CALL L01FE MOVF 29H,W INCF 29H,F SUBWF 1CH,W BTFSS STATUS,02H ;Skip if bit = 1 GOTO L018C INCF 2DH,F MOVF 2DH,W MOVWF 14H MOVLW 020H MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L01DF INCF 1BH,F CALL L01EC L01DF GOTO L017F DECF 1BH,F RETLW 000H ;'.' L01E2 BSF FSR,006H MOVLW 062H MOVWF 24H BCF FSR,006H MOVLW 069H MOVWF 25H INCF 1BH,F CALL L028D DECF 1BH,F RETLW 000H ;'.' L01EC MOVLW 001H MOVWF 2DH L01EE MOVLW 072H MOVWF 24H MOVLW 07BH MOVWF 25H INCF 1BH,F CALL L028D MOVLW 088H MOVWF 10H MOVLW 013H MOVWF 11H MOVLW 0FFH MOVWF 12H CALL L0365 GOTO L004C DECF 1BH,F RETLW 000H ;'.' L01FE CALL L031B MOVLW 0DFH ANDWF PORTB,F CALL L0318 XORLW 0FFH IORWF PORTB,F BTFSS PORTB,05H ;Skip if bit = 1 GOTO L0208 DECF 1BH,F RETLW 000H ;'.' L0208 GOTO L01FE L0209 BTFSS PORTB,04H ;Skip if bit = 1 GOTO L020C CLRF 27H L020C BTFSS PORTB,04H ;Skip if bit = 1 GOTO L0210 DECF 1BH,F RETLW 000H ;'.' L0210 MOVF 27H,W MOVWF 14H MOVLW 001H MOVWF 10H SUBWF 14H,F BTFSC STATUS,02H ;Skip if bit = 0 GOTO L0219 INCF 1BH,F CALL L025B L0219 CALL L03E9 CALL L03D9 MOVLW 0A0H ANDLW 0FEH CALL L03A6 MOVF 2CH,W CALL L03A6 MOVF 28H,W CALL L03A6 MOVF 20H,W CALL L03A6 MOVF 21H,W CALL L03A6 CALL L03E9 MOVLW 005H MOVWF 10H MOVLW 000H MOVWF 11H MOVLW 0FFH MOVWF 12H CALL L0365 MOVF 28H,W MOVWF 10H MOVLW 002H MOVWF 12H ADDWF 10H,F MOVF 10H,W MOVWF 28H MOVF 28H,W MOVWF 14H MOVLW 0FEH MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L023E INCF 1BH,F CALL L027A L023E MOVF 2CH,W MOVWF 14H MOVLW 01FH MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L0247 INCF 1BH,F CALL L0265 L0247 MOVF 2CH,W MOVWF 14H MOVLW 020H MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L0250 INCF 1BH,F CALL L0252 L0250 DECF 1BH,F RETLW 000H ;'.' L0252 MOVLW 001H MOVWF 2CH CLRF 27H INCF 1BH,F CALL L0285 INCF 1BH,F CALL L01EE DECF 1BH,F RETLW 000H ;'.' L025B MOVLW 086H MOVWF 24H MOVLW 091H MOVWF 25H INCF 1BH,F CALL L028D MOVLW 001H MOVWF 27H DECF 1BH,F RETLW 000H ;'.' L0265 MOVF 28H,W MOVWF 14H MOVLW 002H MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L026E INCF 1BH,F CALL L027E L026E DECF 1BH,F RETLW 000H ;'.' L0270 MOVLW 023H MOVWF 20H MOVLW 023H MOVWF 21H INCF 1BH,F CALL L0161 MOVLW 0FFH MOVWF 20H MOVLW 0FFH MOVWF 21H L027A INCF 2CH,F CLRF 28H DECF 1BH,F RETLW 000H ;'.' L027E CALL L031B MOVLW 0FEH ANDWF PORTA,F CALL L0318 ANDWF PORTA,F DECF 1BH,F RETLW 000H ;'.' L0285 CALL L031B MOVLW 0FEH ANDWF PORTA,F CALL L0318 XORLW 0FFH IORWF PORTA,F DECF 1BH,F RETLW 000H ;'.' L028D CALL L03E9 CALL L03D9 MOVLW 0A0H ANDLW 0FEH CALL L03A6 MOVLW 000H CALL L03A6 MOVF 24H,W CALL L03A6 CALL L03E9 MOVF 24H,W MOVWF 29H MOVF 25H,W MOVWF 1CH L029B CALL L03E9 CALL L03D9 MOVLW 0A1H IORLW 001H CALL L03A6 CALL L03B6 MOVF 10H,W MOVWF 20H CALL L03E9 CALL L03E9 CALL L03D9 MOVLW 0A1H IORLW 001H CALL L03A6 CALL L03B6 MOVF 10H,W MOVWF 21H CALL L03E9 INCF 1BH,F CALL L0161 MOVLW 005H MOVWF 10H MOVLW 000H MOVWF 11H MOVLW 0FFH MOVWF 12H CALL L0365 MOVF 29H,W INCF 29H,F SUBWF 1CH,W BTFSS STATUS,02H ;Skip if bit = 1 GOTO L029B DECF 1BH,F RETLW 000H ;'.' L02BD MOVLW 09EH MOVWF 24H MOVLW 0B1H MOVWF 25H INCF 1BH,F CALL L028D MOVLW 001H MOVWF 2CH CLRF 28H MOVLW 0FFH MOVWF 20H MOVLW 0FFH MOVWF 21H L02CA CALL L03E9 CALL L03D9 MOVLW 0A0H ANDLW 0FEH CALL L03A6 MOVF 2CH,W CALL L03A6 MOVF 28H,W CALL L03A6 MOVF 20H,W CALL L03A6 MOVF 21H,W CALL L03A6 CALL L03E9 MOVLW 005H MOVWF 10H MOVLW 000H MOVWF 11H MOVLW 0FFH MOVWF 12H CALL L0365 MOVF 28H,W MOVWF 10H MOVLW 002H MOVWF 12H ADDWF 10H,F MOVF 10H,W MOVWF 28H MOVF 28H,W MOVWF 14H MOVLW 0FEH MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L02EF INCF 1BH,F CALL L0270 L02EF MOVF 2CH,W MOVWF 14H MOVLW 010H MOVWF 10H SUBWF 14H,F BTFSS STATUS,02H ;Skip if bit = 1 GOTO L02F8 INCF 1BH,F CALL L02F9 L02F8 GOTO L02CA L02F9 MOVLW 001H MOVWF 2CH CLRF 28H MOVLW 001H MOVWF 2DH CLRF 29H MOVLW 0C6H MOVWF 24H MOVLW 0D1H MOVWF 25H INCF 1BH,F CALL L028D INCF 1BH,F CALL L01EE DECF 1BH,F RETLW 000H ;'.' MOVLW 010H MOVWF 10H MOVLW 003H MOVWF 11H L030D MOVLW 00FH OPTION SLEEP GOTO L030D L0311 GOTO L0311 L0312 NOP RETFIE MOVLW 080H GOTO L0316 L0316 IORWF 1BH,F RETLW 000H ;'.' L0318 BCF STATUS,005H BCF STATUS,006H RETURN L031B BSF STATUS,005H BCF STATUS,006H RETURN L031E MOVF 17H,W MOVWF FSR CLRF 10H BCF 1BH,003H L0322 MOVF 16H,W ANDWF INDIR,W BTFSC STATUS,02H ;Skip if bit = 0 GOTO L032E MOVF 18H,W IORWF 19H,W BTFSC STATUS,02H ;Skip if bit = 0 GOTO L0322 DECFSZ 18H,F ;Skip if Zero GOTO L0322 BSF 1BH,003H RETLW 000H ;'.' L032E MOVLW 005H MOVWF 11H CALL L035F L0331 CALL L0354 BCF STATUS,000H MOVF 16H,W ANDWF INDIR,W BTFSS STATUS,02H ;Skip if bit = 1 BSF STATUS,000H RRF 10H,F DECFSZ 11H,F ;Skip if Zero GOTO L0331 CALL L0354 RETLW 000H ;'.' L033C MOVWF 10H MOVF 17H,W MOVWF FSR COMF 16H,W ANDWF INDIR,F MOVLW 009H MOVWF 11H L0343 CALL L0354 BSF STATUS,000H RRF 10H,F BTFSC STATUS,00H ;Skip if bit = 0 GOTO L034B COMF 16H,W ANDWF INDIR,F GOTO L034D L034B MOVF 16H,W IORWF INDIR,F L034D DECFSZ 11H,F ;Skip if Zero GOTO L0343 MOVF 16H,W IORWF INDIR,F CALL L0354 CALL L0354 RETLW 000H ;'.' L0354 MOVF 13H,W MOVWF 1AH MOVF 15H,W MOVWF 14H L0358 MOVF 1AH,W MOVWF 12H L035A DECFSZ 12H,F ;Skip if Zero GOTO L035A DECFSZ 14H,F ;Skip if Zero GOTO L0358 RETLW 000H ;'.' L035F BCF STATUS,000H RRF 15H,W MOVWF 14H RRF 13H,W MOVWF 1AH GOTO L0358 L0365 MOVF 10H,W IORWF 11H,W BTFSC STATUS,02H ;Skip if bit = 0 GOTO L0375 MOVF 12H,W MOVWF 13H L036B NOP NOP DECFSZ 13H,F ;Skip if Zero GOTO L036B DECF 10H,F INCF 10H,W BTFSS STATUS,02H ;Skip if bit = 1 GOTO L0365 DECF 11H,F GOTO L0365 L0375 RETLW 000H ;'.' L0376 BSF STATUS,005H L0377 BTFSC EEDATA,01H ;Skip if bit = 0 GOTO L0377 BCF EEDATA,004H BCF STATUS,005H RETURN MOVF INTCON,W BCF INTCON,007H MOVWF 1AH BSF STATUS,005H BSF EEDATA,002H MOVLW 055H MOVWF EEADR MOVLW 0AAH MOVWF EEADR BSF EEDATA,001H BCF EEDATA,002H BCF STATUS,005H BTFSC 10H,07H ;Skip if bit = 0 BSF INTCON,007H RETURN L038B BSF STATUS,005H BSF EEDATA,000H BCF STATUS,005H RETURN L038F BTFSC STATUS,00H ;Skip if bit = 0 GOTO L0393 BCF PORTA,001H GOTO L0394 L0393 BSF PORTA,001H L0394 MOVLW 014H MOVWF 17H BSF PORTA,002H BCF 14H,007H L0398 BTFSC PORTA,02H ;Skip if bit = 0 GOTO L039E DECFSZ 17H,F ;Skip if Zero GOTO L0398 BSF 14H,007H GOTO L03A4 L039E NOP NOP NOP NOP MOVF PORTA,W MOVWF 15H L03A4 BCF PORTA,002H RETLW 000H ;'.' L03A6 MOVWF 10H MOVLW 008H MOVWF 12H L03A9 BCF PORTA,002H RLF 10H,F CALL L038F BTFSC 14H,07H ;Skip if bit = 0 GOTO L03B4 DECFSZ 12H,F ;Skip if Zero GOTO L03A9 BCF STATUS,000H CALL L038F BTFSC 15H,01H ;Skip if bit = 0 BSF 14H,006H L03B4 BCF PORTA,001H RETLW 000H ;'.' L03B6 MOVLW 008H MOVWF 12H BSF STATUS,005H BSF PORTA,001H BSF PORTA,002H BCF STATUS,005H L03BC BTFSS PORTA,02H ;Skip if bit = 1 GOTO L03BC L03BE BSF STATUS,000H CALL L038F BCF STATUS,000H BTFSC 15H,01H ;Skip if bit = 0 BSF STATUS,000H RLF 10H,F BTFSC 14H,07H ;Skip if bit = 0 GOTO L03D3 BSF STATUS,005H BCF PORTA,002H BCF STATUS,005H DECFSZ 12H,F ;Skip if Zero GOTO L03BE RRF 14H,W BTFSC STATUS,00H ;Skip if bit = 0 GOTO L03D1 BSF STATUS,005H BCF PORTA,001H BCF STATUS,005H L03D1 RRF 14H,W CALL L038F L03D3 BCF PORTA,001H BCF PORTA,002H BSF STATUS,005H BCF PORTA,001H BCF STATUS,005H RETLW 000H ;'.' L03D9 BSF PORTA,001H BSF PORTA,002H BSF 14H,000H MOVLW 008H MOVWF 12H L03DE BTFSS PORTA,02H ;Skip if bit = 1 GOTO L03E7 BTFSS PORTA,01H ;Skip if bit = 1 GOTO L03E7 DECFSZ 12H,F ;Skip if Zero GOTO L03DE BCF PORTA,001H BCF 14H,005H RETLW 000H ;'.' L03E7 BSF 14H,005H RETLW 000H ;'.' L03E9 BCF PORTA,001H BSF PORTA,002H MOVLW 008H MOVWF 12H L03ED DECFSZ 12H,F ;Skip if Zero GOTO L03ED BSF PORTA,001H RETLW 000H ;'.' NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP ORG 2000H DATA 3FFFH DATA 3FFFH DATA 3FFFH DATA 3FFFH ORG 2007H DATA 3FF1H ORG 2100H DATA 00FFh, 0045h, 000Ah, 0041h, 0020h, 0053h, 0049h DATA 0055h, 000Dh, 0044h, 0052h, 004Ah, 004Eh, 0046h DATA 0043h, 004Bh, 0054h, 005Ah, 004Ch, 0057h, 0048h DATA 0059h, 0050h, 0051h, 004Fh, 0042h, 0047h, 0000h DATA 004Dh, 0058h, 0056h, 0000h, 0000h, 0033h, 000Ah DATA 002Dh, 0020h, 0027h, 0038h, 0037h, 000Dh, 0000h DATA 0034h, 0007h, 002Ch, 0000h, 003Ah, 0028h, 0035h DATA 002Bh, 0029h, 0032h, 0000h, 0036h, 0030h, 0031h DATA 0039h, 003Fh, 0000h, 0000h, 002Eh, 002Fh, 003Dh DATA 0000h END