This is a quick project for a timer. Recently I finished my UV light exposure box and thought that it will be convenient to have a build in timer to switch off the light after preset time. So I had a PIC16F628A lying around and after searching the web I found a Brazilian site (I think?) with tons of interesting projects with microcontrolers. This project is based on one of them.
Schematic
The schematic uses the internal oscillator of the microcontroller which is enough accurate for my purposes, but as the pins 15 and 16 are left unoccupied, there can be connected external quartz resonator with better accuracy. As I said, this project is based on an existing project, but actually my schematic is quite different and the code was almost completely rewritten. My programming abilities are little rusty, but I think the final result is quite good.
For more detail: Simple timer with PIC16F628A