亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? fc430_es417_cce.asm

?? lcdcdode cor customized
?? ASM
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
;*************************** MATH UTILITY FUNCTIONS ***************************

;------------------------------------------------------------------------------
;	 Unsigned multiply routine  IROP1 x IROP2L -> IRACH/IRACL
;	 variables used IROP1, IROP2L, IROP2H, IRACL, IRACH, IRBT
;------------------------------------------------------------------------------
UMPY_16x16: clr.w   IRACCL                  ; 0 -> LSBs of result
            clr.w   IRACCH                  ; 0 -> MSBs of resut
            clr.w   IROP2H                  ; MSBs multiplier
            mov.w   #0x01,IRBIT             ; Bit test register
MPY1:       bit.w   IRBIT,IROP1             ; Test actual bit
            jz      MPY2                    ; If 0 do nothing
            add.w   IROP2L,IRACCL           ; If 1 add multiplier to result
            addc.w  IROP2H,IRACCH           ; Add carry to destination
MPY2:       rla.w   IROP2L                  ; Multiplier x 2
            rlc.w   IROP2H                  ; Rotate P2H left through carry bit
            rla.w   IRBIT                   ; Get the next bit to test
            jnc     MPY1                    ; Finished if bit in carry
            mov.w   TEMP,IROP1              ; Move result into P1 variable
            mov.w   IRACCL,IROP2L           ; Move low word into P2L var		
            mov.w   IRACCH,IROP2H           ; Move high word into P2H var
UMPY_DONE:  ret                             ; Return from subroutine

;------------------------------------------------------------------------------
;        Unsigned division subroutine 32-bit BY 16-bit
;        IROP2M|IROP2L : IROP1 -> IRACL	  remainder in IROP2H
;        return: carry = 0 = OK	  carry = 1 = quotient > 16 bits
;        variables used IROP1, IROP2L, IRACL, IRBT, IROP2H
;------------------------------------------------------------------------------
UDIV_32_16: clr.w   IRACCL                  ; Clear accumulator low
            mov.w   #17,IRBIT               ; Initalize loop counter
DIV1:       cmp.w   IROP1,IROP2H            ; Compare P1 to P2H
            jlo     DIV2                    ; Jump if less than
            sub.w   IROP1,IROP2H            ; Subtract P1 from P2H
DIV2:       rlc.w   IRACCL                  ; Rotate left through carry bit
            jc      UDIV_DONE               ; Error: result > 16 bits
            dec.w   IRBIT                   ; Decrement loop counter
            jz      UDIV_DONE               ; Is 0: terminate w/o error
            rla.w   IROP2L                  ; Rotate P2L left arithmetically
            rlc.w   IROP2H                  ; Rotate P2H left thru carry bit
            jnc     DIV1                    ; Jump if carry bit not set
            sub.w   IROP1,IROP2H            ; Subtract P1 from P2H
            setc                            ; Set the carry bit
            jmp     DIV2                    ; Repeat the current loop
UDIV_DONE:  ret                             ; Return from subroutine

;*********************** SLOPE A/D CONVERSION FUNCTIONS ***********************

;--------Capacitor is charged up with reference resistor-----------------------
                                            ; SMCLK, clear, continuous
chargeCap:  mov.w   #(TASSEL1+TACLR+MC1), &TACTL
            bic.b   #REF, &CAPD             ; Must be enabled for output func
            bis.b   #REF, &P1OUT            ; Ref Set
            mov.w   #PERIOD5MSEC, &CCR1     ; CCR1 ~ TAR+5ms (5tu)
            mov.w   #CCIE, &CCTL1           ; Compare mode,interrupt
            bis.w   #LPM0, SR               ; Wait for CCR1 interrupt
            bis.b   #REF, &CAPD             ; Input buffer disabled 4 tri-state
            bic.b   #REF, &P1OUT            ; Ref = reset
;--------Measure discharge time -----------------------------------------------
dischargeCap:                               ; -Comp = 0.25*Vcc, comp on
            mov.b   #(CARSEL+CAREF0+CAON), &CACTL1
                                            ; Neg, CCIB,cap,interrupt
            mov.w   #(CM1+CCIS0+CAP+CCIE), &CCTL1
            push    &TAR                    ; Save TAR at start of conversion
            bic.b   R14, &CAPD              ; Must be enabled for output func
            bis.w   #LPM0, SR               ; Wait for CCR1 interrupt				
            mov.w   &CCR1, R14              ; R14 = TAR (CCR1) at EOC
            sub.w   @SP+, R14               ; R14 = discharge time
            bis.b   #(REF+THERM), &CAPD     ; Input buffer disabled 4 tri-state
            clr.b   &CACTL1                 ; Disable comparator
            clr.w   &CCTL1                  ; Disable CCTL1
            clr.w   &TACTL                  ; Disable Timer_A
            ret                             ; Return from subroutine

;--------Complete an entire sequence to sample temperature --------------------
sampleTemp: mov.w   #REF, R14               ; R14 = Ref pin
            call    #chargeCap              ; Charge cap. & measure reference
            mov.w   R14, TEMP               ; Save Ref discharge time
            mov.w   #THERM, R14             ; R14 = Sensor pin
            call    #chargeCap              ; Charge cap. and measure sensor
            mov.w   R14, RESULT             ; Save Sensor discharge time

;------------------------------------------------------------------------------
;	 Calculate temperature based on the thermistor's variable resistance
;------------------------------------------------------------------------------
            mov.w   RESULT, IROP1           ; Get the result and load into RAM
            mov.w   #10000, IROP2L          ; Initialize the multiplier factor
            call    #UMPY_16x16             ; Call the unsigned multiply func
            call    #UDIV_32_16             ; Call the unsigned divide function
;------------------------------------------------------------------------------
;        Convert sensor resistance value to degrees F for display
;        Table search is done directly with BCD subtraction
;        Variable 'IRACCL' contains the sensor resistance value
;------------------------------------------------------------------------------
            clr.w   R13                     ; Clear resistance table pointer
            mov.w   #99h, R14               ; R14 used as temperature counter
readTable:  cmp.w   RES_TAB(R13), IRACCL    ; Compare table value to sensor
            jl      storeTemp               ; Jump if sensor < table
            incd.w  R13                     ; Double increment (word) pointer
            dadd.b  #99h, R14               ; Subtract 1 from counter
            mov.w   R14, R12                ; Save in dedicated register in
            jmp     readTable               ; Mode is changed temp is not lost
storeTemp:  sub.w   #TEMP_CALFACTOR, R12    ; Adjust temp with cal. factor
            mov.w   R12, &tempDegF          ; Store temperature into RAM
            ret                             ; Return from subroutine

;------------------------------------------------------------------------------

checkTemp:  cmp.w   #PWM_L0, &tempDegF      ; Check temp vs. first boundary
            jl      cTempDone               ; Out of range; goto done
            cmp.w   #PWM_L1toL2, &tempDegF  ; Check temp vs. second boundary
            jge     cTemp1                  ; Go to next check
            mov.b   #0x1, R14               ; Set level = 1 in RAM
            jmp     cTemp2                  ; Now go adjust PWM duty cycle
cTemp1:     cmp.w   #PWM_L2toL3, &tempDegF  ; Check temp vs. third boundary
            jge     cTemp3                  ; Go to next check
            mov.b   #0x2, R14               ; Set level = 2 in RAM
            jmp     cTemp2                  ; Now go adjust PWM duty cycle
cTemp3:     cmp.w   #PWM_L3toL4, &tempDegF  ; Check temp vs. fourth boundary
            jge     cTemp4                  ; Go to next check
            mov.b   #0x3, R14               ; Set level = 3 in RAM
            jmp     cTemp2                  ; Now go adjust PWM duty cycle
cTemp4:     cmp.w   #PWM_L4toL5, &tempDegF  ; Check temp vs. fifth boundary
            jl      cTemp5                  ; Now go adjust PWM duty cycle
            mov.b   #0x5, R15               ; Set level = 5 in RAM
            jmp     cTemp6                  ; Now go adjust PWM duty cycle
cTemp5:     mov.b   #0x4, R15               ; Set level = 4 in RAM
cTemp6:     mov.b   R15, R14                ; Retrieve the level setting
cTemp2:     mov.b   R14, &level             ; Store level into RAM
            mov.w   #OUTMOD_3, &TA1CCTL1    ; Generate PWM via output mode 3
            mov.b   R14, R15                ; Figure out current level
            sub.b   #0x1, R15               ; Level 1 ?
            jeq     cTemp7                  ; We're currently in Level 1
            sub.b   #0x1, R15               ; Level 2 ?
            jeq     cTemp8                  ; We're currently in Level 2
            sub.b   #0x1, R15               ; Level 3 ?
            jeq     cTemp9                  ; We're currently in Level 3
            sub.b   #0x1, R15               ; Level 4 ?
            jeq     cTemp10                 ; We're currently in Level 4
            sub.b   #0x1, R15               ; Level 5 ?
            jeq     cTemp11                 ; We're currently in Level 5
            jmp     cTemp12                 ; Invalid level setting
cTemp7:     mov.w   #DUTYCYCLE_030, &TA1CCR1; Set  30% fan duty cycle
            jmp     cTemp12                 ; Go to done
cTemp8:     mov.w   #DUTYCYCLE_045, &TA1CCR1; Set  45% fan duty cycle
            jmp     cTemp12                 ; Go to done
cTemp9:     mov.w   #DUTYCYCLE_060, &TA1CCR1; Set  60% fan duty cycle
            jmp     cTemp12                 ; Go to done
cTemp10:    mov.w   #DUTYCYCLE_080, &TA1CCR1; Set  80% fan duty cycle
            jmp     cTemp12                 ; Go to done
cTemp11:    mov.w   #DUTYCYCLE_100, &TA1CCR1; Set 100% fan duty cycle
cTemp12:    mov.b   &level, R12             ; Store the level in RAM
cTempDone:  ret                             ; Return from subroutine

;------------------------------------------------------------------------------

checkTach:  mov.w   &tachRPM, R15           ; Retrieve tachometer reading
            cmp.w   #0x00, R15              ; Check fan RPM
            jne     setLED                  ; RPM not zero, no alarm condition
            mov.b   #0x00, R12              ; Reset temp register to 0
            call    #setStatLED             ; Raise alarm condition
            jmp     refresh                 ; Update tach reading on display
setLED:     mov.b   #0x01, R12              ; Set temp register to 1
            call    #setStatLED             ; Call func to set the STATUS LED
refresh:    call    #updateTach             ; Refresh tachometer readings
            mov.w   &tachRPM, R12           ; Move current RPM value into temp
            call    #dispTach               ; Call the func to disp RPM on LCD
            cmp.w   &tachRPM, &lastRPM      ; Is (tachRPM > lastRPM) ?
            jc      dwnArrow                ; No, RPM has decreased
upArrow:    call    #dispUpArrow            ; Yes, RPM has increased
            jmp     saveRPM                 ; Save current RPM for next time
dwnArrow:   call    #dispDownArrow          ; Enable down arrow - show decrease
saveRPM:    mov.w   &tachRPM, &lastRPM      ; Save current RPM for next history
            ret                             ; Return from subroutine

;*************************** LCD DISPLAY FUNCTIONS ****************************

clearLCD:   mov.w   #0x00, R15              ; Execute this loop 17 times
cLCD0:      cmp.w   #0x11, R15              ; Compare loop count to loop countr
            jge     cLCDdone                ; Jump if greater than or equal to
            mov.w   &LCD, R14               ; LCD[i] = 0
            add.w   R15, R14                ; Add R15 to R14
            mov.b   #0x00, 0(R14)           ; Set memory location to 0
            add.w   #0x01, R15              ; Increment loop counter
            jmp     cLCD0                   ; Repeat this loop
cLCDdone:   ret                             ; Return from subroutine

;------------------------------------------------------------------------------

toggleAnt:  xor.b   #0x10, &LCDM10          ; Physically toggle segment pin
            ret                             ; Return from subroutine

;------------------------------------------------------------------------------

dispValue:  mov.w   R12, R10                ; Set up parameter #1
            mov.w   R14, R11                ; Set up parameter #2
            mov.w   #0x00, R9               ; Sign = 0
            cmp.w   #0x00, R10              ; Is (value < 0) ?
            jge     dV0                     ; Jump if greater than or equal to
            xor.w   #0xFFFF, R10            ; Value = ~value + 1;
            add.w   #0x01, R10              ; Add 1 to parameter #1
            mov.w   #0x01, R9               ; Sign = 1
dV0:        mov.w   #0x06, R15              ; i = (6 - start)
            sub.w   R11, R15                ; Perform the subtraction
            mov.w   R15, R8                 ; Move result to new temp register
dV1:        cmp.w   #0x0A, R10              ; While (value > 9)
            jl      dV2                     ; Jump if less than
            mov.w   #0, IROP2H              ; Divide by 10 to get the remainder
            mov.w   R10, IROP2L             ; Load the quotient
            mov.w   #0x0A, IROP1            ; Load the Divisor
            call    #UDIV_32_16             ; LCD[i] = LCD_Table[value%10]

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产综合色产在线精品| 亚洲视频免费观看| 久久99精品久久久| 精品国产制服丝袜高跟| 国产iv一区二区三区| 久久精品在线观看| av激情成人网| 亚洲自拍偷拍图区| 69av一区二区三区| 国产又黄又大久久| 国产精品美女久久久久av爽李琼 | 精品电影一区二区| 成人中文字幕合集| 蜜桃av一区二区在线观看| 欧美精品一区二区三区高清aⅴ | 日韩一区二区视频| 国产成人精品一区二区三区网站观看| 国产精品福利一区二区三区| 欧美性色综合网| 久久爱www久久做| 亚洲国产成人午夜在线一区| 色猫猫国产区一区二在线视频| 亚洲福利电影网| 亚洲精品一区二区三区蜜桃下载 | 95精品视频在线| 亚洲不卡av一区二区三区| 欧美成人aa大片| 91在线看国产| 美女脱光内衣内裤视频久久网站| 久久久噜噜噜久久人人看 | 国产精品免费观看视频| 精品视频一区二区不卡| 国产成人自拍在线| 亚洲成a人片在线不卡一二三区| 欧美一区二区三区免费大片 | 天堂影院一区二区| 天堂蜜桃91精品| 中文在线一区二区| 88在线观看91蜜桃国自产| 波多野结衣亚洲| 麻豆国产91在线播放| 尤物视频一区二区| 国产丝袜在线精品| 欧美一二区视频| 在线区一区二视频| 成人一道本在线| 久久激情综合网| 天天操天天干天天综合网| 综合自拍亚洲综合图不卡区| 精品捆绑美女sm三区| 欧美色网站导航| 波多野结衣中文一区| 国产自产v一区二区三区c| 午夜精品久久久久影视| 亚洲男人天堂一区| 国产精品嫩草久久久久| ww久久中文字幕| 日韩精品中午字幕| 欧美放荡的少妇| 欧美午夜一区二区| 色综合一个色综合亚洲| 99久久99久久精品免费观看| 国产激情精品久久久第一区二区| 蜜臀99久久精品久久久久久软件| 亚洲超碰97人人做人人爱| 亚洲欧美日韩中文字幕一区二区三区| 国产精品你懂的在线| 久久久91精品国产一区二区精品| 亚洲男同性视频| 一区二区三区**美女毛片| 亚洲品质自拍视频网站| 亚洲欧洲制服丝袜| 一区二区三区在线观看欧美| 国产精品对白交换视频| 国产精品久久久久三级| 中文字幕av免费专区久久| 欧美激情一区二区三区四区| 国产色综合久久| 中文字幕va一区二区三区| 国产精品久久久久桃色tv| 亚洲三级电影全部在线观看高清| 亚洲人成网站影音先锋播放| 亚洲欧美日韩国产综合| 亚洲精品菠萝久久久久久久| 亚洲国产精品久久人人爱| 亚洲午夜一区二区| 日韩电影在线观看网站| 久久疯狂做爰流白浆xx| 国产大片一区二区| 91免费看`日韩一区二区| 在线观看日韩精品| 3d成人h动漫网站入口| 欧美www视频| 中文字幕欧美三区| 亚洲在线中文字幕| 美国毛片一区二区| 粉嫩13p一区二区三区| 99精品欧美一区二区三区小说 | 奇米一区二区三区| 精品系列免费在线观看| 国产成人一区在线| 91小视频在线免费看| 欧美日韩精品专区| 精品国产1区二区| 亚洲欧洲日韩女同| 天天操天天干天天综合网| 韩国精品主播一区二区在线观看| 国产精品羞羞答答xxdd| 在线精品视频一区二区| 日韩欧美一区二区不卡| 国产精品成人免费精品自在线观看| 亚洲视频一区在线| 老鸭窝一区二区久久精品| 国v精品久久久网| 欧美精品在线观看播放| 国产视频一区二区在线观看| 亚洲福中文字幕伊人影院| 国产一区二区不卡在线| 欧美三级在线视频| 国产性色一区二区| 日韩精品高清不卡| 99久精品国产| 精品国产成人在线影院| 亚洲黄色尤物视频| 国产精品中文字幕日韩精品| 欧美日韩一二区| 国产精品高潮呻吟久久| 毛片av一区二区三区| 色视频欧美一区二区三区| 欧美精品一区二区三区在线 | 日韩片之四级片| 亚洲啪啪综合av一区二区三区| 激情综合色综合久久| 欧美午夜寂寞影院| 亚洲天堂久久久久久久| 国产九九视频一区二区三区| 欧美日本乱大交xxxxx| 国产精品成人一区二区艾草| 色综合天天综合网国产成人综合天| 日韩精品专区在线影院重磅| 一区二区三区免费在线观看| 国产激情视频一区二区在线观看 | 亚洲视频资源在线| 国产麻豆精品95视频| 91精品福利在线一区二区三区 | www国产精品av| 秋霞电影网一区二区| 欧美性感一类影片在线播放| 中文字幕欧美国产| 国产乱理伦片在线观看夜一区| 欧美一区二视频| 天天综合色天天综合| 欧洲精品一区二区三区在线观看| 亚洲国产精华液网站w| 国产精品一区专区| 精品美女在线播放| 麻豆一区二区在线| 欧美不卡激情三级在线观看| 日韩av在线播放中文字幕| 欧美日韩在线播放三区四区| 亚洲一区在线观看网站| 91福利精品视频| 亚洲欧美日韩系列| 91麻豆免费看片| 亚洲精品视频在线观看免费| 91久久精品一区二区| 亚洲免费成人av| 欧洲中文字幕精品| 亚洲第一狼人社区| 欧美片网站yy| 另类中文字幕网| 欧美精品一区二区精品网| 韩国中文字幕2020精品| 精品久久久久久久久久久院品网| 激情综合网最新| 亚洲国产激情av| 91福利视频网站| 琪琪久久久久日韩精品| 精品国产制服丝袜高跟| 国产成人精品在线看| 亚洲视频电影在线| 欧美三级视频在线观看| 日韩成人dvd| 国产亚洲欧美一区在线观看| 成人一区二区三区在线观看| 亚洲品质自拍视频| 91麻豆精品国产91久久久资源速度 | 欧美日韩国产高清一区二区| 日韩精品一卡二卡三卡四卡无卡| 日韩精品一区二区三区蜜臀 | 精彩视频一区二区三区| 国产日韩影视精品| 色av一区二区| 奇米精品一区二区三区在线观看一| 精品国产免费一区二区三区香蕉| 国产高清无密码一区二区三区| 自拍偷拍亚洲综合| 欧美日韩精品欧美日韩精品一综合| 久草精品在线观看| 亚洲人午夜精品天堂一二香蕉|