Kindly help in resolving this,the error i'm getting here is syntax near '{' since i had declared unsigned char near DAC_table i got an error,so define outside the function which is wrong...i have not posted my complete code here...in this part of the code i'm getting problem..
unsigned char DAC_table[16];
unsigned char *ptr2tbl;
void fnSelectVoltage(void)
{
line_display(1, "Volt Sel");
sprintf(line_buf," %d V",(unsigned int)*ptr2tbl);
line_display(2, line_buf);
DAC_table[16] = ( 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F);
*ptr2tbl = &DAC_table;
while (START_KEY)
{
if (!UP_KEY)
{
wait_for_any_key_counter_0 = 0;
for (i = 0; i<15; i++)
{
P2 = *ptr2tbl++;
// delay_ms(1000);
}
}
else if(!DOWN_KEY)
{
wait_for_any_key_counter_0 = 0;
for (i = 0; i<15; i++)
{
P2 = *ptr2tbl++;
// delay_ms(1000);
}
}
}
}