Re: 請教兩個問題
|
||||
---|---|---|---|---|
版主
|
你那一段 config 的設定不是針對 Hi-Tech PICC 的語法。 Hi-Tech PICC 的 Configuration 定義在相關的 元件.h 檔裡,如下所示:
且正確的使用方式 __CONFIG ( HS & WDTDIS & PWRTEN & BORDIS & LVPDIS & UNPROTECT );
/ Configuration Mask Definitions
發表於: 2008/10/16 10:50
|
|||
|
請教兩個問題
|
||||
---|---|---|---|---|
中級會員
|
小弟我剛接觸pic16f690,想請教各位大大兩個問題:
1.程式開頭的configuration設定,如__CONFIG ( HS_OSC & BODEN_ON & WDT_OFF & CP_OFF & LVP_OFF & DEBUG_ON ) ( )內容的設定在哪可以查的到勒? 2.小弟要量測一週期性的訊號,用capture的Timer1 16位元量測,用內部chip的RC震盪,指令時間為1us,若用以下這種寫法: if(timer_edge[1]>=timer_edge[0]) {period=timer_edge[1]-timer_edge[0];} else {period=65536+timer_edge[1]-timer_edge[0];} 最慢可以量測到1000000/65536=15.25Hz的頻率,若要量測更低的頻率,如量測到5Hz要如何修改程式勒? 以上兩個問題可否請有經驗的大大幫小弟解惑囉,阿哩阿都~~~
發表於: 2008/10/16 9:24
|
|||
|