• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
  • slider image 488
  • slider image 491
:::


Browsing this Thread:   1 Anonymous Users






Re: 請問APP013使用TC77的範例 謝謝
#2
新會員
新會員


查看用戶資訊
已完成

發表於: 2008/6/9 17:16
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請問APP013使用TC77的範例 謝謝
#1
新會員
新會員


查看用戶資訊
我有買microchip的實驗版app013
上面有tc77 不過它卻沒有附程式範例
所以想請問各位大大哪邊可以找到相關的範例(組語)
我找過microchip的網站 不過好像沒有
我試著寫了一個程式 不過我也不知道對不對
因為燈號一直沒變化 該怎麼測試呢?
我是初學者 我的程式如下
謝謝
板上晶片換成16f877 頻率4m

#include <p16f877a.inc>

cblock 0x20
    v1
,v2,v3,v4,v5,d1,d2,d3
endc

SCS equ 2
SCK equ 1
SIO equ 0

mian
:
    
org 0x00
    nop
    
goto start
start
:
    
org 0x08
    banksel TRISB
    bsf TRISB
,SIO
    bcf TRISB
,SCK
    bcf TRISB
,SCS
    movf TRISB
,f
    clrf TRISD
    banksel PORTD
    clrf PORTD
sensor
:
    
call getdata
    movwf PORTD
    call delay0
    
goto sensor

getdata
:
    
bsf PORTB,SCS
    bsf PORTB
,SCK
    bcf PORTB
,SCS
    call delay
    movlw .16
    movwf v2
getdata2
:
    
bcf PORTB,SCK
    call delay
    bsf PORTB
,SCK
    call delay
    bsf STATUS
,C
    btfss PORTB
,SIO
    bcf STATUS
,C
    btfss v2
,3
    
goto n8
    rlf v3
,f
    
goto ne
n8
:
    
rlf v5,f
ne
:    
    
decfsz v2,f
    
goto getdata2    
    bsf PORTB
,SCS
    retlw v5

delay
:
    
movlw 0x1f
    movwf v1
    decfsz v1
,f
    
goto $-1
    
return
    
delay0:
    
movlw .1
    movwf d1    
delay1
:
    
movlw .100
    movwf d2
delay2
:
    
movlw .100
    movwf d3
delay3
:
    
decfsz d3,f
    
goto delay3
    decfsz d2
,f
    
goto delay2
    decfsz d1
,f
    
goto delay1
    
return

    
end

發表於: 2008/6/6 9:11
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... ]

教育訓練中心

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