The PIC12C508 processor is a tiny 8-pin computer, designed for the simplest control functions. It can be used in any small application when you need to monitor digital inputs or turn something on or off. Its I/O pins could be used to synthesize a SPI or I2C interface (Chapter 9) or to control a motor (Chapter 12).
The processor’s internal program address space is shown in Figure 5-1.
Figure 5-1. PIC12C508 program address space (Reference: PIC12C508 datasheet)
The PIC12C508 has 512 words of internal program memory and just 25 bytes of internal RAM.
Figure 5-2 shows the schematic for a small computer based upon the PIC12C508. The digital I/O signals of the PIC are brought out through a 7-pin connector. If the design were implemented using surface-mount components wherever possible, the connector would be the largest component on the PCB!
Figure 5-2. Minimal PIC12C508 computer
This particular PIC also includes an internal RC oscillator that runs at 4MHz, so we can use this processor without any external oscillator circuit. The design in Figure 5-3 shows the same PIC-based design, but this time using an external 32kHz watch crystal for its oscillator. By running off a (slower) 32kHz crystal, we have the advantage of greatly reducing the processor’s power consumption. This is ...