- Access to all I/O pins through female header pins
- 4 Push Buttons for Input
- 4 LEDs for Output
- An LCD Interface Port
- A 4-digit Seven-Segment Display Interface
- LCD Backlight Switch and Contrast Adjustment
- ICSP Programming (Very Important)
Things you need:
- A protoboard : I used 116 x 96 mm protoboard from Futurlec.
- An 18 pin IC socket for PIC16F628A
- A 4.0MHz Crystal
- 2 22pF capacitors
- 4 Push Buttons
- 4 BC547 transistors for multiplexing 4-digit Seven Segment Display
- 4 Red LEDs
- 1 Green LED for Power Supply indicator
- 1 10K Trimmer Potentiometer for LCD Contrast
- 5 10K resistors
- 12 220 Ohm resistors
- 4 4.7K resistors (Driving the base of Multiplexing Transistors)
- Connection Header pins Male and Female both as required
- A 4-digit common cathode 7-Segment Display (I used 7FR5641AS from Futurlec)
- A 2X16 LCD Display Module (Total 16-pins including LED back light)
1. PIC16F628A Power Supply and Crystal Connections
You decide how you gonna supply +5V to the board. I am going to use 4 AAA Size NiCd rechargeable battery for power supply. Use 4.0MHz crystal with two 22pF capacitors. This is a standard circuit for PIC16F628A. Pin 4 should be held high, a low pulse on this pin will reset the PIC. I used a diode in series with 1K resistor to prevent the backward current flow when the programming voltage appears on Pin 4 during ICSP. Remember, Pin 4 of PIC16F628A is used as programming voltage input during ICSP.
2. ICSP Header
3. Push Buttons
The standard push button circuit uses a pull up resistor. At normal condition, the output is HIGH (+5V), and when the button is pushed, the output is LOW (GND). I have connected the push button output to female header pin so that I could connect it to any Port of the PIC using a jumper wire. There will be 4 push button circuits like this.
4. 4-Digit Seven Segment Display Interface
4-digit Seven Segment interface will be achieved using multiplexing circuit. I have not connected the Seven Segment Display to the board, rather the circuit is built on the board and the displayy will fit on the 12 pin female headers. I used 7FR5641AS Seven Segment module from Futurlec. The series resistance connected with the seven segments are valued 220 Ohm, and the ones connected to the bases of transistors are 4.7K. Connect a, b, c, d, e, f, g points to PortB.0, B.1, B.2, ..., B.6. Transistors I used were BC547. Connect Aout, Bout, Cout, Dout to a female header pins so that you can later connect to the appropriate PIC port using jumper wires.
5. LED Connection
6. LCD Interface
16 pin male header. Now place a 16 pin female header on board and connect the pins as shown above. We will use LCD in 4-bit mode to save microcontroller pins. The pins 15 and 16 are Backlight LED pins. I used jumpers to make it ON/OFF.
Here's the complete circuit diagram:
I have got a PIC programmer from MCUMALL(www.mcumall.com) named PRG-017 USB PIC programmer. This is a low cost USB based PIC programmer that can be used in Windows Vista platform too. It acquires power from the USB port itself, and works on laptop which has no RS232 serial port. This can program a wide variety of PIC devices. The complete list can be found on the website. The price for this item is $24.99 on their websites, and it comes with a link for software and a USB cable. It has ICSP programming capability but does not come with the cable. I made my own ICSP cable.