Fabri
Joined: 22 Aug 2005 Posts: 275
|
array reading error |
Posted: Tue Jul 25, 2006 9:48 am |
|
|
Hi everybody,
I want to read a table as show
Quote: |
const signed int16 tabella_pt100[6][2]=
{
{0x0002,0x001C}, // 2°
{0x002d,0x03B7}, // 45°
{0x0062,0x07FC}, // 98°
{0x00C8,0x0FF1}, // 200°
{0x012c,0x1743}, // 300°
{0x015e,0x1ADF}, // 350°
};
int16 converti_lettura_ad_temperatura(int16 lettura_ad){
int i;
int16 t1;
int16 t2;
int16 delta_ad;
int16 delta_t;
for (i=1;i<6;i++){
t1=tabella_pt100[i-1][1];
t2=tabella_pt100[i-1][1];
}
}
|
This is only a part of routine but the problem is in reading array.
I don't realize why in first step t1=0x001C and t2=0x181C.
When I enter in the routine t1=0 but t2=0x1B00.
I'm using PIC16F690 and Compiler V 3.235
I used, without any problem, the same routine with PIC16F876A.
Thanks for support, |
|