新會員
Joined
: 2005/4/28 19:00 最後登入時間
: 2012/11/17 18:28
Group:
註冊會員
Level : 1 HP : 0 / 18 MP : 2 / 1026 EXP : 73
|
我使用下列程式結果會有兩種錯誤的情形, 第一種是程式run一下以會產detctor stack overfllow 第二種則桯式會停在ccnst unsigned char temm[]= 或 const unsigned char temdis[]= 的地方整個程式無法正常run 下方程-34及-85 則是因設定值的關係. 可否幚忙一下...急急急 void isr_c(){ //cpu中斷處 while(_eocf==1) {}
_emi=0; adp(); _emi=1; _eadi=0; } // A/D convent intrrupt address
ccnst unsigned char temm[]= {0Xb6,0Xb5,0Xb4,0Xb2,0Xb0,0Xaf, 0Xad,0Xac,0Xaa,0Xa7,0Xa6,0Xa4, 0Xa2,0Xa1,0X9e,0X9d,0X9b,0X99, 0X97,0X94,0X92,0X90,0X8e,0X8c, 0X89,0X87,0X85,0X83,0X81,0X7f, 0X7d,0X7b,0X79,0X76,0X74,0X72, 0X70,0X6e,0X6c,0X6a,0X68,0X66, 0X64,0X62,0X60,0X5f,0X5d,0X5b, 0X59,0X58,0X56,0X54}; const unsigned char temdis[]= {0x5a,0x59,0x59,0x58,0x57,0x56, 0x56,0x55,0x55,0x54,0x54,0x53, 0x53,0x52,0x52,0x51,0x51,0x50, 0x50,0x4f,0x4e,0x4d,0x4d, 0x4c,0x4c,0x4b,0x4b,0x4a,0x4a, 0x49,0x49,0x48,0x48,0x47,0x47, 0x46,0x46,0x45,0x45,0x44,0x44, 0x43,0x43,0x42,0x42,0x41,0x41, 0x41,0x40,0x40,0x3f,0x3f,0x3e, 0x3e,0x3d,0x3d,0x3c,0x3c,0x3b, 0x3b,0x3a,0x3a,0x39,0x39,0x39, 0x38,0x38,0x37,0x37,0x36,0x36, 0x35,0x35,0x34,0x34,0x34,0x33, 0x33,0x32,0x32,0x31,0x31,0x30, 0x30,0x2f,0x2f,0x2e,0x2e, 0x2d,0x2d,0x2c,0x2b,0x2b, 0x2a,0x2a,0x29,0x29,0x28,0x27, 0x27,0x26,0x26,0x25,0x25,0x24, 0x24,0x23,0x22,0x21,0x21,0x20, 0x20,0x1f,0x1e,0x1d,0x1d,0x1c, 0x1c,0x1b,0x1a,0x1a,0x19,0x18, 0x17,0x16,0x16,0x15,0x14,0x13, 0x12,0x11,0x10,0x10,0x0f};
//********************************************************* void adp() { unsigned int i; unsigned int tempr,tempr1; tempr1=_adrh; if(adsef==1) { stemp-=34; tempr=temm[stemp]; tempr1=_adrh; tempr1-=84; temp=temdis[tempr1]; }}
發表於: 2005/5/16 12:23
|