• 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: PIC16F636 燒錄後一直 reboot ?
#6
版主
版主


查看用戶資訊
nicecookie 大大已經告訴你結果了,程式的流程有錯,你應該用 while(1){ 控制程式} 來讓你的程式來跑這個迴圈,LED 才可以 ON/OFF的連續動作。按你的程式在跳出 Main( ) 函數後會返回 Hi-Tech PICC 的啟動程式,這時就有可能會將 PIC reset一次。

發表於: 2007/12/24 10:47
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PIC16F636 燒錄後一直 reboot ?
#5
初級會員
初級會員


查看用戶資訊
參照:

nicecookie 寫到:
有沒可能是PLVD被啟動的問題
開機瞬間電壓突然掉的太低,導致被重開機
可試看看把PLVD設低一點或換個POWER試看看

另外,習慣上main()裡面應該要有個while()
讓他有個迴圈可以不斷的執行
即時真的沒事做了,也該用個while(1){}
不然程式執行到哪去了,誰知道呢


是沒有針對 PLVD 作設定,
但硬體如我所說, 只接了 1 顆 ic , led及電阻,
不可能電壓被拉低.

基本上這並不是我要用的程式, 只因在使用上時,
發現好像有上述問題, 所以才故意寫了一個短程式,
也故意只讓它執行一次, 果然發現一直 reboot .

發表於: 2007/12/22 19:12
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PIC16F636 燒錄後一直 reboot ?
#4
初級會員
初級會員


查看用戶資訊
參照:

hellowanz 寫到:
Watch Dog --> Off
再試試看。


主程式裡沒有特別針對 Watch Dog 作設定,
但在燒錄時,有將設定項目裡的 Watch Dog 選項關閉.

發表於: 2007/12/22 19:02
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PIC16F636 燒錄後一直 reboot ?
#3
資深會員
資深會員


查看用戶資訊
有沒可能是PLVD被啟動的問題
開機瞬間電壓突然掉的太低,導致被重開機
可試看看把PLVD設低一點或換個POWER試看看

另外,習慣上main()裡面應該要有個while()
讓他有個迴圈可以不斷的執行
即時真的沒事做了,也該用個while(1){}
不然程式執行到哪去了,誰知道呢

發表於: 2007/12/22 1:22
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PIC16F636 燒錄後一直 reboot ?
#2
資深會員
資深會員


查看用戶資訊
Watch Dog --> Off
再試試看。

發表於: 2007/12/21 19:48
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


PIC16F636 燒錄後一直 reboot ?
#1
初級會員
初級會員


查看用戶資訊
只是簡單的測試程式如下,
硬體電路只接了 VCC, GND & RC4 LED, 用內部 CLOCK.
結果 LED 不是只閃一次, 而是一直閃.
是用 LAB TOOL-48 UXP 燒錄的.
不知有那裡沒設好?

#include <PIC.h>

typedef signed int word;

#define ON 1
#define OFF 0

#define Led RC4 // LedOut
#define MASKPC 0xc0 // port C I/O config (NU)

void main ()
{
word j;

TRISC = MASKPC;
PORTC = 0;

for(j=0;j<30000;j++)
Led = ON;
for(j=0;j<30000;j++)
Led = OFF;

}

發表於: 2007/12/21 19:01
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... ]

教育訓練中心

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