Embedded Lab just posted a new project. Using the PIC16F688, he made a diode and Bipolar Junction Transistor tester. The part to be tested is placed at 2 (if diode) or 3 (if transistor) connections with a pull-down resistor connected to each one. Then, the PIC automatically makes one by one the 3 pins as outputs and also sets them to HIGH (LOGIC 1). It then reads the other 2 pins (which are inputs). Each part has a different result pattern according to which the PIC can understand if this part is operational or faulty, and also if the part is recognized as a transistor, it can distinguish if this transistor is PNP or NPN type. The results are shown on a 2x16 LCD display.
The complete project can be found here.