Re: 時間和 編輯問題
|
||||
---|---|---|---|---|
中級會員
|
了解~非常感恩
發表於: 2007/7/19 10:03
|
|||
|
Re: 時間和 編輯問題
|
||||
---|---|---|---|---|
版主
|
它已經告訴你 ROM 已使用 100%,考慮換顆 4K ROM 的看看。
發表於: 2007/7/18 11:30
|
|||
|
Re: 時間和 編輯問題
|
||||
---|---|---|---|---|
資深會員
|
unsigned char ...就是宣告不用+-符號,但你卻用又-1所以會有問題.
int 2byte ,char 1byte 可能是RAM不夠吧,ROM的宣告方式和RAM有點不同...
發表於: 2007/7/18 8:07
|
|||
|
Re: 時間和 編輯問題
|
||||
---|---|---|---|---|
中級會員
|
宣告真的是問題 改了就ok了!!
可是 unsigned char Lhcount......0~255 signed char Lhcount.........-128~127 Lhcount都有含到0 不是嗎? if ((Lhcount>=0)&&(Lhcount<6)) 這樣應該沒問題不是嗎? ----------- 在請教一下當我 宣告 signed int p_x1 =0; 會出現以下 Error[000] : Can't find 0xB words (0xB withtotal) for psect text4 in segment CODE 大概是 rom不夠是嗎? 當我改宣告 signed char p_x1 =0; 時就不會出現 真的是 rom不夠嗎? 問題好多真是不順利 拜託各位了
發表於: 2007/7/17 18:50
|
|||
|
Re: 時間和 編輯問題
|
||||
---|---|---|---|---|
資深會員
|
宣告的有問題.unsigned char Lhcount=0
signed char Lhcount.........-128~127 unsigned char Lhcount......0~255 宣告的有問題.
發表於: 2007/7/17 17:24
|
|||
|
Re: 時間和 編輯問題
|
||||
---|---|---|---|---|
中級會員
|
我改過了好像不是這個原因也
Lhcount 應該可以0~255 如果改成 if ((Lhcount>0)&&(Lhcount<6)) or if ((Lhcount>=1)&&(Lhcount<6)) 就ok if ((Lhcount>-1)&&(Lhcount<6)) 不ok Lhcount =0不是在合理範圍嗎? -------------------------------------- Error[000] : Can't find 0xB words (0xB withtotal) for psect text4 in segment CODE .c 加 .h 合起來快50k 我是用pic 16f72 編輯時會出現上面的錯誤 是不是 pic的容量爆了
發表於: 2007/7/17 16:08
|
|||
|
Re: 時間和 編輯問題
|
||||
---|---|---|---|---|
資深會員
|
if ((0<=Lhcount)&&(Lhcount<6))
變數要放在左邊吧?? if ((Lhcount>=0)&&(Lhcount<6)) 難怪怎麼看都覺得很奇怪??
發表於: 2007/7/17 13:25
|
|||
|
Re: 時間和 編輯問題
|
||||
---|---|---|---|---|
中級會員
|
作法是這樣----
unsigned char Lhcount=0 if ((0<=Lhcount)&&(Lhcount<6)) 變數宣告應該沒什麼問題吧! TIMER2=0.2US*1*9*(99+1) TIMER2=180US 好像差滿多的
發表於: 2007/7/17 11:43
|
|||
|
Re: 時間和 編輯問題
|
||||
---|---|---|---|---|
新會員
|
我看書"pic16f877原理與應用"P10-12
他的公式 100uS=[(PR2+1)]*4*(1/12us)*4 預儲值4 12MHz參考看看了
發表於: 2007/7/17 11:29
|
|||
|