nel65 Postat Mai 13, 2015 Partajează Postat Mai 13, 2015 (editat) salut ,am acest fisier ,cred ca este in limbaj asamblare si am nevoie de el in format hex ,sa-l pun in controler 16F72 ,oscilator extern 20 MHz.Este o schema de ups.Poate cineva sa-l compileze pentru mine ca eu nu ma pricep? LIST P=16F72, F=INHX8M include "P16F72.inc" __config _HS_OSC & _WDT_ON & _PWRTE_ON & _CP_OFFW_TEMP equ 0x20BATTV equ 0x4DAD_RESULT equ 0x33SEL_CHANEL equ 0x32goto initnopnopnopgoto isrnopnopnop table ADDWF PCL , F RETLW .0 RETLW .6 RETLW .13 RETLW .19 RETLW .25 RETLW .31 RETLW .37 RETLW .43 RETLW .49 RETLW .55 RETLW .60 RETLW .66 RETLW .71 RETLW .76 RETLW .81 RETLW .86 RETLW .91 RETLW .95 RETLW .99 RETLW .103 RETLW .106 RETLW .110 RETLW .113 RETLW .116 RETLW .118 RETLW .121 RETLW .122 RETLW .124 RETLW .126 RETLW .127 RETLW .127 RETLW .128 RETLW .128 RETLW .128 RETLW .127 RETLW .127 RETLW .126 RETLW .124 RETLW .122 RETLW .121 RETLW .118 RETLW .116 RETLW .113 RETLW .110 RETLW .106 RETLW .103 RETLW .99 RETLW .95 RETLW .91 RETLW .86 RETLW .81 RETLW .76 RETLW .71 RETLW .66 RETLW .60 RETLW .55 RETLW .49 RETLW .43 RETLW .37 RETLW .31 RETLW .25 RETLW .19 RETLW .13 RETLW .6 RETLW .0 init clrf STATUSclrf PORTCclrf PORTBbcf STATUS,RP1bsf STATUS,RP0 ; switch to bank 1movlw b'11000111'movwf OPTION_REGmovlw b'111111'movwf TRISAmovlw b'00000100'movwf TRISCmovlw b'00000111'movwf TRISBmovlw .0movwf ADCON1bcf STATUS,RP0 ; switch to bank 0movlw b'11000000'movwf INTCONmovlw .0movwf 0x10bcf STATUS,RP0 ; switch to bank 0movlw b'10000001'movwf ADCON0clrf PORTAmovlw b'00000111'movwf PORTCcall LEVEL_3movlw .5movwf 0x3Cmovwf 0x2Amovlw .10movwf 0x3Ecall LEVEL_4call LEVEL_4goto LEVEL_5 LEVEL_3 movlw .80movwf W_TEMPmovlw .33movwf FSRLEVEL_6 clrf INDFincf FSR,fdecfsz W_TEMP,fgoto LEVEL_6return ANASCAN movlw .5movwf W_TEMPLEVEL_7 decfsz W_TEMP,fgoto LEVEL_7movf SEL_CHANEL,wmovwf W_TEMPbcf STATUS,Crlf W_TEMP,frlf W_TEMP,frlf W_TEMP,fmovlw .129iorwf W_TEMP,wmovwf ADCON0movlw .20movwf 0x37LEVEL_10 decfsz 0x37,fgoto LEVEL_8goto LEVEL_9LEVEL_8 btfss 0x2C,0goto LEVEL_10call LEVEL_11LEVEL_9 bsf ADCON0,2LEVEL_12 btfsc 0x2C,0call LEVEL_11btfsc ADCON0,2goto LEVEL_12movf ADRES,wmovwf AD_RESULTbcf 0xC,6return isr bcf INTCON,GIEmovwf 0x31movf STATUS,wmovwf 0x30bcf 0xC,0bcf 0x10,0btfsc 0x2B,0goto LEVEL_13btfsc 0x2C,3goto LEVEL_14goto exit LEVEL_16 bcf PORTC,4bcf PORTC,5movf 0x26,wmovwf TMR1Lcomf TMR1L,fmovf 0x27,wmovwf TMR1Hcomf TMR1H,fbsf PORTC,0bsf PORTC,1bsf 0x2D,5bsf 0x10,0goto exit LEVEL_14 btfss 0x2D,5goto LEVEL_16bcf PORTC,4bcf PORTC,5movf 0x28,wmovwf 0x26movf 0x29,wmovwf 0x27movf 0x24,wmovwf 0x22movwf TMR1Lcomf TMR1L,fmovf 0x25,wmovwf 0x23movwf TMR1Hcomf TMR1H,fbcf PORTC,0bcf PORTC,1bcf 0x2D,5bsf 0x10,0goto exit LEVEL_13 btfss 0x2D,5goto LEVEL_17bcf 0x2D,5bsf 0x2C,0movf 0x28,wmovwf 0x26movf 0x29,wmovwf 0x27movf 0x24,wmovwf 0x22movwf TMR1Lcomf TMR1L,fmovf 0x25,wmovwf 0x23movwf TMR1Hcomf TMR1H,fmovf 0x21,wbtfss STATUS,Zgoto LEVEL_18movlw .8xorwf 0x2B,f;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;DEAD BAND ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>LEVEL_18 bsf 0x10,0btfsc 0x2B,3goto LEVEL_19bcf PORTC,5bsf PORTC,0nopnopnopnopnopbsf PORTC,4bcf PORTC,1goto exit LEVEL_19 bcf PORTC,4bsf PORTC,1nopnopnopnopnopbsf PORTC,5bcf PORTC,0goto exit;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;DEAD BAND ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>LEVEL_17 bcf PORTC,4bcf PORTC,5movf 0x26,wmovwf TMR1Lcomf TMR1L,fmovf 0x27,wmovwf TMR1Hcomf TMR1H,fbcf PORTC,0bcf PORTC,1bsf 0x2D,5bsf 0x10,0 exit movf 0x30,wmovwf STATUSmovf 0x31,wbsf INTCON,GIEretfie LEVEL_42 movlw .2 ;MAINS SENCEmovwf SEL_CHANELcall ANASCAN ;LEVEL 21,22,23movf AD_RESULT,wsublw .67btfsc STATUS,Cgoto LEVEL_21movf AD_RESULT,wsublw .138btfss STATUS,Cgoto LEVEL_21movf AD_RESULT,wsublw .68btfsc STATUS,Cgoto LEVEL_22movf AD_RESULT,wsublw .135btfsc STATUS,Cgoto LEVEL_23LEVEL_22 clrf 0x55clrf 0x34clrf 0x35return LEVEL_23 btfsc 0x2B,1returnclrf 0x55movlw .4movwf 0x3Dmovlw .1addwf 0x34,fbtfss STATUS,Creturnincf 0x35,fmovf 0x35,wsublw .50btfsc STATUS,Creturnclrf 0x34clrf 0x35goto LEVEL_24LEVEL_21 btfsc 0x2B,0returnincf 0x55,fclrf 0x34clrf 0x35movf 0x55,wsublw .15btfsc STATUS,Creturngoto LEVEL_25LEVEL_40 btfss 0xC,2goto LEVEL_26bcf 0xC,2clrf 0x36goto LEVEL_27LEVEL_26 btfss 0x2C,6returnincf 0x36,fmovlw .4subwf 0x36,wbtfss STATUS,Creturnclrf 0x36LEVEL_25 btfss 0x2C,7goto LEVEL_28btfsc 0x2B,0returnLEVEL_76 btfsc 0x2D,3returncall LEVEL_29movlw .7movwf 0x38call LEVEL_30bsf PORTC,7call LEVEL_4call LEVEL_4clrf 0x34clrf 0x35clrf 0x55call LEVEL_31bcf 0x2B,1bcf PORTB,4bcf PORTB,5bcf 0x2D,3bcf PORTB,7movlw .10movwf 0x3Dbsf 0x2B,0movlw .0movwf 0x21call LEVEL_11bsf 0x2D,5movlw .200movwf TMR1Lmovlw .255movwf TMR1Hbsf STATUS,RP0 ; switch to bank 1bsf 0x8C,0bcf STATUS,RP0 ; switch to bank 0bsf 0x10,0bsf INTCON,GIEclrf 0x40clrf 0x41clrf 0x42clrf 0x4Creturn LEVEL_28 btfss 0x2C,3goto LEVEL_32call LEVEL_29call LEVEL_31LEVEL_32 clrf 0x55bcf 0x2B,1bcf PORTB,4return LEVEL_27 btfsc 0x2B,1returnmovlw .1addwf 0x34,fbtfss STATUS,Creturnincf 0x35,fmovlw .10movwf 0x3Dmovf 0x35,wsublw .2btfsc STATUS,Creturnclrf 0x34clrf 0x35LEVEL_24 call LEVEL_33bsf 0x2B,1bsf PORTB,4LEVEL_31 bcf PORTB,6bcf 0x2C,3movlw .100movwf 0x54movlw .50movwf 0x2FreturnLEVEL_33 call LEVEL_29call LEVEL_4clrf 0x2Eclrf 0x3Aclrf 0x3Bbcf 0x2B,0bcf 0x2D,3bcf PORTB,7bcf PORTB,5bcf PORTC,7call LEVEL_4returnLEVEL_4 clrwdtmovlw .25movwf 0x38LEVEL_30 clrwdtmovlw .0movwf W_TEMPLEVEL_34 clrwdtdecfsz W_TEMP,fgoto LEVEL_34decfsz 0x38,fgoto LEVEL_30returnLEVEL_54 movlw .1 ; BATTERY SENCEmovwf SEL_CHANELcall ANASCANmovf AD_RESULT,waddwf 0x43,fbtfss STATUS,Cgoto LEVEL_35movf 0x44,waddlw .1movwf 0x44LEVEL_35 movf 0x45,waddlw .1movwf 0x45andlw .128btfsc STATUS,Zgoto LEVEL_36call LEVEL_37movf BATTV,wsublw .215 ;CHG CUT OFFbtfsc STATUS,Cgoto LEVEL_36call LEVEL_29call LEVEL_31LEVEL_36 goto LEVEL_38LEVEL_29 bcf INTCON,GIEbcf 0x10,0bcf 0x12,2bcf 0xC,0bcf 0xC,2bsf STATUS,RP0 ; switch to bank 1bcf 0x8C,0bcf STATUS,RP0 ; switch to bank 0bcf PORTC,4bcf PORTC,5nopnopnopnopnopnopnopnopnopnopbsf PORTC,0bsf PORTC,1returnLEVEL_5 movlw .0movwf TMR0movlw .4movwf 0x17clrf 0x3Aclrf 0x3Bclrf 0x2Emovlw .10movwf 0x39movlw .100movwf 0x54movlw .10movwf 0x3Eclrf 0x34clrf 0x35clrf 0x55movlw .25movwf 0x2Amovlw .50movwf 0x2Fbcf 0x2C,7bcf 0xC,2movlw .10movwf 0x3Dbcf PORTC,7call LEVEL_4call LEVEL_4call LEVEL_4LEVEL_38 clrwdtbcf 0x2C,6btfsc INTCON,T0IFbsf 0x2C,6bcf INTCON,T0IFbtfsc 0x2C,0call LEVEL_11btfsc PORTA,4goto LEVEL_39call LEVEL_40goto LEVEL_41LEVEL_39 call LEVEL_42LEVEL_41 call LEVEL_43btfsc 0x2B,1goto LEVEL_44goto LEVEL_45LEVEL_45 btfss 0x2B,0goto LEVEL_46btfsc 0x2C,7goto LEVEL_47call LEVEL_33goto LEVEL_46LEVEL_47 movf 0x2E,wbtfss STATUS,Zgoto LEVEL_46movlw .4 ;OVERLOAD SENCEmovwf SEL_CHANELcall ANASCANmovf AD_RESULT,wsublw .120btfss STATUS,Cgoto LEVEL_48movf AD_RESULT,wsublw .60btfsc STATUS,Cgoto LEVEL_49movlw .10movwf 0x3Dmovlw .1addwf 0x3A,fbtfss STATUS,Cgoto LEVEL_49incf 0x3B,fmovf 0x3B,wsublw .5btfsc STATUS,Cgoto LEVEL_49LEVEL_48 call LEVEL_29clrf 0x3Aclrf 0x3Bmovlw .50movwf 0x2Emovlw .50movwf 0x3Dbsf PORTB,5goto LEVEL_46LEVEL_49 bcf PORTB,5movf BATTV,wbtfsc STATUS,Zgoto LEVEL_50bcf 0x2D,3 sublw .154 ;LOW BATTERY BEEPbtfss STATUS,Cgoto LEVEL_50bsf 0x2D,3 movf BATTV,wsublw .148 ;LOW BATTERY CUTbtfss STATUS,Cgoto LEVEL_50call LEVEL_29bsf 0x2D,3goto LEVEL_46LEVEL_50 movlw .0 ;FEED BACKmovwf SEL_CHANELcall ANASCANmovf AD_RESULT,waddwf 0x40,fbtfss STATUS,Cgoto LEVEL_51movf 0x41,waddlw .1movwf 0x41LEVEL_51 movf 0x42,waddlw .1movwf 0x42andlw b'00100000'btfsc STATUS,Zgoto LEVEL_46call LEVEL_52call LEVEL_53LEVEL_46 goto LEVEL_54LEVEL_44 btfss 0x2B,1goto LEVEL_55btfsc 0x2C,3goto LEVEL_56movf BATTV,wsublw .201 ;CHG RESTARTbtfss STATUS,Cgoto LEVEL_55movf 0x2F,wbtfss STATUS,Zgoto LEVEL_55bsf 0x2C,3bsf PORTB,4bsf PORTB,6clrf 0x46clrf 0x47clrf 0x48clrf 0x4Emovlw .100movwf 0x54call LEVEL_57 ; LEVEL_57 = 0x346movlw .200movwf TMR1Lmovlw .255movwf TMR1Hbsf 0x2D,5bsf STATUS,RP0 ; switch to bank 1bsf 0x8C,0bcf STATUS,RP0 ; switch to bank 0bsf 0x10,0bsf INTCON,GIEgoto LEVEL_55LEVEL_56 movlw .3 ;CHARGING CURRENTmovwf SEL_CHANELcall ANASCANmovf AD_RESULT,wsublw .180btfsc STATUS,Cgoto LEVEL_58call LEVEL_29call LEVEL_31goto LEVEL_55LEVEL_58 movf AD_RESULT,waddwf 0x46,fbtfss STATUS,Cgoto LEVEL_59movf 0x47,waddlw .1movwf 0x47LEVEL_59 movf 0x48,waddlw .1movwf 0x48andlw .32btfsc STATUS,Zgoto LEVEL_55call LEVEL_60call LEVEL_61LEVEL_55 goto LEVEL_54LEVEL_52 movlw .5movwf W_TEMPLEVEL_62 bcf STATUS,Crrf 0x41,frrf 0x40,fdecfsz W_TEMP,fgoto LEVEL_62movf 0x40,wmovwf 0x4Cclrf 0x40clrf 0x41clrf 0x42returnLEVEL_37 movlw .7movwf W_TEMPLEVEL_63 bcf STATUS,Crrf 0x44,frrf 0x43,fdecfsz W_TEMP,fgoto LEVEL_63movf 0x43,wmovwf BATTVclrf 0x43clrf 0x44clrf 0x45returnLEVEL_60 movlw .5movwf W_TEMPLEVEL_64 bcf STATUS,Crrf 0x47,frrf 0x46,fdecfsz W_TEMP,fgoto LEVEL_64movf 0x46,wmovwf 0x4Eclrf 0x46clrf 0x47clrf 0x48returnLEVEL_43 btfss 0x2C,6goto LEVEL_65btfss 0x2C,3goto LEVEL_66btfsc 0x2C,5goto LEVEL_66movlw .128subwf 0x54,wbtfsc STATUS,Cgoto LEVEL_67incf 0x54,fgoto LEVEL_67LEVEL_66 btfss 0x2B,0goto LEVEL_67btfsc 0x2B,7goto LEVEL_67movlw .128subwf 0x39,wbtfsc STATUS,Cgoto LEVEL_67incf 0x39,fLEVEL_67 btfsc PORTB,2goto LEVEL_68movf 0x2A,wbtfsc STATUS,Zgoto LEVEL_69decfsz 0x2A,fgoto LEVEL_70btfsc 0x2B,5goto LEVEL_69bsf 0x2B,5btfsc 0x2C,7goto LEVEL_71bsf 0x2C,7bsf PORTB,3movlw .10movwf 0x3Dgoto LEVEL_70LEVEL_71 bcf 0x2C,7bcf PORTB,3movlw .10movwf 0x3Dbtfsc 0x2B,0call LEVEL_33movlw .10movwf 0x39movlw .10movwf 0x3Egoto LEVEL_70LEVEL_68 bcf 0x2B,5LEVEL_69 movlw .30movwf 0x2ALEVEL_70 decfsz 0x3C,fgoto LEVEL_65movlw .20movwf 0x3Cbtfss 0x2D,3goto LEVEL_72movlw .10movwf 0x3Dmovlw .128xorwf PORTB,fLEVEL_72 btfss 0x2B,1goto LEVEL_73btfss 0x2C,3goto LEVEL_74movlw .64xorwf PORTB,fLEVEL_74 movf 0x2F,wbtfss STATUS,Zdecf 0x2F,fLEVEL_73 btfss 0x2B,0goto LEVEL_75movf 0x2E,wbtfsc STATUS,Zgoto LEVEL_75decfsz 0x2E,fgoto LEVEL_75movlw .10movwf 0x39movlw .10movwf 0x3Ecall LEVEL_76LEVEL_75 movf 0x3D,wbtfsc STATUS,Zgoto LEVEL_65movlw b'1000000'xorwf PORTC,fdecfsz 0x3D,fgoto LEVEL_65bcf PORTC,6LEVEL_65 returnLEVEL_61 movf 0x4E,wsublw .5btfsc STATUS,Cgoto LEVEL_57bcf 0x2C,5movf 0x4E,wsubwf 0x54,wmovwf 0x52btfss STATUS,Cgoto LEVEL_77sublw .2btfss STATUS,Cgoto LEVEL_78return LEVEL_78 bcf STATUS,Crrf 0x52,fclrf 0x53movlw .1movwf 0x52movf 0x24,waddwf 0x52,fbtfsc STATUS,Cincf 0x53,fmovf 0x25,waddwf 0x53,fmovf 0x52,wsublw .0movf 0x53,wmovwf W_TEMPbtfss STATUS,Cincf W_TEMP,fmovf W_TEMP,wsublw .2btfsc STATUS,Cgoto LEVEL_79movlw .0movwf 0x24movlw .2movwf 0x25goto LEVEL_80LEVEL_79 movf 0x52,wmovwf 0x24movf 0x53,wmovwf 0x25goto LEVEL_80LEVEL_77 comf 0x52,fincf 0x52,fmovf 0x52,wsublw .2btfsc STATUS,Creturnbcf STATUS,Crrf 0x52,fclrf 0x53movlw .5movwf 0x52movf 0x52,wsubwf 0x24,fmovwf 0x52btfss STATUS,Cincf 0x53,fmovf 0x53,wsubwf 0x25,fmovwf 0x53btfsc STATUS,Cgoto LEVEL_80LEVEL_57 bsf 0x2C,5movlw .20movwf 0x24movlw .0movwf 0x25LEVEL_80 bcf STATUS,Cmovf 0x25,wmovwf W_TEMPmovf 0x24,wsublw .200movwf 0x28btfss STATUS,Cincf W_TEMP,fmovf W_TEMP,wsublw .2movwf 0x29return LEVEL_53 movf 0x4C,wsublw .5btfsc STATUS,Cgoto LEVEL_81bcf 0x2B,7bcf 0x2B,2movf 0x4C,wsubwf 0x39,wmovwf 0x52btfsc STATUS,Cgoto LEVEL_82bsf 0x2B,2comf 0x52,fincf 0x52,fLEVEL_82 movf 0x52,wsublw .2btfss STATUS,Cgoto LEVEL_83return LEVEL_83 bcf STATUS,Crrf 0x52,frrf 0x52,fmovlw .1movwf 0x52btfss 0x2B,2goto LEVEL_84movf 0x52,wsubwf 0x3E,fmovf 0x3E,wsublw .89btfss STATUS,Cgoto LEVEL_85return LEVEL_84 movf 0x52,waddwf 0x3E,fmovf 0x3E,wsublw .89btfsc STATUS,Creturnmovlw .89movwf 0x3Ereturn LEVEL_81 bsf 0x2B,7movlw .10movwf 0x39 LEVEL_85 movlw .10movwf 0x3Ereturn LEVEL_11 bcf 0x2C,0incf 0x21,fbtfss 0x21,6goto LEVEL_86clrf 0x21 LEVEL_86 movf 0x21,wcall tablemovwf 0x50movf 0x3E,wmovwf 0x51call LEVEL_88bcf STATUS,Crrf 0x53,frrf 0x52,fbcf STATUS,Crrf 0x53,frrf 0x52,fbcf STATUS,Crrf 0x53,frrf 0x52,fbcf STATUS,Crrf 0x53,frrf 0x52,fmovf 0x52,wmovwf 0x24movf 0x53,wmovwf 0x25bcf STATUS,Cmovf 0x24,wsublw .200movwf 0x28movf 0x25,wmovwf W_TEMPbtfss STATUS,Cincf W_TEMP,fmovf W_TEMP,wsublw .2movwf 0x29return LEVEL_88 clrf 0x53clrf 0x52movf 0x50,wbcf STATUS,Cbtfsc 0x51,0addwf 0x53,frrf 0x53,frrf 0x52,fbtfsc 0x51,1addwf 0x53,frrf 0x53,frrf 0x52,fbtfsc 0x51,2addwf 0x53,frrf 0x53,frrf 0x52,fbtfsc 0x51,3addwf 0x53,frrf 0x53,frrf 0x52,fbtfsc 0x51,4addwf 0x53,frrf 0x53,frrf 0x52,fbtfsc 0x51,5addwf 0x53,frrf 0x53,frrf 0x52,fbtfsc 0x51,6addwf 0x53,frrf 0x53,frrf 0x52,fbtfsc 0x51,7addwf 0x53,frrf 0x53,frrf 0x52,fretlw .0addlw .166addlw .255addlw .255addlw .255addlw .255movlw .10addwf 0x52,fbtfsc STATUS,Cincf 0x53,fmovlw .8addwf 0x53,fmovf 0x53,wmovwf PCLATHmovf 0x52,wmovwf PCLretlw .0retlw .0retlw .0retlw .0retlw .227retlw .54retlw .0retlw .227retlw .62retlw .0retlw .228retlw .8retlw .0retlw .228retlw .20retlw .0retlw .228retlw .34retlw .0retlw .228retlw .54retlw .0retlw .229retlw .32retlw .0retlw .230retlw .48retlw .0retlw .231retlw .16retlw .0retlw .231retlw .44retlw .0retlw .232retlw .4retlw .0retlw .232retlw .54retlw .0retlw .233retlw .6retlw .0retlw .233retlw .60retlw .0retlw .234retlw .27retlw .0retlw .234retlw .36retlw .0retlw .227retlw .57retlw .0retlw .228retlw .17retlw .0retlw .228retlw .41retlw .0retlw .229retlw .1retlw .0retlw .229retlw .25retlw .0retlw .229retlw .49retlw .0retlw .230retlw .9retlw .0retlw .230retlw .33retlw .0retlw .230retlw .57retlw .0retlw .231retlw .17retlw .0retlw .231retlw .41retlw .0retlw .232retlw .1retlw .0retlw .232retlw .25retlw .0retlw .232retlw .49retlw .0retlw .233retlw .9retlw .0retlw .233retlw .33retlw .0retlw .227retlw .60retlw .0retlw .228retlw .21retlw .0retlw .228retlw .44retlw .0retlw .229retlw .4retlw .0retlw .229retlw .28retlw .0retlw .229retlw .52retlw .0retlw .230retlw .12retlw .0retlw .230retlw .36retlw .0retlw .230retlw .60retlw .0retlw .231retlw .20retlw .0retlw .231retlw .45retlw .0retlw .232retlw .5retlw .0retlw .232retlw .28retlw .0retlw .232retlw .52retlw .0retlw .233retlw .12retlw .0retlw .233retlw .36retlw .0retlw .227retlw .63retlw .0retlw .228retlw .23retlw .0retlw .228retlw .47retlw .0retlw .229retlw .7retlw .0retlw .229retlw .31retlw .0retlw .229retlw .55retlw .0retlw .230retlw .15retlw .0retlw .230retlw .39retlw .0retlw .230retlw .63retlw .0retlw .231retlw .23retlw .0retlw .231retlw .47retlw .0retlw .232retlw .7retlw .0retlw .232retlw .31retlw .0retlw .232retlw .55retlw .0retlw .233retlw .15retlw .0retlw .233retlw .39retlw .0retlw .228retlw .2retlw .0retlw .228retlw .26retlw .0retlw .228retlw .50retlw .0retlw .229retlw .10retlw .0retlw .229retlw .34retlw .0retlw .229retlw .58retlw .0retlw .230retlw .18retlw .0retlw .230retlw .42retlw .0retlw .231retlw .2retlw .0retlw .231retlw .26retlw .0retlw .231retlw .50retlw .0retlw .232retlw .10retlw .0retlw .232retlw .34retlw .0retlw .232retlw .58retlw .0retlw .233retlw .18retlw .0retlw .233retlw .42retlw .0retlw .228retlw .5retlw .0retlw .228retlw .29retlw .0retlw .228retlw .53retlw .0retlw .229retlw .13retlw .0retlw .229retlw .37retlw .0retlw .229retlw .61retlw .0retlw .230retlw .21retlw .0retlw .230retlw .45retlw .0retlw .231retlw .5retlw .0retlw .231retlw .29retlw .0retlw .231retlw .53retlw .0retlw .232retlw .13retlw .0retlw .232retlw .37retlw .0retlw .232retlw .61retlw .0retlw .233retlw .21retlw .0retlw .233retlw .45retlw .0retlw .228retlw .9retlw .0retlw .228retlw .32retlw .0retlw .228retlw .56retlw .0retlw .229retlw .16retlw .0retlw .229retlw .40retlw .0retlw .230retlw .0retlw .0retlw .230retlw .24retlw .0retlw .230retlw .31retlw .0retlw .231retlw .8retlw .0retlw .231retlw .32retlw .0retlw .231retlw .56retlw .0retlw .232retlw .16retlw .0retlw .232retlw .40retlw .0retlw .233retlw .0retlw .0retlw .233retlw .24retlw .0retlw .233retlw .48retlw .0retlw .228retlw .11retlw .0retlw .228retlw .35retlw .0retlw .228retlw .59retlw .0retlw .229retlw .19retlw .0retlw .229retlw .43retlw .0retlw .230retlw .3retlw .0retlw .230retlw .27retlw .0retlw .230retlw .51retlw .0retlw .231retlw .11retlw .0retlw .231retlw .35retlw .0retlw .231retlw .59retlw .0retlw .232retlw .19retlw .0retlw .232retlw .43retlw .0retlw .233retlw .3retlw .0retlw .233retlw .27retlw .0retlw .233retlw .51retlw .0retlw .228retlw .14retlw .0retlw .228retlw .38retlw .0retlw .228retlw .62retlw .0retlw .229retlw .22retlw .0retlw .229retlw .46retlw .0retlw .230retlw .6retlw .0retlw .230retlw .30retlw .0retlw .230retlw .54retlw .0retlw .231retlw .14retlw .0retlw .231retlw .38retlw .0retlw .231retlw .62retlw .0retlw .232retlw .22retlw .0retlw .232retlw .46retlw .0retlw .233retlw .7retlw .0retlw .233retlw .30retlw .0retlw .233retlw .54movlw .199addwf 0x52,fbtfsc STATUS,Cincf 0x53,fmovlw .9addwf 0x53,fmovf 0x53,wmovwf PCLATHmovf 0x52,wmovwf PCLretlw .0retlw .0retlw .0retlw .0retlw .0retlw .0retlw .8retlw .0retlw .0retlw .1retlw .0retlw .0retlw .8retlw .0retlw .0retlw .5retlw .0retlw .0retlw .8retlw .0retlw .1retlw .0retlw .0retlw .0retlw .8retlw .0retlw .1retlw .6retlw .0retlw .0retlw .8retlw .0retlw .2retlw .3retlw .0retlw .0retlw .8retlw .0retlw .3retlw .3retlw .0retlw .0retlw .8retlw .0retlw .5retlw .4retlw .0retlw .0retlw .8retlw .0retlw .9retlw .4retlw .0retlw .0retlw .8retlw .1retlw .1retlw .0retlw .0retlw .0retlw .8retlw .1retlw .2retlw .4retlw .0retlw .0retlw .8retlw .1retlw .3retlw .6retlw .0retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .9 ; d'9' b'1001' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .9 ; d'9' b'1001' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .4 ; d'4' b'100' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .3 ; d'3' b'11' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .7 ; d'7' b'111' a'¶'retlw .4 ; d'4' b'100' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .9 ; d'9' b'1001' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .3 ; d'3' b'11' a'¶'retlw .4 ; d'4' b'100' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .4 ; d'4' b'100' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .7 ; d'7' b'111' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .4 ; d'4' b'100' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .4 ; d'4' b'100' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .4 ; d'4' b'100' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .7 ; d'7' b'111' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .4 ; d'4' b'100' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .3 ; d'3' b'11' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .4 ; d'4' b'100' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .7 ; d'7' b'111' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .4 ; d'4' b'100' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .7 ; d'7' b'111' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .9 ; d'9' b'1001' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .4 ; d'4' b'100' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .3 ; d'3' b'11' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .7 ; d'7' b'111' a'¶'retlw .7 ; d'7' b'111' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .9 ; d'9' b'1001' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .3 ; d'3' b'11' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .3 ; d'3' b'11' a'¶'retlw .7 ; d'7' b'111' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .4 ; d'4' b'100' a'¶'retlw .9 ; d'9' b'1001' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .7 ; d'7' b'111' a'¶'retlw .3 ; d'3' b'11' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .7 ; d'7' b'111' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .9 ; d'9' b'1001' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .3 ; d'3' b'11' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .4 ; d'4' b'100' a'¶'retlw .3 ; d'3' b'11' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .7 ; d'7' b'111' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .7 ; d'7' b'111' a'¶'retlw .9 ; d'9' b'1001' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .9 ; d'9' b'1001' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .3 ; d'3' b'11' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .7 ; d'7' b'111' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .3 ; d'3' b'11' a'¶'retlw .9 ; d'9' b'1001' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .3 ; d'3' b'11' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .7 ; d'7' b'111' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .7 ; d'7' b'111' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .3 ; d'3' b'11' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .4 ; d'4' b'100' a'¶'retlw .4 ; d'4' b'100' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .9 ; d'9' b'1001' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .4 ; d'4' b'100' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .4 ; d'4' b'100' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .2 ; d'2' b'10' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .4 ; d'4' b'100' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .7 ; d'7' b'111' a'¶'retlw .6 ; d'6' b'110' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .1 ; d'1' b'1' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .5 ; d'5' b'101' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .8 ; d'8' b'1000' a'¶'retlw .0 ; d'0' b'0' a'¶'retlw .2retlw .2retlw .0retlw .0retlw .8retlw .0retlw .3retlw .4retlw .0retlw .0retlw .8retlw .0retlw .4retlw .6retlw .0retlw .0retlw .8retlw .0retlw .5 end Editat Mai 13, 2015 de nel65 Link spre comentariu
nel65 Postat Mai 13, 2015 Autor Partajează Postat Mai 13, 2015 ok,multumesc ,maine sau poimaine ,cand vine coletul cu PIC ,il probez . Numai bine Link spre comentariu
nel65 Postat Mai 15, 2015 Autor Partajează Postat Mai 15, 2015 (editat) gata ,am scris hexul in pic,nu vrea nimic,in sensul ca nici nu oscileaza,m-asteptam sa gasesc oscilatii pe pinul 10 al picului,pauza totala.Intre timp, am gasit si pe net compilarea asmului si e identica cu asta a lui @mdorian .Posibil sa nu fie scris corect asmul sau mai degraba sa nu stiu eu sa programez acest pic? Am folosit pickit2 cu Vdd bifata ,aceasta fiind de 5V,am incercat si cu MCLR bifata ,tot degeaba.Hexul se incarca bine in soft ,nu da eroarea aia cu galben ca n-ar fi biti de configurare ,la verificare da ok,picul este nou. Am programat si cu open prog ,la asta zice ca n-a gasit regulatorul de 3V ,bifez sa nu mai ceara si se programeaza cu zero erori.Tot nu merge. Nu se pune problema de programatoare ,le folosesc mereu. Daca mai sunt pareri ,poftiti va rog. Daca e nevoie ,pun si lincul proiectului ,pun si schema,nu e secreta. Editat Mai 15, 2015 de nel65 Link spre comentariu
cristi7521 Postat Mai 16, 2015 Partajează Postat Mai 16, 2015 Oscilatorul ar trebui sa porneasca pentru ca depinde numai de hardware si probabil de bitii de configurare. Am gasit pe edaboard ceva despre acest UPS, daca o fi acelasi, Program configuration word 0x3ffb si hexul de mai jos. Verificati cuartul ,condensatorii de 33pF, pinii 1, 9,10 la scurturi. sine_power_002.zip Link spre comentariu
nel65 Postat Mai 19, 2015 Autor Partajează Postat Mai 19, 2015 (editat) ala este,am reusit sa-l fac sa scoata semnalele specifice la iesiri.Ce nu-mi convine la el ,este frecventa prea mica,de 6.xx khz.As vrea sa fie peste 16 khz.Am citi pe edaboard ca asta se face din LEVEL_86 ,respectiv se modifica sublw .200 intr-o valoare mai mare ,de exemplu sublw .600 si verificat.Cuartul ramane tot de 20 MHz Asa ca pun din nou asm-ul cu valoarea asta modificata ,daca stiti sa compilati ,va rog... Editat Mai 19, 2015 de nel65 Link spre comentariu
cristi7521 Postat Mai 20, 2015 Partajează Postat Mai 20, 2015 (editat) Valoarea maxima pe care o poate avea constanta este 255 (un byte). Vedeti aici http://www. pcbheaven.com/picpages/Mathematic_Instructions/ exemplul cu SUBLW k (am pus pauza la link dearece nu stiu de ce nu merge pus direct) Editat Mai 20, 2015 de cristi7521 Link spre comentariu
nel65 Postat Mai 20, 2015 Autor Partajează Postat Mai 20, 2015 (editat) OK,deci valori posibile poate avea doar intre 0 si 255.Cu valoarea 200 ,frecventa pwm este prea mica ,6khz si ceva .Nu stiu cu cat trebuie schimbata valoarea sublw,dar banuiesc ca trebuie marita.Scopul este sa obtin o frecventa de functionare intre 16-25 khz. Incercati ,va rog ,fisierul acesta in care am modificat sublw la 255,si sa vedem ce se intampla cu frecventa . Editat Mai 20, 2015 de nel65 Link spre comentariu
cristi7521 Postat Mai 20, 2015 Partajează Postat Mai 20, 2015 Poate va ajuta MPLAB se descarca de aici http://www.microchip.com/pagehandler/en-us/devtools/dev-tools-parts.html cred ca merge MPLAB 8.40 care e prezentat si in videoclip. Link spre comentariu
nel65 Postat Mai 20, 2015 Autor Partajează Postat Mai 20, 2015 Multumesc ,si asta e tot ajutor,am reusit sa compilez conform tutorialului cu MPLAB 8.40 Link spre comentariu
mdorian Postat Mai 20, 2015 Partajează Postat Mai 20, 2015 Imi pare rau , nu cred ca pot sa te ajut , codul e destul de complicat si nu e comentat de loc. Imi vine greu sa urmaresc ce face ca sa iti spun cum trebuie sa-l modifici si nici nu am gasit discutia pe celalalt forum despre acest cod. E greu sa schimbi pur si simplu prin incercari. Link spre comentariu
nel65 Postat Mai 20, 2015 Autor Partajează Postat Mai 20, 2015 deja , m-am lasat pagubas ca sa-l modific,dar cel putin acum stiu sa compilez cu MPLAB,ca de facut programe ...ioc.Asta e... adresele cu discutii http://www.edaboard.com/thread221241.html http://www.edaboard.com/thread150224-6.html Link spre comentariu
yo7but Postat Iunie 23, 2015 Partajează Postat Iunie 23, 2015 Salut, Am si eu un fisier ASM de transformat in HEX, va rog, poate ma ajuta cineva. Multumesc /************************************************************************** * Morse Code Generator * Copyright © 2012 Vanderhaegen Bart * * This PIC firmware can read a PS/2 keyboard. The typed text will appear * on an LCD screen. After the user presses enter, the typed text will be * played in morse code. * * The sound output is 1 kHz. This frequency is achieved by the PWM output * of the PIC MCP (16F628A). * **************************************************************************/ // include for the high-tech C environment #include <htc.h>; // Define the crystal speed #define _XTAL_FREQ 20000000 // Define the hardware I/O ports #define CLOCK RB0 #define DATA RB1 #define RS RB2 // RS word. 0=Instr, 1=Data #define CE RA1 // CE word. 0=disabled, 1=enabled #define LED_TEST RB3 #define LED RA0 // Additional definitions #define BUFFER_SIZE 11 #define true 1 #define false 0 #define MODE_DATA 1 #define MODE_CMD 0 // Define the morse code timings #define DOT 50 // time in milliseconds #define DASH 3*DOT #define PAUSE 5*DOT // Define the LCD properties #define LCD_DISP 0b00001000 #define LCD_DISPLAY_ON 0b00000100 #define LCD_DISPLAY_OFF 0b00000000 #define LCD_CURSOR_ON 0b00000010 #define LCD_CURSOR_OFF 0b00000000 #define LCD_BLINK_ON 0b00000001 #define LCD_BLINK_OFF 0b00000000 #define LCD_CLEAR 0b00000001 #define LCD_FUNCTIONSET 0b00100000 #define LCD_8BIT 0b00010000 #define LCD_4BIT 0b00000000 #define LCD_1LINE 0b00000000 #define LCD_2LINE 0b00001000 #define LCD_FONT_S 0b00000000 #define LCD_FONT_L 0b00000100 #define LCD_SETADDR 0b10000000 #define LCD_SHIFTMODE 0b00010000 #define LCD_SHIFTLEFT 0b00001000 #define LCD_SHIFTRIGHT 0b00000100 // Scancode unsigned int scanCode=0; unsigned char scanCodeCnt=0; unsigned char scanCodeBuf[6]; // morse code LCD buffer char morseBuffer[16]=""; char *morsePntr=morseBuffer; // define bits bit playStopRequested=false; bit isPlaying=false; // function prototypes void interrupt irq(); void writeFourbits(char data); void writeData(char data); void writeString(char *pMsg); void writeCommand(char data); void LCDbusy(); void LCDinitialize(); void main(); void writeFourbits(char data); void writeData(char data); void writeStringConstant(const char *pMsg); void writeCommand(char data); void LCDbusy(); void LCDinitialize(); void runPWM(); void clearPWM(); void showInputScreen(); char keycodeToAscii(char codeToFind); char AsciiToMorse(char charToFind); char bitCounter=0; /************************************************************************** * CODE TABLES * * Some explanation: I have used three different code tables which defines * all possible characters that can be entered. All tables should have the * same size. The data at each index of the table corresponds: keyboard * scancode 0x15 corresponds with 'A' or the morse data 0x42. *************************************************************************/ // ASCII character set const char ascii[]="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789;=.,?-: "; // KeyCode set /* // Querty keycode set: uncomment to activate this code const char keyCode[]={0x1C,0x32,0x21,0x23,0x24,0x2B,0x34,0x33,0x43,0x3B,0x42, 0x4B,0x3A,0x31,0x44,0x4D,0x15,0x2D,0x1B,0x2C,0x3C,0x2A, 0x1D,0x22,0x35,0x1A,0x45,0x16,0x1E,0x26,0x25,0x2E,0x36, 0x3D,0x3E,0x46,0x4C,0x55,0x49,0x41,0x05,0x7B,0x05,0x29,0x00}; */ // AZERTY keycode set. Comment to deactivate this code. const char keyCode[]={0x15,0x32,0x21,0x23,0x24,0x2B,0x34,0x33,0x43,0x3B,0x42, 0x4B,0x4C,0x31,0x44,0x4D,0x1C,0x2D,0x1B,0x2C,0x3C,0x2A, 0x1A,0x22,0x35,0x1D,0x45,0x16,0x1E,0x26,0x25,0x2E,0x36, 0x3D,0x3E,0x46,0x3A,0x55,0x49,0x41,0x05,0x7B,0x05,0x29,0x00}; // Morse Code Set const char morse[] = { 0x42,0x81,0x85,0x61,0x20,0x84,0x63,0x80,0x40,0x8E,0x65, 0x82,0x43,0x41,0x67,0x86,0x8B,0x62,0x60,0x21,0x64,0x88, 0x66,0x89,0x8D,0x83,0xBF,0xBE,0xBC,0xB8,0xB0,0xA0,0xA1, 0xA3,0xA7,0xDF,0xB5,0xB1,0xEA,0xF3,0xCC,0xE1,0xC7,0x01,0x00 }; /************************************************************************** * LCD Routines * * These routines are used to control the LCD module. You could use any * LCD module that uses the standard chipset. Some tuning of the * initialisation might be required, though. **************************************************************************/ // Create short LCD clock pulse void LCD_pulse() { CE=1; __delay_us(1); CE=0; } // Initialize the LCD module void LCDinitialize() { __delay_ms(20); // initial delay // Activate Command Mode RS=MODE_CMD; // Function set writeFourbits(LCD_FUNCTIONSET | LCD_8BIT); __delay_ms(5); writeFourbits(LCD_FUNCTIONSET | LCD_8BIT); __delay_us(100); writeFourbits(LCD_FUNCTIONSET | LCD_8BIT); __delay_us(100); // Start configuration writeCommand(LCD_FUNCTIONSET); writeCommand(LCD_FUNCTIONSET | LCD_4BIT | LCD_2LINE | LCD_FONT_S); __delay_us(100); writeCommand(LCD_DISP | LCD_DISPLAY_ON | LCD_CURSOR_ON | LCD_BLINK_ON); __delay_us(100); writeCommand(LCD_CLEAR); __delay_us(100); writeCommand(0x06); __delay_us(100); } // wait a few milliseconds so the LCD can process the command void LCDbusy() { __delay_ms(5); } // writeFourBits writes a sequence of 4 bits to the LCD void writeFourbits(char data) { PORTB=(PORTB&0x0F)|data; LCD_pulse(); } // writeData adds a character to the LCD void writeLCD(char data) { RS=MODE_DATA; writeFourbits(data&0xF0); writeFourbits((data&0x0F)<<4); LCDbusy(); } // writeData adds a character to the LCD void writeData(char data) { RS=MODE_DATA; writeFourbits(data&0xF0); writeFourbits((data&0x0F)<<4); LCDbusy(); } // writeCommand writes a command to the LCD void writeCommand(char data) { RS=MODE_CMD; writeFourbits(data&0xF0); writeFourbits((data&0x0F)<<4); LCDbusy(); } // writeFastCommand writes a command to the LCD // No delay is executed afterwards // !!! do not execute these commands too fast void writeFastCommand(char data) { RS=MODE_CMD; writeFourbits(data&0xF0); writeFourbits((data&0x0F)<<4); } // writeStringConstant writes a constant string to the LCD void writeStringConstant(const char *pMsg) { while(*pMsg!='0') writeData(*pMsg++); } // writeLetter writes a single eltter to the LCD void writeLetter(char *pMsg) { writeData(*pMsg); } /************************************************************************** * Program Handlers * * Here you can find the helper functions that are needed to run the * program. **************************************************************************/ // updateBuffer() will refresh the screen information void updateBuffer() { // clear buffer writeCommand(LCD_CLEAR); char *pMsg=morseBuffer; while(*pMsg!='0') writeData(*pMsg++); writeCommand(LCD_SETADDR | 0x40); const char lcd[]="Enter or ESC"; writeStringConstant(&lcd); writeCommand(LCD_SETADDR | (morsePntr-morseBuffer)); } // selftest executes the selftest void selfTest() { // initial texts const char line1[]="Starting Bart's"; const char line2[]="Morse Coder!"; // write them to the LCD writeCommand(LCD_SETADDR | 0x00); writeStringConstant(&line1); writeCommand(LCD_SETADDR | 0x40); writeStringConstant(&line2); // perform speaker runPWM(); LED=1; __delay_ms(1000); clearPWM(); LED=0; } // showPlayingMessage() shows a code is currently playing void showPlayingMessage() { writeCommand(LCD_SETADDR | 0x40); const char lcd[]="Playing code..."; writeStringConstant(&lcd); } // showInputScreen() shows the input screen void showInputScreen() { writeCommand(LCD_CLEAR); writeCommand(LCD_SETADDR | 0x40); const char lcd[]="Enter or ESC"; writeStringConstant(&lcd); writeCommand(LCD_SETADDR | 0x00); } // This function will convert a code from one unit to another unsigned char convertCode(char codeToFind,const char *source, const char *destination) { while(*source!=codeToFind && *source++>0x00) destination++; return *destination; } /************************************************************************** * Morse code player routines * * These routines are used to control the LCD module. You could use any * LCD module that uses the standard chipset. Some tuning of the * initialisation might be required, though. **************************************************************************/ // Play a dash void playDash() { runPWM(); LED=1; __delay_ms(DASH); LED=0; clearPWM(); } // Play a DOT void playDot() { runPWM(); LED=1; __delay_ms(DOT); LED=0; clearPWM(); } // Play a complete morse sequence void playMorse(char *buffer) { // set playing bits isPlaying=true; playStopRequested=false; // set LCD to the first position char position=0x00; while (*buffer>0x00 && !playStopRequested) { // set current LCD position writeFastCommand(LCD_SETADDR | position); char morseChar=convertCode(*buffer,ascii,morse); if (*buffer==' ') { __delay_ms(PAUSE); } else { // determine code size char size; if ((morseChar & 0xC0) == 0xC0) size=(morseChar & 0xC0) >> 5; else size=(morseChar & 0xE0) >> 5; // play code for (char i=0;i<size;i++) { if ((morseChar & 0x01) == 0x01) playDash(); else playDot(); morseChar>>=1; // wait the time of one dot until the following sign __delay_ms(DOT); } __delay_ms(DOT); __delay_ms(DOT); } position++; buffer++; } // clear the isPlaying flag isPlaying=false; } /************************************************************************** * Keyboard Processing Handler * * The sub processCode() is called as soon as a new databyte is received * by the keyboard. This routine might be called multiple times to form * a single character. **************************************************************************/ // this code will analyze the received data void processCode() { if ((*scanCodeBuf | 0x10) == 0xF0) { // release code or special character received: do nothing! __delay_ms(20); scanCodeCnt=0; } else { // normal character received char decoded = convertCode(*scanCodeBuf,keyCode,ascii); if (decoded!='0') { // allowed morse code character received if ((morsePntr-morseBuffer)>(sizeof(morseBuffer)-1)) { // buffer full writeCommand(LCD_SETADDR | 0x40); const char lcd[]="Buffer full!"; writeStringConstant(lcd); } else { *morsePntr=decoded; morsePntr++; *morsePntr='0'; writeLetter(&decoded); } } else { // other character received switch (*scanCodeBuf) { case 0x66: // backspace if (morsePntr>morseBuffer) { // clear current and previous character *morsePntr='0'; morsePntr--; *morsePntr='0'; } updateBuffer(); break; case 0x5A: // enter // ENTER showPlayingMessage(); __delay_ms(100); playMorse(morseBuffer); morsePntr=morseBuffer; *morsePntr='0'; showInputScreen(); break; case 0x76: // ESCAPE morsePntr=morseBuffer; *morsePntr='0'; updateBuffer(); break; } // end switch } // end if (decoded>0x00) __delay_ms(20); scanCodeCnt=0; } } /************************************************************************** * PWM Audio Controller * * These functions will start or stop the PIC's PWM output. **************************************************************************/ // setup PWM output : 1 kHz / 50 % duty cycle void runPWM() { CCP1CON=0b00111100; T2CON=0b00000111; CCPR1L=0x7C; PR2=0xFF; CCPR1L=0b01111111; TMR2ON=1; // doesn't need to be stopped afterwards } void clearPWM() { CCP1CON=0x00; CCPR1L=0x00; } /************************************************************************** * Interrupt Handler * * This interrupt handler will process the received data as soon as it * arrives. **************************************************************************/ void interrupt irq() { // check the interrupt source if (INTF==1) { if (isPlaying) { playStopRequested=true; } if (bitCounter<10) { // No 10 bits received yet: add to the scancode scanCode >>= 1; scanCode += (DATA*0b10000000000); bitCounter++; } else if(bitCounter==10){ // 10 bits received: process the code scanCodeBuf[scanCodeCnt] = (char)(scanCode >> 2); if (scanCodeCnt<sizeof(scanCodeBuf)) scanCodeCnt++; scanCode=0; bitCounter=0; } INTF=0; } } /************************************************************************** * Program's Main Sub * * Here the PIC program will begin working. **************************************************************************/ void main(void) { // setup IO configuration TRISB=0x03; TRISA=0x00; // setup IO values PORTB=0x00; PORTA=0x00; // set interrupt options INTEDG=0; // falling edge INTE=1; // enable interrupt INTF=0; // clear interrupt flag ei(); // enable interrupts // setup PWM output clearPWM(); // setup LCD module __delay_ms(100); LCDinitialize(); // selftest selfTest(); // Show the user input screen showInputScreen(); // clear the isPlaying bit isPlaying=0; // Execute the actual scanning process. This process will run // forever. This code actually belongs in an interrupt handler // but I didn't get that right yet. bitCounter=0; scanCode==0; scanCodeCnt=0; while(true) { if (scanCodeCnt>0) processCode(); } } Link spre comentariu
mars01 Postat Iunie 25, 2015 Partajează Postat Iunie 25, 2015 (editat) Salut, Cred ca ai inteles deja de ce nimeni nu a postat un raspuns. Daca nu ... ei bine, codul postat de tine este in limbaj C iar tu ceri compilarea unui cod ASM. L-am compilat eu pt tine. Este compilat in XC8, ocupa 55 bytes RAM (25%), 913 words FLASH (45%) si are ca target, PIC16F628A. Este configurat sa foloseasca oscilatorul intern, cu IO pe pinii de oscilator, pinul MCLR este setat ca GPIO. Succes! Morse_generator.zip Editat Iunie 25, 2015 de mars01 Link spre comentariu
Liviu M Postat Iunie 25, 2015 Partajează Postat Iunie 25, 2015 Este configurat sa foloseasca oscilatorul intern, Din cate stiu eu, asta e de 4MHz.In program are frecventa definita la 20MHz, asa ca o sa aibe toate temporizarile "defecte". // Define the crystal speed#define _XTAL_FREQ 20000000 Link spre comentariu
Postări Recomandate
Creează un cont sau autentifică-te pentru a adăuga comentariu
Trebuie să fi un membru pentru a putea lăsa un comentariu.
Creează un cont
Înregistrează-te pentru un nou cont în comunitatea nostră. Este simplu!
Înregistrează un nou contAutentificare
Ai deja un cont? Autentifică-te aici.
Autentifică-te acum