• slider image 442
  • slider image 509
  • slider image 510
  • slider image 511
  • slider image 512
  • slider image 513
  • slider image 514
  • slider image 515
:::


Browsing this Thread:   1 Anonymous Users






Re: 請問timer3中斷的使用
#4
版主
版主


查看用戶資訊
照你的要求應該是1:1的設定,(32768Hz/65535=2Sec) 。
要不要將 OpenTimer3 改為 T3CON= 0bxxxxxxxx

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


Re: 請問timer3中斷的使用
#3
高級會員
高級會員


查看用戶資訊
我將原本的
OpenTimer3(0b10000111);

改成這樣就可以了



TRISD=0xfc;
PORTD=0x00;
INTCON=0b11000000;
OpenTimer3(0b10010111);
這樣應該是預分頻1:2

發表於: 2007/2/7 15:48
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問timer3中斷的使用
#2
版主
版主


查看用戶資訊
計數值是對的,看不出來問題在哪哩。如果 32768Hz 是準的,那試看看用短一點的時間10mS , 50mS 來試試是否正常

發表於: 2007/2/7 15:44
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請問timer3中斷的使用
#1
高級會員
高級會員


查看用戶資訊
我使用p18f452寫了一個timer3的中斷程式
用32768hz的外部震盪,接在RC0跟RC1
想要每兩秒中斷一次,所以我TMR3L跟TMR3H都置0
(1/32768)*65536=2
然後我在中斷副程式中使用RD0去觀察輸出信號
每次進入中斷副程式就將RD0反相,
但是我在是波器上面看到信號每1.5秒左右就反相一次了,
後來我用脈波產生器調到32768Hz結果這次是1秒左右就反相了?
請問是什麼原因呢




發表於: 2007/2/7 14:49
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... ]

教育訓練中心

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