« The Story of My Name in One Paragraph | Main | Lab 3 - Analog Input »
September 22, 2004
Lab2 - Digital Input
I built a combo lock and had a problem with using a 20 mHz clock.
-----
Here's Step 1 (1mb avi). Millions of man hours to create a pic chip, and I turned it into a light switch.
I had a problem with a 20 mHz clock, where the pic would only run if I touched the clock. In class today I learned that this could have been remedied by changing the preferences in the EPICWin program to "High Speed." Since I didn't know this at the time I switched to a 4 mHz clock.
Step 2 (1mb avi) went pretty smoothly.
For Step 3 (video below) I decided to make a combo lock. The idea is based on the directional controller of a game pad. To open the lock, you enter a code very similar to cheat codes in a video game; Left Right Up Down, for example. Conceptually it is pretty simple. It took me very little time to draft the code, but it took hours to debug and get working. I had a lot of trouble with what I think was a short in my board. Also, having to take pic chip out of the board and into the pic programmer for every compilation was very time consuming.
I rigged up a serial output to help me along. Here's a sample of the output:

Here's a video of the finished combo lock:
Third Step -- Combo Lock (6mb AVI)
If I press the buttons once each, from right to left order, the lock opens (the green light turns on). Any other order and the lock remains closed. In the movie, I touch two wires to activate a reset.
Posted by rus200 at September 22, 2004 09:39 PM