在线看毛片网站电影-亚洲国产欧美日韩精品一区二区三区,国产欧美乱夫不卡无乱码,国产精品欧美久久久天天影视,精品一区二区三区视频在线观看,亚洲国产精品人成乱码天天看,日韩久久久一区,91精品国产91免费

<menu id="6qfwx"><li id="6qfwx"></li></menu>
    1. <menu id="6qfwx"><dl id="6qfwx"></dl></menu>

      <label id="6qfwx"><ol id="6qfwx"></ol></label><menu id="6qfwx"></menu><object id="6qfwx"><strike id="6qfwx"><noscript id="6qfwx"></noscript></strike></object>
        1. <center id="6qfwx"><dl id="6qfwx"></dl></center>

            新聞中心

            EEPW首頁 > 嵌入式系統 > 設計應用 > NEC單片機 UPD78F9234 16位定時器使用例程(匯編)

            NEC單片機 UPD78F9234 16位定時器使用例程(匯編)

            作者: 時間:2012-11-29 來源:網絡 收藏

            16位例程()
            ;*************************************************
            ; Lable def
            ;*************************************************
            LED8_MODE EQU PM2.1
            LED7_MODE EQU PM2.0
            LED6_MODE EQU PM12.0
            LED5_MODE EQU PM0.3
            LED4_MODE EQU PM0.2
            LED3_MODE EQU PM0.1
            LED2_MODE EQU PM0.0
            LED1_MODE EQU PM12.3
            LED8 EQU P2.1
            LED7 EQU P2.0
            LED6 EQU P12.0
            LED5 EQU P0.3
            LED4 EQU P0.2
            LED3 EQU P0.1
            LED2 EQU P0.0
            LED1 EQU P12.3


            ;=========================(debugresource)======================================={
            ;*************************************************
            ; VAR DEF
            ;*************************************************

            DATA_SEGMENT1DSEGSADDR ;(AT 0FE20H)

            VAR_1: DS1

            ORG 018H
            DB 0FFH,0FFH;
            ORG 07EH
            DB 0FFH,0FFH;

            ORG 81H
            DB 0FFH;


            ORG 01ED0H
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
            ;=================================================================================



            ;*************************************************
            ;INTERRUPT VECT
            ;*************************************************

            ORG 0000H
            DW START_PROGRAM

            ORG 000EH
            DW INTTM000_VECT

            ;*************************************************
            ;CODE
            ;*************************************************
            CSEG ;(ATXXXXH)

            START_PROGRAM:

            DI
            MOVW AX,#0FE20H;
            MOVW SP,AX;

            MOV PCC,#00H;
            MOV PPCC,#00H;

            CALL!DELAY_1MS;
            CALL!DELAY_1MS;
            CALL!DELAY_1MS;
            CALL!DELAY_1MS;
            CALL!DELAY_1MS;



            MOV PMC2,#00H
            MOV PM2,#0FFH


            ; SET TM00
            MOV TMC00,#00H

            MOV PRM00,#02H ;31.25KHz 32us

            MOVW AX,#31250;9800 ;313.6ms 15625
            MOVW CR000,AX

            CLR1 TMIF000 ;clear sign
            CLR1 TMMK000 ;allow interrupt

            MOV TMC00,#0CH ;clear the CR000 when TM00=CR000

            EI

            CLR1LED1_MODE
            CLR1LED2_MODE
            CLR1LED3_MODE
            CLR1LED4_MODE
            CLR1LED5_MODE
            CLR1LED6_MODE
            CLR1LED7_MODE
            CLR1LED8_MODE

            SET1 LED1
            SET1 LED2
            SET1 LED3
            SET1 LED4
            SET1 LED5
            SET1 LED6
            SET1 LED7
            SET1 LED8

            CLR1LED1

            MAIN:

            MOV WDTE,#0ACH;

            BR !MAIN

            ;*************************************************
            ; SUB PROGRAM
            ;*************************************************
            CSEG
            DELAY_1MS:

            MOVB,#0FFH
            BBBB:
            DBNZ B,$BBBB;
            RET

            ;*************************************************
            ;INTERRUPT FUNCTION
            ;*************************************************
            CSEG
            INTTM000_VECT:

            BT LED1,$LED22 ;jump if LED1=1
            SET1 LED1
            CLR1 LED2
            BR !backtrack

            LED22:
            BT LED2,$LED33
            SET1 LED2
            CLR1 LED3
            BR !backtrack

            LED33:
            BT LED3,$LED44
            SET1 LED3
            CLR1 LED4
            BR !backtrack

            LED44:
            BT LED4,$LED55
            SET1 LED4
            CLR1 LED5
            BR !backtrack

            LED55:
            BT LED5,$LED66
            SET1 LED5
            CLR1 LED6
            BR !backtrack

            LED66:
            BT LED6,$LED77
            SET1 LED6
            CLR1 LED7
            BR !backtrack

            LED77:
            BT LED7,$LED88
            SET1 LED7
            CLR1 LED8
            BR !backtrack

            LED88:
            BT LED8,$INTTM000_VECT
            SET1 LED8
            CLR1 LED1
            BR !backtrack

            backtrack:

            RETI

            END
            產品參數:
            MCU 8BIT 8KB FLASH 30PIN
            核心處理器:78K0S
            芯體尺寸:8-位
            速度:10MHz
            連通性:LIN,UART/USART
            外圍設備:LVD, POR, PWM, WDT
            輸入/輸出數:24
            程序存儲器容量:8KB (8K x 8)
            程序存儲器類型:FLASH
            EEPROM 大?。?
            RAM 容量:256 x 8
            電壓 - 電源 (Vcc/Vdd):2 V ~ 5.5 V
            數據轉換器:A/D 4x10b
            振蕩器型:內部
            工作溫度:-40°C ~ 85°C

            本文引用地址:http://www.biyoush.com/article/170677.htm


            評論


            相關推薦

            技術專區(qū)

            關閉