• slider image 442
  • slider image 477
  • slider image 479
  • slider image 480
  • slider image 481
  • slider image 482
:::


Browsing this Thread:   1 Anonymous Users






Re: 关天PIC16C54定时器的问题
#7
初級會員
初級會員


查看用戶資訊
你可以去範例程式下載,林子虔先生所投搞的範例程式,他是利用16c56 <--好像是的樣子,我只記得他寫的code就是你要的資訊

發表於: 2005/5/12 0:45
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 关天PIC16C54定时器的问题
#6
版主
版主


查看用戶資訊
我覺得我看不是很懂你的程序流程, bcf tmr0,7 後為何沒做 time-out 的事件,而是 retlw 回去?

發表於: 2005/5/10 14:12
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 关天PIC16C54定时器的问题
#5
初級會員
初級會員


查看用戶資訊
loop    
        clrwdt
        clrf   tmr0
loop1
   
       BTFSC      PORTA
,GP2      ;查其它IO口,也就是做其它事情
       
GOTO       MAIN           ;&#27809;有信&#21495;
        
       
btfss   tmr0,7            ;查定&#26102;器的第七位
       
goto    loop1
       bcf     tmr0
,7
       rtelw    0
DELAY_500ms
       decfsz  INT_A
       
goto    loop
       retlw   0
DELAY_12S
       decfsz  INT_B
       
GOTO    DELAY_500ms
       retlw    0

这样有没有哪错了????

發表於: 2005/5/8 11:00
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 关天PIC16C54定时器的问题
#4
版主
版主


查看用戶資訊
btfss TMR0,7
goto loop1
clr TMR0
call Time_Out_Proc
goto loop1

只要在時間到式呼叫一個副程序處理,完成後再返回 loop1

發表於: 2005/5/8 10:16
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 关天PIC16C54定时器的问题
#3
初級會員
初級會員


查看用戶資訊
如果在定时期间要做其它事情要怎么弄??

發表於: 2005/5/8 10:06
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 关天PIC16C54定时器的问题
#2
版主
版主


查看用戶資訊
基本上這樣檢查是可以的,但在 TMR0 的 b7 =1 時最好將 TMR0清零。

btfss TMR0,7
goto loop1
clr TMR0
retle 0

發表於: 2005/5/8 9:36
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


关天PIC16C54定时器的问题
#1
初級會員
初級會員


查看用戶資訊
PIC16C54定时器没有中断,只能是查最高位有没有溢出!

我要在定时的期间做其它事情,请问程序要怎么写?以下这样写为什么不行?


loop
clrwdt
clrf tmr0
loop1


BTFSC PORTA,GP2 ;是否有信号输入
GOTO MAIN ;有信号,到别的地方去,
btfss tmr0,7 ;查定时器的第七位有没有溢出,有溢出表时定时器满了
goto loop1 ;还没到,继续去查
rtelw 0

發表於: 2005/5/7 22:30
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... ]

教育訓練中心

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