; ; ; SOFTWARE DTMF DECODER - TEST PROGRAM ; modified Goertzel algorithm ; timer 2 used to generate interupts at 9765.625hz ; PWM1 output at 19531.25hz ; ; ; (c) 2003 Radu Constantinescu ; constantinescuradu @yahoo.com ; RELEASED UNDER GNU PUBLIC LICENSE ; ; ; Use 255 samples table ; FOR 16F87X / 20 Mhz ; F sample = 5000000/512 hz ; ; DTMF Signal Input at RC1 pin - Schmitt trigger ; BLINK PORT C0 AT EACH CHARACTER ; ; ; ; ; #include Bank0: MACRO bcf STATUS, RP0 bcf STATUS, RP1 ENDM Bank1: MACRO bsf STATUS, RP0 bcf STATUS, RP1 ENDM Bank2: MACRO bcf STATUS, RP0 bsf STATUS, RP1 ENDM Bank3: MACRO bsf STATUS, RP0 bsf STATUS, RP1 ENDM ;**************************** ; ;User Variables in GPR ; ;**************************** SAMPLEBIT EQU 0X40 TABLECOUNTER EQU 0X43 TEMP EQU 0X44 LOWTEMPLATE EQU 0X45 HIGHTEMPLATE EQU 0X46 BYTE EQU 0X47 PCLATH_SAVE EQU 0X49 W_TEMP EQU 0X4A STATUS_TEMP EQU 0X4B FSR_SAVE EQU 0X4C ;COUNT EQU H'27' RESULT EQU H'28' FLAGS EQU H'29' A697SIN EQU H'30' A697COS EQU H'31' ; ACC A770SIN EQU H'32' A770COS EQU H'33' ; ACC A852SIN EQU H'34' A852COS EQU H'35' ; ACC A941SIN EQU H'36' A941COS EQU H'37' ; ACC A1209SIN EQU 0X38 A1209COS EQU 0X39 ;ACC A1336SIN EQU 0X3A A1336COS EQU 0X3B ;ACC A1447SIN EQU 0X3C A1447COS EQU 0X3D ;ACC A1633SIN EQU 0X3E A1633COS EQU 0X3F ;ACC #DEFINE DONE FLAGS,0 #DEFINE ONELIT FLAGS,3 CBLOCK 0x50 scrA: 1 ; scratch pad 0X50 scrB: 1 scrC: 1 scrD: 1 count_1:1 ; counter lsb count_2:1 count_3:1 count_4:1 ; counter msb temp1l: 1 ; temp 1 lo temp1h: 1 ; temp 1 hi temp1C: 1 ; temp 1 Celsius temp2l: 1 ; temp 2 lo temp2h: 1 ; temp 2 hi temp2C: 1 ; temp 2 Celsius dig_10: 1 ; display digit 10 dig_9: 1 ; display digit 9 dig_8: 1 ; display digit 8 dig_7: 1 ; display digit 7 dig_6: 1 ; display digit 6 dig_5: 1 ; display digit 5 dig_4: 1 ; display digit 4 dig_3: 1 ; display digit 3 dig_2: 1 ; display digit 2 dig_1: 1 ; display digit 1 dig_0: 1 ; end of string 0 0X68 ENDC CBLOCK 0x72 ; variables for all the RAM pages comA: 1 comB: 1 comC: 1 comD: 1 ENDC ORG 0X00 NOP CLRF STATUS GOTO START ;GOTO STARTPLUS INTERRUPT_VECTOR ORG 0X04 ;**************************** ; ; CONTEXT SAVE ; ;**************************** C_SAVE MOVWF W_TEMP SWAPF STATUS,W CLRF STATUS ;ENSURE BANK0 SAVE MOVWF STATUS_TEMP MOVF PCLATH,W ; SAVE PCLATH MOVWF PCLATH_SAVE MOVF FSR, W MOVWF FSR_SAVE BTFSS PIR1,TMR2IF ; Exit ISR if it wasn't a TMR2 Overflow GOTO C_RESTORE BCF PIR1,TMR2IF ; RESET TIMER 2 INT FLAG ;BCF INTCON,INTF movlw 1 xorwf PORTC, F ; flip port C0 BTFSC DONE GOTO C_RESTORE ; Skip if done ;***************************** ;TEST LEVEL of RC1 and set BYTE CLRF BYTE BTFSS PORTC, 1 GOTO CONTINUE PIN_HIGH COMF BYTE, F CONTINUE ;***************************** ; ;Get the expected Lowband Bits ; ;***************************** MOVLW LOW LOWBAND ADDWF TABLECOUNTER,W MOVLW HIGH LOWBAND BTFSC STATUS,C ADDLW 1 MOVWF PCLATH MOVF TABLECOUNTER,W CALL LOWBAND CLRF PCLATH MOVWF LOWTEMPLATE MOVF BYTE,W XORWF LOWTEMPLATE, F ; APPLY INPUT OVER MASK ;***************************** ; ;Get the expected Highband Bits ; ;***************************** MOVLW LOW HIGHBAND ADDWF TABLECOUNTER,W MOVLW HIGH HIGHBAND BTFSC STATUS,C ADDLW 1 MOVWF PCLATH MOVF TABLECOUNTER,W CALL HIGHBAND CLRF PCLATH MOVWF HIGHTEMPLATE MOVF BYTE,W XORWF HIGHTEMPLATE, F ; APPLY INPUT OVER MASK ;******************************* ; ; LOWTEMPLATE AND HIGHTEMPLATE ; CONTAIN THE EXPECTED VALUES ; FOR THE INCOMING BIT ; ;******************************* MOVLW LOW A697SIN MOVWF FSR ;ACCUMULATOR ADDR MOVLW 8 MOVWF SAMPLEBIT COMPAREBITL RLF LOWTEMPLATE,F BTFSS STATUS,C GOTO MATCHL DECF INDF,F GOTO CONTINL MATCHL INCF INDF,F CONTINL INCF FSR,F DECFSZ SAMPLEBIT,F GOTO COMPAREBITL ;FINISH THE BYTE MOVLW LOW A1209SIN MOVWF FSR ;ACCUMULATOR ADDR MOVLW 8 MOVWF SAMPLEBIT COMPAREBITH RLF HIGHTEMPLATE,F BTFSS STATUS,C GOTO MATCHH DECF INDF,F GOTO CONTINH MATCHH INCF INDF,F CONTINH INCF FSR,F DECFSZ SAMPLEBIT,F GOTO COMPAREBITH ;FINISH THE BYTE ;******************************** ; ; Increment Tablecounter 0..255 ; ;******************************** INCF TABLECOUNTER,F MOVF TABLECOUNTER,W XORLW D'255' ;This is the number of samples to test against (max 7f) BTFSC STATUS,Z BSF DONE ;******************************** ; ; Context Restore ; ;******************************** C_RESTORE CLRF STATUS ;ENSURE BANK0 RESTORE MOVF FSR_SAVE,W MOVWF FSR MOVF PCLATH_SAVE,W MOVWF PCLATH ; RESTORE PCLATH SWAPF STATUS_TEMP,W MOVWF STATUS SWAPF W_TEMP,F SWAPF W_TEMP,W RETFIE ORG 0X100 INIT ;Bank0 clrf PORTC ; program port C<0> for output movlw B'11111110' ;port C0=out, C1=INPUT BANKSEL TRISC movwf TRISC ;Bank0 ;BANKSEL TRISB ;Bank1 ;BSF TRISB, 1 ;PORTB1 = in BANKSEL T2CON MOVLW B'00001100' ; X,1/2 postscale, timer 2 ON ~4.8khz sample rate MOVWF T2CON BANKSEL PR2 MOVLW 0XFF ; TIMER 2 PERIOD REGISTER MOVWF PR2 BANKSEL PIR1 BCF PIR1,TMR2IF ; CLEAR TIMER 2 INT FLAG BANKSEL PIE1 BSF PIE1,TMR2IE ; START INT FOR TIMER 2 BANKSEL INTCON BSF INTCON,PEIE ; START PERIPHERAL INT BSF INTCON,GIE ; START GLOBAL INT BANKSEL CCP1CON MOVLW B'00001100' MOVWF CCP1CON ;PWM 1 ON BANKSEL TRISC BCF TRISC,2 ; RC2 = PWM 1 OUT BANKSEL CCPR1L MOVLW .128 MOVWF CCPR1L ; 50 DUTY CYCLE ~18KHZ RETURN START call init_disp call cur_h1 ;movlw LOW linie3 ;movwf comA ;movlw HIGH linie3 ;movwf comB ;call prt_rom ;call cur_h2 ;movlw LOW linie3 ;movwf comA ;movlw HIGH linie3 ;movwf comB ;call prt_rom ;CALL cur_h1 STARTPLUS BSF DONE ; DO NOT START .... CALL INIT CLEANUP MOVLW 0X2F ; start -1 MOVWF FSR TEMPXX INCF FSR,F CLRF INDF MOVF FSR,W XORLW 0X3F ; CLEAR RAM FROM 0X30-0X3F BTFSS STATUS,Z GOTO TEMPXX MOVLW 0 ; table read pointer MOVWF TABLECOUNTER BCF DONE ; CLEAR DONE, START MAIN BTFSC DONE ; GOT 128 SAMPLES? GOTO GOT128 nop nop GOTO MAIN GOT128 MOVLW H'30' MOVWF FSR TESTFORNEG BTFSC INDF,7 GOTO NEG GOTO NEXT NEG ; SUBTRACT F FROM 0 MOVF INDF,W SUBLW 0 MOVWF INDF NEXT INCF FSR,F MOVF FSR,W XORLW H'40' BTFSS STATUS,Z GOTO TESTFORNEG CALL WINNER GOTO CLEANUP ; START AGAIN WINNER MOVLW H'30' MOVWF FSR MORERESULTS MOVF INDF,W CLRF INDF INCF FSR,F ADDWF INDF,F MOVF FSR,W INCF FSR,F XORLW H'3F' BTFSS STATUS,Z GOTO MORERESULTS MOVLW 0X31 MOVWF FSR ;GOTO OUTCHAR ;OUTPUTRESULT ;WINNER call cur_h1 ; first debug line movf A697COS, W movwf count_1 call dispU8 movlw 0 movwf dig_0 ; place a 0 at the end of the string BCF STATUS, IRP ; RAM bank 0 -1 indirect movlw low dig_4 call prt_ram movf A770COS, W movwf count_1 call dispU8 movlw 0 movwf dig_0 ; place a 0 at the end of the string BCF STATUS, IRP ; RAM bank 0 -1 indirect movlw low dig_4 call prt_ram movf A852COS, W movwf count_1 call dispU8 movlw 0 movwf dig_0 ; place a 0 at the end of the string BCF STATUS, IRP ; RAM bank 0 -1 indirect movlw low dig_4 call prt_ram movf A941COS, W movwf count_1 call dispU8 movlw 0 movwf dig_0 ; place a 0 at the end of the string BCF STATUS, IRP ; RAM bank 0 -1 indirect movlw low dig_4 call prt_ram call cur_h2 ; second debug line movf A1209COS, W movwf count_1 call dispU8 movlw 0 movwf dig_0 ; place a 0 at the end of the string BCF STATUS, IRP ; RAM bank 0 -1 indirect movlw low dig_4 call prt_ram movf A1336COS, W movwf count_1 call dispU8 movlw 0 movwf dig_0 ; place a 0 at the end of the string BCF STATUS, IRP ; RAM bank 0 -1 indirect movlw low dig_4 call prt_ram movf A1447COS, W movwf count_1 call dispU8 movlw 0 movwf dig_0 ; place a 0 at the end of the string BCF STATUS, IRP ; RAM bank 0 -1 indirect movlw low dig_4 call prt_ram movf A1633COS, W movwf count_1 call dispU8 movlw 0 movwf dig_0 ; place a 0 at the end of the string BCF STATUS, IRP ; RAM bank 0 -1 indirect movlw low dig_4 call prt_ram return ;OUTCHAR ; ;OUTPUT HERE ; MOVF INDF,W SUBLW D'64' ;THRESHOLD RRF RESULT,f INCF FSR,F INCF FSR,F MOVF FSR,W XORLW 0X41 BTFSS STATUS,Z RETURN ; GOT TRASH COMF RESULT,f MOVF RESULT,W XORLW D'17' BTFSC STATUS,Z GOTO GOTCHA1 MOVF RESULT,W XORLW D'33' BTFSC STATUS,Z GOTO GOTCHA2 MOVF RESULT,W XORLW D'65' BTFSC STATUS,Z GOTO GOTCHA3 MOVF RESULT,W XORLW D'18' BTFSC STATUS,Z GOTO GOTCHA4 MOVF RESULT,W XORLW D'34' BTFSC STATUS,Z GOTO GOTCHA5 MOVF RESULT,W XORLW D'66' BTFSC STATUS,Z GOTO GOTCHA6 MOVF RESULT,W XORLW D'20' BTFSC STATUS,Z GOTO GOTCHA7 MOVF RESULT,W XORLW D'36' BTFSC STATUS,Z GOTO GOTCHA8 MOVF RESULT,W XORLW D'68' BTFSC STATUS,Z GOTO GOTCHA9 MOVF RESULT,W XORLW D'40' BTFSC STATUS,Z GOTO GOTCHA0 MOVF RESULT,W XORLW D'72' BTFSC STATUS,Z GOTO GOTCHAPOUND MOVF RESULT,W XORLW D'24' BTFSC STATUS,Z GOTO GOTCHASTAR CLRF RESULT GOTO SENDIT GOTCHAPOUND MOVLW H'23' MOVWF RESULT BSF ONELIT GOTO SENDIT GOTCHASTAR MOVLW H'2A' MOVWF RESULT BSF ONELIT GOTO SENDIT GOTCHA1 MOVLW H'31' MOVWF RESULT BSF ONELIT GOTO SENDIT GOTCHA2 MOVLW H'32' MOVWF RESULT BSF ONELIT GOTO SENDIT GOTCHA3 MOVLW H'33' MOVWF RESULT BSF ONELIT GOTO SENDIT GOTCHA4 MOVLW H'34' MOVWF RESULT BSF ONELIT GOTO SENDIT GOTCHA5 MOVLW H'35' MOVWF RESULT BSF ONELIT GOTO SENDIT GOTCHA6 MOVLW H'36' MOVWF RESULT BSF ONELIT GOTO SENDIT GOTCHA7 MOVLW H'37' MOVWF RESULT BSF ONELIT GOTO SENDIT GOTCHA8 MOVLW H'38' MOVWF RESULT BSF ONELIT GOTO SENDIT GOTCHA9 MOVLW H'39' MOVWF RESULT BSF ONELIT GOTO SENDIT GOTCHA0 MOVLW H'30' MOVWF RESULT BSF ONELIT GOTO SENDIT RETURN ; GOTHA TRASH... ; ; SEND TO LCD ; SENDIT movwf dig_1 movlw 0 movwf dig_0 ; place a 0 at the end of the string BCF STATUS, IRP ; RAM bank 0 -1 indirect movlw low dig_1 call prt_ram ;BLINK ;BSF PORTC,0 ; BLINK LED ;BTFSC ONELIT ;CALL WAIT ; movlw 20 ; movwf scrC ;blink1: movlw 250 ; call del_1mx ;delay 25 ms ; decfsz scrC, F ; goto blink1 ;BCF PORTC,0 RETURN ;********************** ; UTILITY ROUTINES ;********************** ; ; 8/15/02 Radu Constantinescu ; constantinescuradu@yahoo.com ; display routines, 16F87X Q=20Mhz ; display IC HD44780A00 / 16X2 ; Display connected to Port D ; ; ; ; ; init_disp - initialize display ; cur_h1 - cursor home line 1 ; cur_h2 - cursor home line 2 ; ; movlw LOW text ; movwf comA ; movlw HIGH text ; movwf comB ; call prt_rom - print the text in Rom (comB:comA) ; ; binbcdU8 - convert 8 bit unsigned count_1 to dis_2,dis_1 ; bcdascii8 - Convert bcd dis_2..1 in ASCII dis_4..1 ; leadzero8 - delete leading zeroes from dig_4 - dig_2 ; dispU8 - display 8 bit unsigned count_1 to dis_4..1, +1 stack level ; dispS8 - display 8 bit signed count_1 to dis_4..1, +1 stack level ; binbcdU32 - convert 32 bit unsigned count_4:3:2:1-->dig_5..1, 10 digits, dis_5 low nibble=MSD, +1 stack level ; bcdascii32 - Convert bcd dig_5..1 in ASCII dig_9..1 ; leadzero32 - delete leading zeroes from dig_10 - dig_2 ; prtram - print from RAM, string located at (IRP:W) ; ; send caracter in W + 100 uS delay send_c: movwf comC swapf comC, W andlw 0xF iorlw 0x10 ;RS=1 movwf PORTD ;E=0 nop bsf PORTD,0x5;E=1 nop nop bcf PORTD,0x5;E=0 goto $+1 goto $+1 ;delay 1 uS movf comC, W andlw 0xF iorlw 0x10 ;RS=1 movwf PORTD ;E=0 nop bsf PORTD,0x5;E=1 nop nop bcf PORTD,0x5;E=0 ; delay 100 uS del_100: movlw 165 ; 165 = 100uS movwf scrA del_100A: decfsz scrA, F goto del_100A return ; send byte in W send_b: movwf comC swapf comC, W ; high nibble andlw 0xF movwf PORTD ;E=0 nop bsf PORTD,0x5;E=1 nop nop bcf PORTD,0x5;E=0 goto $+1 goto $+1 ; delay 1uS movf comC, W ; Low nibble andlw 0xF movwf PORTD ; E=0 nop bsf PORTD,0x5; E=1 nop nop bcf PORTD,0x5; E=0 return ; send nibble, low w send_n: movwf PORTD ; E=0 nop bsf PORTD,0x5 ; E=1 nop nop bcf PORTD,0x5 ; E=0 return ; print the string located at (comB:comA) in program memory prt_rom: Bank2 prt_rom1: movf comA, W ;Write the movwf EEADR ;address bytes movf comB, W movwf EEADRH bsf STATUS, RP0 ;Bank3 bsf EECON1, EEPGD ;Point to program memory bsf EECON1, RD ;start read operation nop ;required two nop's nop bcf STATUS, RP0 ;Bank2 movf EEDATA, W ;char in W andlw 0xFF ;compare 0 btfsc STATUS, Z goto prt_rom2 Bank0 call send_c ; print char in w+100uS wait incfsz comA, F goto prt_rom incf comB, F goto prt_rom prt_rom2: Bank0 return ; cursor home line 1 cur_h1: movlw 0x80 cur_h11: call send_b call del_100 return ; cursor home line 2 cur_h2: movlw 0xC0 goto cur_h11 ; delay 1 ms del_1m: movlw 0xA ; w=delayX100nS del_1mx: movwf scrB del_1mA: decfsz scrB, F goto del_1mB return del_1mB: movlw 165 movwf scrA del_1mC: decfsz scrA, F goto del_1mC goto del_1mA prt_ram: ;print from RAM, string located at (IRP:W) movwf FSR prt_ram1: movlw 0 subwf INDF, w ; compare 0 btfsc STATUS, Z return ; char = zero movf INDF, W call send_c incf FSR, F goto prt_ram1 leadzero8: ; delete leading zeroes from dig_4 - dig_2 BCF STATUS, IRP movlw .3 movwf scrA movlw LOW dig_4 goto leadzeroin leadzero32: ; delete leading zeroes from dig_10 - dig_2 BCF STATUS, IRP movlw .9 movwf scrA movlw LOW dig_10 leadzeroin: movwf FSR leadz1: movlw 0x30 ; ascii zero subwf INDF, w ; compare 0x30 btfss STATUS, Z return ; first char <>zero movlw 0x20 ; ascii space movwf INDF decf scrA, F btfsc STATUS, Z ; exit if zero return incf FSR, F goto leadz1 bcdascii32: ; Convert bcd dis_5..1 in ASCII dis_9..1 swapf dig_5, W andlw 0x0F addlw 0x30 movwf dig_10 movf dig_5, W andlw 0x0F addlw 0x30 movwf dig_9 swapf dig_4, W andlw 0x0F addlw 0x30 movwf dig_8 movf dig_4, W andlw 0x0F addlw 0x30 movwf dig_7 swapf dig_3, W andlw 0x0F addlw 0x30 movwf dig_6 movf dig_3, W andlw 0x0F addlw 0x30 movwf dig_5 bcdascii8: ; Convert bcd dis_2..1 in ASCII dis_4..1 swapf dig_2, W andlw 0x0F addlw 0x30 movwf dig_4 movf dig_2, W andlw 0x0F addlw 0x30 movwf dig_3 swapf dig_1, W andlw 0x0F addlw 0x30 movwf dig_2 movf dig_1, W andlw 0x0F addlw 0x30 movwf dig_1 return dispS8: ; display 8 bit signed count_1 to dis_4..1, +1 stack level btfss count_1,7 goto dispU8 ; disp neg 8 comf count_1, F ; complement incf count_1, F ; X(-1) call binbcdU8 ; dis2..1 bcd call bcdascii8 ; dis4..1 ascii ; leadzero and - delete leading zeroes from dig_4..2 and add the - sign BCF STATUS, IRP movlw .4 movwf scrA movlw LOW dig_4 movwf FSR leadzN1: movlw 0x30 ; ascii zero subwf INDF, w ; compare 0x30 btfss STATUS, Z goto leadzN2 ; first char <>zero, add - movlw 0x20 ; ascii space movwf INDF decf scrA, F btfsc STATUS, Z ; exit if zero return incf FSR, F goto leadzN1 leadzN2: ; dec pointer and display "-" decf FSR, F movlw "-" ; ascii - movwf INDF return return dispU8: ; display 8 bit unsigned count_1 to dis_4..1, +1 stack level call binbcdU8 call bcdascii8 call leadzero8 return binbcdU8: ; convert 8 bit unsigned count_1 to dis_2,dis_1 bcf STATUS,C ; clear the carry bit BCF STATUS, IRP ;Page zero or 1 for indirect movlw 8 movwf scrA clrf dig_1 clrf dig_2 loop8: rlf count_1,F rlf dig_1, F rlf dig_2, F ; decfsz scrA, F goto adjDEC8 RETLW 0 ; adjDEC8: movlw dig_1 movwf FSR movlw 0x3 addwf INDF,W movwf scrB btfsc scrB,3 ; test if result > 7 movwf INDF movlw 0x30 addwf INDF,W movwf scrB btfsc scrB,7 ; test if result > 7 movwf INDF ; save as MSD ; movlw dig_2 movwf FSR movlw 0x3 addwf INDF,W movwf scrB btfsc scrB,3 ; test if result > 7 movwf INDF movlw 0x30 addwf INDF,W movwf scrB btfsc scrB,7 ; test if result > 7 movwf INDF ; save as MSD goto loop8 ; binbcdU32: ; convert 32 bit unsigned count_4:3:2:1-->dig_5..1, 10 digits, ; dis_5 low nibble=MSD, +1 stack level bcf STATUS,C ; clear the carry bit BCF STATUS, IRP ;Page zero or 1 for indirect movlw 32 movwf scrA clrf dig_1 clrf dig_2 clrf dig_3 clrf dig_4 clrf dig_5 loop28: rlf count_1,F rlf count_2,F rlf count_3,F rlf count_4,F rlf dig_1, F rlf dig_2, F rlf dig_3, F rlf dig_4, F rlf dig_5, F ; decfsz scrA, F goto adjDEC RETLW 0 ; adjDEC: movlw dig_1 movwf FSR call adjBCD ; movlw dig_2 movwf FSR call adjBCD ; movlw dig_3 movwf FSR call adjBCD ; movlw dig_4 movwf FSR call adjBCD ; movlw dig_5 movwf FSR call adjBCD goto loop28 adjBCD: movlw 0x3 addwf INDF,W movwf scrB btfsc scrB,3 ; test if result > 7 movwf INDF movlw 0x30 addwf INDF,W movwf scrB btfsc scrB,7 ; test if result > 7 movwf INDF ; save as MSD RETLW 0 ; init display in 4 bit transfer mode init_disp: Bank0 clrf PORTD Bank1 movlw B'11000000' ; port D<0..5>=out movwf TRISD Bank0 movlw 200 ; 20ms call del_1mx movlw 0x3 call send_n movlw 50 ; 5ms call del_1mx movlw 0x3 call send_n call del_100 ; 100uS movlw 0x3 call send_n call del_100 movlw 0x2 call send_n call del_1m movlw 0x28 ; function, 4 bit data, 2 line, 5X7 call send_b call del_1m movlw 0x6 ; Entry mode set, increment, no shift call send_b call del_100 movlw 0xE ; display on, cursor on, blink off call send_b call del_100 movlw 0x1 ; display clear call send_b movlw 30 ; 2 ms delay to clear the display call del_1mx return linie1: DE "Display Test X",0 linie2: DE "Pic 16F877 123",0 linie3: DE " ",0 org 0x0600 ; page 0 LOWBAND ADDWF PCL,F RETLW B'11111111' RETLW B'11111111' RETLW B'11111010' RETLW B'10101010' RETLW B'10101010' RETLW B'10100000' RETLW B'10000000' RETLW B'00000001' RETLW B'00000101' RETLW B'00010101' RETLW B'01010111' RETLW B'01011111' RETLW B'01111110' RETLW B'01111110' RETLW B'11111010' RETLW B'11101000' RETLW B'11101000' RETLW B'10100000' RETLW B'10100001' RETLW B'10000001' RETLW B'10000111' RETLW B'00000111' RETLW B'00011111' RETLW B'00011110' RETLW B'01011110' RETLW B'01111000' RETLW B'01111000' RETLW B'01111000' RETLW B'11100001' RETLW B'11100001' RETLW B'11100001' RETLW B'10000111' RETLW B'10000111' RETLW B'10000110' RETLW B'10011110' RETLW B'00011110' RETLW B'00011100' RETLW B'00011000' RETLW B'01111001' RETLW B'01111001' RETLW B'01110001' RETLW B'01100011' RETLW B'11100111' RETLW B'11100111' RETLW B'11000110' RETLW B'10001110' RETLW B'10001100' RETLW B'10011100' RETLW B'10011000' RETLW B'00011001' RETLW B'00111001' RETLW B'00110011' RETLW B'01110011' RETLW B'01100011' RETLW B'01100110' RETLW B'01100110' RETLW B'11100110' RETLW B'11001100' RETLW B'11001100' RETLW B'10001101' RETLW B'10011001' RETLW B'10011001' RETLW B'10011011' RETLW B'00110011' RETLW B'00110010' RETLW B'00110110' RETLW B'01100110' RETLW B'01100100' RETLW B'01101100' RETLW B'01001100' RETLW B'11001101' RETLW B'11001001' RETLW B'11011011' RETLW B'10011011' RETLW B'10010011' RETLW B'10010010' RETLW B'10110010' RETLW B'00110100' RETLW B'00110100' RETLW B'00100100' RETLW B'01101101' RETLW B'01101101' RETLW B'01001101' RETLW B'01001011' RETLW B'11001011' RETLW B'11010010' RETLW B'11010010' RETLW B'10010010' RETLW B'10110100' RETLW B'10110100' RETLW B'10110101' RETLW B'00101101' RETLW B'00101101' RETLW B'00101111' RETLW B'01101011' RETLW B'01001010' RETLW B'01001010' RETLW B'01000010' RETLW B'11010000' RETLW B'11010000' RETLW B'11010100' RETLW B'10110101' RETLW B'10110101' RETLW B'10111111' RETLW B'10101111' RETLW B'00101111' RETLW B'00101010' RETLW B'00001010' RETLW B'01000000' RETLW B'01000000' RETLW B'01010000' RETLW B'01010101' RETLW B'11010101' RETLW B'11010101' RETLW B'11111111' RETLW B'10111111' RETLW B'10111110' RETLW B'10101010' RETLW B'10101010' RETLW B'00101000' RETLW B'00000000' RETLW B'00000001' RETLW B'01000001' RETLW B'01010101' RETLW B'01010111' RETLW B'01010111' RETLW B'11111111' RETLW B'11111110' RETLW B'11111010' RETLW B'10101000' RETLW B'10101000' RETLW B'10100000' RETLW B'10100001' RETLW B'00000001' RETLW B'00000111' RETLW B'00000111' RETLW B'01010111' RETLW B'01011110' RETLW B'01011110' RETLW B'01111110' RETLW B'11111000' RETLW B'11111000' RETLW B'11101001' RETLW B'10100001' RETLW B'10100001' RETLW B'10000011' RETLW B'10000111' RETLW B'00000110' RETLW B'00000110' RETLW B'00011110' RETLW B'01011100' RETLW B'01011000' RETLW B'01111000' RETLW B'01111001' RETLW B'11110001' RETLW B'11100011' RETLW B'11100011' RETLW B'10100111' RETLW B'10000110' RETLW B'10000110' RETLW B'10001100' RETLW B'00011100' RETLW B'00011100' RETLW B'00011001' RETLW B'01111001' RETLW B'01111001' RETLW B'01110011' RETLW B'01110011' RETLW B'11100010' RETLW B'11100110' RETLW B'11100110' RETLW B'10001100' RETLW B'10001100' RETLW B'10001101' RETLW B'10011001' RETLW B'00011001' RETLW B'00011011' RETLW B'00110011' RETLW B'01110011' RETLW B'01110010' RETLW B'01100110' RETLW B'01100100' RETLW B'11100100' RETLW B'11001100' RETLW B'11001101' RETLW B'10001101' RETLW B'10001011' RETLW B'10011011' RETLW B'10011011' RETLW B'00010010' RETLW B'00110010' RETLW B'00110100' RETLW B'01110100' RETLW B'01100100' RETLW B'01101101' RETLW B'01101101' RETLW B'11001101' RETLW B'11001011' RETLW B'11001011' RETLW B'10011010' RETLW B'10010010' RETLW B'10010010' RETLW B'10110000' RETLW B'00110100' RETLW B'00110101' RETLW B'00110101' RETLW B'01101101' RETLW B'01101111' RETLW B'01101111' RETLW B'01001011' RETLW B'11001010' RETLW B'11001010' RETLW B'11010000' RETLW B'10010000' RETLW B'10010100' RETLW B'10110101' RETLW B'10110101' RETLW B'00111111' RETLW B'00101111' RETLW B'00101111' RETLW B'01101010' RETLW B'01001010' RETLW B'01001010' RETLW B'01000000' RETLW B'11000000' RETLW B'11010001' RETLW B'11010101' RETLW B'10010101' RETLW B'10110111' RETLW B'10111111' RETLW B'10111110' RETLW B'00101110' RETLW B'00101010' RETLW B'00101000' RETLW B'01000000' RETLW B'01000000' RETLW B'01000001' RETLW B'01010101' RETLW B'11010111' RETLW B'11010111' RETLW B'11111111' RETLW B'10111110' RETLW B'10111110' RETLW B'10111000' RETLW B'10101000' RETLW B'00101000' RETLW B'00100001' RETLW B'00000001' RETLW B'01000001' RETLW B'01000111' RETLW B'01010111' RETLW B'01010110' RETLW B'11011110' RETLW B'11111110' RETLW B'11111100' org 0x0700 ; page 0 , avoid 256 boundary problem HIGHBAND ADDWF PCL,F RETLW B'11111111' RETLW B'11101010' RETLW B'10101000' RETLW B'10000000' RETLW B'00000101' RETLW B'00010111' RETLW B'01011111' RETLW B'01111110' RETLW B'11111000' RETLW B'11100000' RETLW B'10000001' RETLW B'10000111' RETLW B'00010111' RETLW B'00011110' RETLW B'01111000' RETLW B'01111000' RETLW B'11100001' RETLW B'11100011' RETLW B'10000111' RETLW B'10001110' RETLW B'00011100' RETLW B'00111000' RETLW B'01111001' RETLW B'01100011' RETLW B'11100111' RETLW B'11000110' RETLW B'10001100' RETLW B'10011100' RETLW B'00011001' RETLW B'00110011' RETLW B'01110011' RETLW B'01100110' RETLW B'11000100' RETLW B'11001100' RETLW B'10011001' RETLW B'10011011' RETLW B'00110011' RETLW B'00110010' RETLW B'01100100' RETLW B'01101100' RETLW B'11001101' RETLW B'11001011' RETLW B'10010011' RETLW B'10110010' RETLW B'00110100' RETLW B'00100100' RETLW B'01101101' RETLW B'01001011' RETLW B'11001011' RETLW B'11010010' RETLW B'10010000' RETLW B'10110100' RETLW B'00101101' RETLW B'00101111' RETLW B'01001011' RETLW B'01001010' RETLW B'11010000' RETLW B'11010100' RETLW B'10110101' RETLW B'10111111' RETLW B'00101111' RETLW B'00101010' RETLW B'01000000' RETLW B'01010000' RETLW B'11010101' RETLW B'11110111' RETLW B'10111111' RETLW B'10101010' RETLW B'00101000' RETLW B'00000000' RETLW B'01000001' RETLW B'01010111' RETLW B'11011111' RETLW B'11111110' RETLW B'10101000' RETLW B'10101000' RETLW B'00000001' RETLW B'00000111' RETLW B'01010111' RETLW B'01011110' RETLW B'11111000' RETLW B'11111000' RETLW B'10100001' RETLW B'10100011' RETLW B'00000111' RETLW B'00011110' RETLW B'01011100' RETLW B'01111000' RETLW B'11111001' RETLW B'11100011' RETLW B'10100111' RETLW B'10000110' RETLW B'00001100' RETLW B'00011100' RETLW B'01011001' RETLW B'01110011' RETLW B'11100011' RETLW B'11100110' RETLW B'10000100' RETLW B'10001100' RETLW B'00011001' RETLW B'00011011' RETLW B'01110011' RETLW B'01110010' RETLW B'01100100' RETLW B'11001100' RETLW B'11001101' RETLW B'10011011' RETLW B'10011011' RETLW B'00110010' RETLW B'00110100' RETLW B'01100100' RETLW B'01101101' RETLW B'11001111' RETLW B'11001011' RETLW B'10010010' RETLW B'10110000' RETLW B'00110100' RETLW B'00100101' RETLW B'01101111' RETLW B'01001011' RETLW B'11001010' RETLW B'11010000' RETLW B'10010100' RETLW B'10110101' RETLW B'00111111' RETLW B'00101111' RETLW B'01001010' RETLW B'01000000' RETLW B'11010000' RETLW B'11010101' RETLW B'10110111' RETLW B'10111111' RETLW B'00101010' RETLW B'00101000' RETLW B'01000000' RETLW B'01000001' RETLW B'11010111' RETLW B'11111111' RETLW B'10111110' RETLW B'10101000' RETLW B'00101000' RETLW B'00000001' RETLW B'01000111' RETLW B'01010111' RETLW B'11011110' RETLW B'11111100' RETLW B'10111000' RETLW B'10100001' RETLW B'00000011' RETLW B'00000110' RETLW B'01010110' RETLW B'01011100' RETLW B'11111001' RETLW B'11111001' RETLW B'10100011' RETLW B'10100010' RETLW B'00000110' RETLW B'00011100' RETLW B'01011101' RETLW B'01111001' RETLW B'11110011' RETLW B'11100010' RETLW B'10100110' RETLW B'10000100' RETLW B'00001101' RETLW B'00011001' RETLW B'01011011' RETLW B'01110010' RETLW B'11100010' RETLW B'11100100' RETLW B'10001101' RETLW B'10001101' RETLW B'00011011' RETLW B'00011010' RETLW B'01110010' RETLW B'01110100' RETLW B'11100101' RETLW B'11101101' RETLW B'10001111' RETLW B'10011010' RETLW B'00010010' RETLW B'00110000' RETLW B'01110101' RETLW B'01100101' RETLW B'11101111' RETLW B'11001010' RETLW B'10001010' RETLW B'10010000' RETLW B'00010001' RETLW B'00110101' RETLW B'01101111' RETLW B'01101110' RETLW B'11001010' RETLW B'11001000' RETLW B'10010001' RETLW B'10010101' RETLW B'00110111' RETLW B'00111110' RETLW B'01101110' RETLW B'01101000' RETLW B'11000001' RETLW B'11010001' RETLW B'10010111' RETLW B'10111110' RETLW B'00111110' RETLW B'00101000' RETLW B'01101001' RETLW B'01000001' RETLW B'01000111' RETLW B'11010110' RETLW B'11111110' RETLW B'10111100' RETLW B'10101001' RETLW B'00100001' RETLW B'00000011' RETLW B'01000110' RETLW B'01010110' RETLW B'11011100' RETLW B'11111001' RETLW B'10111001' RETLW B'10100011' RETLW B'00000010' RETLW B'00000110' RETLW B'01011100' RETLW B'01011101' RETLW B'11111001' RETLW B'11111011' RETLW B'10100010' RETLW B'10100110' RETLW B'00000100' RETLW B'00001101' RETLW B'01011101' RETLW B'01111011' RETLW B'11110010' RETLW B'11100010' RETLW B'10100100' RETLW B'10000101' RETLW B'00001101' RETLW B'00011011' RETLW B'01011010' RETLW B'01110010' RETLW B'11110100' RETLW B'11100101' RETLW B'10001101' RETLW B'10001111' RETLW B'00011010' RETLW B'00010010' RETLW B'01110000' RETLW B'01110101' RETLW B'11100101' RETLW B'11101111' RETLW B'10001010' RETLW B'10001010' RETLW B'00010000' END