
void ex1_isr (void) interrupt 2
{
P0=0x01;
P0=0x02;
P0=0x03;
P0=0x04;
P0=0x05;
P0=0x06;
}

void Boot_Delay (void) //Forced delay to allow HC_VGA initialization
{

unsigned long Delaycounter;
for (Delaycounter = 0; Delaycounter <=1725; Delaycounter ++)      {                                                        
    Wait(1);//wait 1 ms
    }
}

void main (void)//main program
{

IT1 = 1;   // Configure interrupt 0 for falling edge on /INT1 (P1.4)
EX1 = 1;   // Enable EX1 Interrupt
EA = 1;    // Enable Global Interrupt Flag

//Boot_Delay();

while(1)//Loop this section forever
   {    
   i2c_init(0x00, 0);  //Sets the address and General Call
   i2c_receive(0x00); //Address of Slave device to send to   
   while (i2c_getstatus() & I2C_BUSY);	// wait until complete
   DriverSelection();
   }
}

