
PT0AD=0x70;    // Disable digital inputs on comparators.
P0M2=0x00;     // All pins in port 0 made input only.
P0M1=0xFF;
CMP1=0x24;     // Comparator A Ext Ref. Output enable.
ms_delay(10);  // 10ms Delay to start comparator properly.
EC=1;          // Enable Comparator Interrupt.
EA=1;          // Enable Global Interrupt.
