• slider image 514
  • slider image 516
  • slider image 517
  • slider image 518
  • slider image 519
:::


Browsing this Thread:   2 Anonymous Users






Re: 請幫我看看這個~!! 謝謝唷
#2
資深會員
資深會員


查看用戶資訊
要看什麼?
有哪些問題呢?
建議你先看這一篇排版一下
http://www.microchip.com.tw/modules/n ... 380&forum=1#forumpost2559

發表於: 2006/7/28 11:21
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請幫我看看這個~!! 謝謝唷
#1
新會員
新會員


查看用戶資訊
LIST      p=16F877    R=DEC        ; list directive to define processor
INCLUDE "P16F877.INC"

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

W_TEMP            EQU        0x20
STATUS_TEMP        EQU        0x21
BlankCet        EQU        0x22
Scalerr            EQU        0x23
Scalerg            EQU        0x24
Scalerb            EQU        0x25
MaxCount        EQU        0x26
TTEE            EQU        0x27

;-----------------------------
org            0x00
nop
goto        MainLine
org            0x04

goto        IntService
;-----------------------------
Timer1
banksel        PIR1
bcf            PIR1
,TMR1IF
banksel        TTEE
btfss        TTEE
,0
decfsz        Scalerr        
;
goto        
tim1        ;
bsf            TTEE,0        ;
tim1
btfss        TTEE
,1
decfsz        Scalerg        
;
goto        
tim2        ;
bsf            TTEE,1        ;
tim2
btfss        TTEE
,2
decfsz        Scalerb        
;
goto        
tim3        ;
bsf            TTEE,2        ;
tim3
clrf        TMR1L
movlw        0xf8
movwf        TMR1H
movlw        0x2f
movwf        TMR1L
return
;-----------------------------
MainLine    
Call        Initial
MainLoop
clrf        PORTA
abc
call        LEDOFF
btfsc        PORTC
,0
goto        abc
btfsc        PORTC
,1
goto        abc
btfsc        PORTC
,2
goto        abc
goto        MainLoop
;-----------------------------
Initial
banksel        TTEE
clrf        TTEE
movwf        BlankCnt
movlw        0x40
movwf        Scalerr
movlw        0x50
movwf        Scalerg
movlw        0x60
movwf        Scalerb
banksel        TRISC
clrf        TRISC
banksel        T1CON
clrf        T1CON
clrf        TMR1H
clrf        TMR1L
clrf        INTCON
bsf            INTCON
,PEIE
banksel        PIE1
clrf        PIE1
bsf            PIE1
,TMR1IE
banksel        PIR1
clrf        PIR1
banksel        TMR1L
clrf        TMR1L
movlw        0xf8
movwf        TMR1H
movlw        0x2f
bsf            T1CON
,TMR1ON
banksel        INTCON
bsf            INTCON
,GIE
return
;------------------------------
IntService
        movwf    W_Temp
        swapf    STATUS
,W
        movwf    STATUS_Temp
        btfsc    PIR1
,TMR1IF
        call    Timer1
        swapf    STATUS_Temp
        movwf    STATUS
        swapf    W_Temp
,f
        swapf    W_Temp
,w
        retfie


;------------------------------
LEDOFF
btfsc        TTEE
,0        
bsf            PORTC
,0            ;=1    
btfsc        TTEE
,1        ;=0
bsf            PORTC
,1
btfsc        TTEE
,2
bsf            PORTC
,2
return
;------------------------------
    
END

compiler一直不會過請各位幫我看看 謝謝唷^^

發表於: 2006/7/28 9:24
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------