• slider image 442
  • slider image 497
  • slider image 498
  • slider image 499
  • slider image 500
  • slider image 502
:::


Browsing this Thread:   1 Anonymous Users






Re: 16f684 AUTO reset 問題弄不懂,請各位指教
#4
版主
版主


查看用戶資訊
參照:
#include <pic.h>

__CONFIG(INTIO & WDTDIS & PWRTEN & MCLRDIS & UNPROTECT \
& UNPROTECT & BORDIS & IESODIS & FCMDIS);


int i;
int j;

main ( )
{
SWDTEN = 1; // 去掉此行來關閉 WDT
PORTC = 0;
PORTA = 0;

PIC16F684 的 Watch-Dog Timer 是屬於新的設計 (Enhanced Low-Power WDT) ,它可以在 Configuration 在燒錄時啟動,也可以在 WDTCON<SWDTEN> 位元去控制。
所以在你的程式雖然已在 Configuration bits 下關掉了 WDT,但你在程式裡又將軟體設定的 SWDTEN 設為 1,這樣又將 WDT 打開了。

發表於: 2008/5/6 15:34
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 16f684 AUTO reset 問題弄不懂,請各位指教
#3
資深會員
資深會員


查看用戶資訊
呵呵~~這是哪個銀河系的語言阿? 火星好像沒這麼複雜?

你開啟WDT, 卻沒清它嗎?
從標題猜你的意思, 應該是WDT時間到了, 起動WDT Reset, 因為時間固定, 所以每次大約都是在那時候...x&&(*&))&%^$$(這不是亂碼, 是鬼星文, 哈哈)

發表於: 2008/5/6 9:07
Thanks,
Edward Lee
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 16f684 AUTO reset 問題弄不懂,請各位指教
#2
資深會員
資深會員


查看用戶資訊
問題說明可以再白話一點嗎?大家都看不懂火星文。

發表於: 2008/5/6 8:53
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


16f684 AUTO reset 問題弄不懂,請各位指教
#1
新會員
新會員


查看用戶資訊
我剛剛在學寫 pic program
是用 picc c 語言 來玩
但我不僮, 為甚麼在同一時間reset portc 去 0
當 portc 去到 101xxx

porgram 如下::


#include <pic.h>

__CONFIG(INTIO & WDTDIS & PWRTEN & MCLRDIS & UNPROTECT \
& UNPROTECT & BORDIS & IESODIS & FCMDIS);


int i;
int j;

main ( )
{
SWDTEN = 1;
PORTC = 0;
PORTA = 0;
TRISC = 0b000000;
TRISA1 = 1;
CMCON0 = 7;
ANSEL = 0;

while (1 == 1)
{
if (0 == RA0)
{
for (i = 0; i <= 2000; i++);
for (j = 0; j <= 2000; j++);

PORTC = 0 ;

for (i = 0; i <= 2000; i++);
for (j = 0; j <= 2000; j++);

}
else
{
for (i = 0; i <= 2000; i++);
for (j = 0; j <= 2000; j++);

PORTC = PORTC + 1;

for (i = 0; i <= 2000; i++);
for (j = 0; j <= 2000; j++);

PORTC = PORTC + 1;

}
}
}

發表於: 2008/5/6 0:19
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... ]

教育訓練中心

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