Hi,
I'm trying to modify this part of code:
interrupt void saradc_isr()
{
Uint16 key;
static int flag =1;
extern Uint8 Key_Count;
extern Uint8 Zoom_Flag;
extern Uint8 col;
if(flag== 0)
{
flag=1;
}
else
{
flag=0;
}
if(flag == 1)
{
key = Get_Sar_Key();
if((key >= SW8) && (key <= SW9))
{
/*interrupt for Change of Zoom of LCD display*/
if(Zoom_Flag==0)
{
Zoom_Flag = 1;
}
else
if(Zoom_Flag==1)
{
Zoom_Flag = 2;
}
else
if(Zoom_Flag==2)
{
Zoom_Flag = 0;
}
}
else if(key < (SW8 - 0x30))
{
if(Simulation_Flag == 0)
{
Simulation_Flag = 1;
}
else if(Simulation_Flag == 1)
{
Simulation_Flag = 0;
}
}
}
return;
}
Where bold text is what I was able to create and it's working (works on key SW13 on board). However when I'm trying to use other keys in similar fashion it's unfortunately not working. Can you explain me how to programme this?
Regards.