The The PIC16F627A/628A/648A are 18-pin Flash-based members of the versatile PIC16F627A/628A/648A family of low-cost, high-performance, CMOS, fully static, 8-bit micro-controllers. All PIC® micro-controllers employ an advanced RISC architecture. The PIC16F627A/628A/648A have enhanced core features, an eight-level deep stack, and multiple internal and external interrupt sources. The separate instruction and data buses of the Harvard architecture allow a 14-bit wide instruction word with the separate 8-bit wide data. The two-stage instruction pipeline allows all instructions to execute in a single cycle, except for program branches (which require two cycles). A total of 35 instructions (reduced instruction set) are available, complemented by a large register set. PIC 16F628 micro-controllers typically achieve a 2:1 code compression and a 4:1 speed improvement over other 8-bit micro-controllers in their class. PIC 16F628 devices have integrated features to reduce external components, thus reducing system cost, enhancing system reliability and reducing power consumption. The PIC 16F628 has 8 oscillator configurations. The single-pin RC oscillator provides a low-cost solution. The LP oscillator minimizes power consumption, XT is a standard crystal, and INTOSC is a self-contained precision two-speed internal oscillator. The HS mode is for High-Speed crystals. The EC mode is for an external clock source. The Sleep (Power-down) mode offers power savings. Users can wake-up the chip from Sleep through several external interrupts, internal interrupts and Resets. A highly reliable Watchdog Timer with its own on-chip RC oscillator provides protection against software lockup. Table 1-1 shows the features of the PIC 16F628 mid-range micro-controller family. A simplified block diagram of the PIC 16F628 is shown in Figure 3-1. The PIC 16F628 series fits in applications ranging from battery chargers to low power remote sensors. The Flash technology makes customizing application programs (detection levels, pulse generation, timers, etc.) extremely fast and convenient. The small footprint packages makes this micro-controller series ideal for all applications with space limitations. Low cost, low power, high performance, ease of use and I/O flexibility make the PIC 16F628 very versatile.