Re: PIC16F636 燒錄後一直 reboot ?
|
||||
---|---|---|---|---|
初級會員
|
參照:
是沒有針對 PLVD 作設定, 但硬體如我所說, 只接了 1 顆 ic , led及電阻, 不可能電壓被拉低. 基本上這並不是我要用的程式, 只因在使用上時, 發現好像有上述問題, 所以才故意寫了一個短程式, 也故意只讓它執行一次, 果然發現一直 reboot .
發表於: 2007/12/22 19:12
|
|||
|
Re: PIC16F636 燒錄後一直 reboot ?
|
||||
---|---|---|---|---|
初級會員
|
參照:
主程式裡沒有特別針對 Watch Dog 作設定, 但在燒錄時,有將設定項目裡的 Watch Dog 選項關閉.
發表於: 2007/12/22 19:02
|
|||
|
Re: PIC16F636 燒錄後一直 reboot ?
|
||||
---|---|---|---|---|
資深會員
|
有沒可能是PLVD被啟動的問題
開機瞬間電壓突然掉的太低,導致被重開機 可試看看把PLVD設低一點或換個POWER試看看 另外,習慣上main()裡面應該要有個while() 讓他有個迴圈可以不斷的執行 即時真的沒事做了,也該用個while(1){} 不然程式執行到哪去了,誰知道呢
發表於: 2007/12/22 1:22
|
|||
|
Re: PIC16F636 燒錄後一直 reboot ?
|
||||
---|---|---|---|---|
資深會員
|
Watch Dog --> Off
再試試看。
發表於: 2007/12/21 19:48
|
|||
|
PIC16F636 燒錄後一直 reboot ?
|
||||
---|---|---|---|---|
初級會員
|
只是簡單的測試程式如下,
硬體電路只接了 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
|
|||
|