中文字幕无码不卡一区二区三区_少妇被又大又粗又爽毛片久久黑人_91精品国产在热久久无毒不卡_久久久久久亚洲综合网站

技術(shù)熱線: 4007-888-234
設(shè)計開發(fā)

專注差異化嵌入式產(chǎn)品解決方案 給智能產(chǎn)品定制注入靈魂給予生命

開發(fā)工具

提供開發(fā)工具、應用測試 完善的開發(fā)代碼案例庫分享

技術(shù)支持

從全面的產(chǎn)品導入到強大技術(shù)支援服務 全程貼心伴隨服務,創(chuàng)造無限潛能!

新品推廣

提供新的芯片及解決方案,提升客戶產(chǎn)品競爭力

新聞中心

提供最新的單片機資訊,行業(yè)消息以及公司新聞動態(tài)

demo2板數(shù)碼管從0加1到999999程序

更新時間: 2019-03-23
閱讀量:1836

十年專注單片機方案開發(fā)的方案公司英銳恩,分享demo2板數(shù)碼管從0加1到999999程序。英銳恩現(xiàn)提供服務產(chǎn)品涉及主控芯片:8位單片機、16位單片機、32位單片機及各類運算放大器等。

;實驗目的:熟悉數(shù)碼管的動態(tài)顯示
;數(shù)碼管顯示數(shù)字加1從“0-999999”
;硬件要求:撥碼開關(guān)S6全置ON,S5第6位置ON,其它位和撥碼開關(guān)置OFF
 #INCLUDE            ;包含頭文件
__CONFIG _DEBUG_OFF&_CP_ALL&_WRT_HALF&_CPD_ON&_LVP_OFF&_BODEN_OFF&_PWRTE_ON&_WDT_OFF&_HS_OSC
;芯片配置字,看門狗關(guān),上電延時開,掉電檢測關(guān),低壓編程關(guān),加密,4M晶體HS振蕩
  TMRO          equ            01H
  status        equ            03h
  pcl           equ            02h
  TRISA         equ            85H
  TRISD         equ            88h
  count         equ            20h
  count1        equ            27h
  number        equ            28h
  w_temp        equ            21h
  s_temp        equ            22h
  tmro_b        equ            23h
  count2        equ            29h
  count3        equ            30h
  count4        equ            31h

count5        equ            32h
  org                          00h
nnnnn
  nop
  goto                        main
  org                         004h
tmroserv
  movwf                       w_temp
  swapf                       STATUS,W
  CLRF                        STATUS
  MOVWF                       s_temp
  incf                        count
  movlw                       .10
  xorwf                       count,w
  bz                          lp1
  goto                        lp7
lp1
  clrf                        count
  incf                        count1

 movlw                       .10
  xorwf                       count1,w
  bz                          lp2
  goto                        lp7
lp2
  clrf                        count
  clrf                        count1
  incf                        count2
  movlw                       .10
  xorwf                       count2,w
  bz                          lp3
  goto                        lp7
lp3
  clrf                        count
  clrf                        count1
  clrf                        count2
  incf                        count3
  movlw                       .10
  xorwf                       count3,w
  bz                          lp4
  goto                        lp7
lp4
  clrf                        count
  clrf                        count1
  clrf                        count2
  clrf                        count3
  incf                        count4
  movlw                       .10

  xorwf                       count4,w
  bz                          lp5
  goto                        lp7
lp5
  clrf                        count
  clrf                        count1
  clrf                        count2
  clrf                        count3
  clrf                        count4
  incf                        count5
  movlw                       .10
  xorwf                       count5,w
  bz                          lp6
  goto                        lp7
lp6
  clrf                        count

clrf                        count1
  clrf                        count2
  clrf                        count3
  clrf                        count4
  clrf                        count5  
lp7
  bcf                         STATUS,2
  movlw                       tmro_b
  movwf                       TMR0
  MOVLW                       0A0H
  MOVWF                       INTCON
  BCF                         INTCON,2
  swapf                       s_temp,w
  movwf                       STATUS
  MOVFW                       w_temp
  retfie
main
  bcf                          STATUS,5
  MOVLW                        0a0h
  MOVWF                        INTCON
  BCF                          INTCON,2
  movlw                        tmro_b
  movwf                        TMRO
  MOVLW                        0FFH

 MOVWF                        PORTA
  MOVWF                        PORTD
  bsf                          STATUS,5
  CLRF                         TRISA
  CLRF                         TRISD
  movlw                        06H
  movwf                        ADCON1
  movlw                        07H
  movwf                        OPTION_REG
  bcf                          STATUS,5
  clrf                         number
  CLRF                         count
  CLRF                         count1
  clrf                         count2
  clrf                         count3
  clrf                         count4
  clrf                         count5
LOOP
  movfw                        count
  call                         TABLE

 MOVWF                        PORTD
  BCF                          PORTA,5
  CALL                         delay
  bsf                          PORTA,5

  MOVFW                        count1
  call                         TABLE
  MOVWF                        PORTD
  BCF                          PORTA,4
  CALL                         delay
  BSF                          PORTA,4
 
  MOVFW                        count2
  call                         TABLE
  MOVWF                        PORTD
  BCF                          PORTA,3
  CALL                         delay
  BSF                          PORTA,3

  MOVFW                        count3
  call                         TABLE
  MOVWF                        PORTD
  BCF                          PORTA,2
  CALL                         delay
  BSF                          PORTA,2

MOVFW                        count4
  call                         TABLE
  MOVWF                        PORTD
  BCF                          PORTA,1
  CALL                         delay
  BSF                          PORTA,1

  MOVFW                        count5
  call                         TABLE
  MOVWF                        PORTD
  BCF                          PORTA,0
  CALL                         delay
  BSF                          PORTA,0
 
  goto                         LOOP
;-----------------------
delay                                 
  ;MOVLW                        03H                ;0.6S
  ;MOVWF                        24H

;LP0                                               ;0.2S廷時子程序
  MOVLW                        D'50'
  MOVWF                        25H
LP1
  MOVLW                        D'16'
  MOVWF                        26H
LP2
  DECFSZ                       26H,1
  GOTO                         LP2
  DECFSZ                       25H,1
  GOTO                         LP1
  ;DECFSZ                       24H,1
  ;GOTO                         LP0
  RETURN
;-----------------------

TABLE
  ADDWF                       pcl,1
  retlw                       0c0h                    ;0
  retlw                       0f9h                    ;1
  retlw                       0a4h                    ;2
  retlw                       0b0h                    ;3
  retlw                       99h                     ;4
  retlw                       92h                     ;5
  retlw                       82h                     ;6
  retlw                       0F8h                    ;7
  retlw                       80h                     ;8
  retlw                       90h                     ;9
;-----------------------
  end

 (文源網(wǎng)絡,侵刪)

乳山市| 黄浦区| 辽阳市| 神木县| 孝感市| 泌阳县| 咸阳市| 卓资县| 赣榆县| 抚顺市| 交城县| 海兴县| 浑源县| 鲁甸县| 洪江市| 平舆县| 化德县| 佛教| 达日县| 青浦区| 榆社县| 共和县| 离岛区| 东丽区| 特克斯县| 绥滨县| 商河县| 内黄县| 东乌珠穆沁旗| 万宁市| 廊坊市| 昂仁县| 榆中县| 营口市| 长子县| 田阳县| 库尔勒市| 定日县| 宁化县| 鄄城县| 丰镇市|