include<stdio.h>
void main()
{
int i;
char map[10]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F};
TRISD=0x00;
TRISC=0x00;
TRISB=0X00;
TRISA=0XF0;
RC1=0;
i=0;
while(i<9)
{
i++;
PORTD=map;
PORTB=0x01;
_delay(196999);
PORTB=0x00;
_delay(196999);
RC1=1;
//RB5=1;
RC0=0;
}
this program is working in good condition.but i want add a switch control to it.now it is increament continuously.so i want to change this one as when we press the push button
then only the increment happen.