Knight Rider Light computer – version 2

This knight rider light computer is a successor of my first version of the Knight Rider. This version is much smaller and justifies the use of a microcontroller. The project is based on the PIC 12F629 microcontroller.

The hardware part

Unlike my previous project this light computer is build around the PIC12F629: a microcontroller with only 8 pins. It is shipped in a DIL-8 housing.

Knight Rider Light computer - version 2An external clock is not necessary: the chip has an internal 4 MHz oscillator. The reset circuit is not necessary either: I configured the PIC to use its internal reset circuit. So only 2 pins are needed to power the microcontroller. All other pins are available for I/O.

The schematic diagram can be kept very small. You only need the PIC12F629, eight LEDs, two resistors and a zenerdiode.

Each output of the PIC drives two LEDs. The cathode of all LEDs is common and connected to a single resistor. This is not a good design practice: each LED should have its own resistors as LEDs should never be placed in parallel. I did it anyway in this particular design because I needed a very compact solution (2 LEDs of the same type can slightly differ: they can have a different forward voltage. This can cause problems when they are placed in parallel).

The PIC’s GP03 port doesn’t drive any LEDs because it is solely an input port.

The circuit itself must be powered by a 9 VDC supply. This voltage is down sized to 4.7V by a zenerdiode D1 and resistor R2. Eventually they can be replaced by a 7805 regulator.

Possible PCB Layout

The image at the left illustrates how small this circuit could be when you create a PCB of it.Please note I drew this PCB very quick – I didn’t check it for errors as it is just an example. The PCB can’t be downloaded from this website.

Knight Rider Light computer - version 2 SchematicThe software part

I wrote the software in the C language. I used the (free) HI-TECH C language that was included with MPLab, a tool for the PIC microprocessors.

I used an array that contains all the 6 different output states. A loop is cycled: each cycle another output state is retrieved from the array.

I programmed this microcontroller with my very cheap Olimex USB PIC programmer [External]. This programmer can be used with Microchip MPLab so you don’t need any additional software.

 

For more detail: Knight Rider Light computer – version 2


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.