ECE221 Laboratory #2 Fall, 1999

The Infamous "Gottcha Anti-Theft" Machine

Due: Monday, December 13,1999; off-campus: ~3 weeks after receipt.

There are many anti-theft devices on the market that attempt to foil a would-be robber from starting your car and driving off with it. One popular item has a keypad like a touch-tone telephone. In order to start your car, you must key in a secret four digit decimal code, such as '3719'. It only "remembers" the most recent four digits you have keyed in. Thus the sequence '3723719' will let you start your car.

For simplicity here we use a code based on a sequence of eight bits, and use two push buttons to enter a sequence serially. Each press of a button enters the corresponding digit.

Figure 1. The Gottcha machine in action.

As you key in the bits in sequence, the device outputs E = 0 until the most recent eight bits agree with a built-in secret code byte. Then E switches to 1.

The shut-off gottcha: If 16 bits are toggled in without the secret code being observed, the system shuts off and won't accept any more bits. Add a reset button to the system that presumably only the owner could control: when RESET is pressed the system is again enabled and can accept bits.


Design and test (on LogicWorks) the miracle Gottcha machine. Do this in two different ways (thus designing and simulating two different circuits):

1). The Factory Preset Model: The specific secret byte: 10100110 is preset at the factory, and the machine need work only with it. Do not use registers: solve for the finite state machine with the fewest states and flip-flops possible.

2). The User-Programmable Model: This machine allows the car owner to enter a secret byte into a register. The user selects a byte using two hex keyboards, and presses an ENTERCODE pushbutton to store the code word. Now when the machine is used "in the field", the car owner enters a sequence using the same pushbutton arrangement as for the previous machine. When the sequence so entered matches the code word stored in the register, E goes HIGH. As with the Factory Preset Model, if more than 16 bits are entered without the proper sequence being observed, the systems shuts off (until RESET is pressed).



Some Hints:
1). These systems have no actual clock - the release of either pushbutton produces a transition that is used to trigger the flip flops involved. The main flip flops in the circuit are triggered by this transition.

2). You might put the outputs of the two pushbuttons into asynchronous inputs of a flip flop, which therefore instantly stores the value (i.e. informs "which" pushbutton was pressed) of the newest input bit. The output of this flip flop is then used as the actual "input" value.

3). Use a shift register in part 2 to store the most recently received bits. Compare the shift register output to the programmed code word. (So part 2 is very simple.)



Your report must include:

a). A brief description of the design process you used to obtain the circuits. Be sure to point out why you chose a particular design, along with the steps you took to minimize the amount of hardware required in each case.

b). A LogicWorks printout of the circuits you designed.

c). A LogicWorks printout of the simulations you did, along with detailed explanation of what the simulations show, to demonstrate that the circuits perform properly under "all" conditions. Also provide arguments about the ways one of the above designs is better than the other.


Important note: Always make a copy of your report, in case it gets lost. Bind your reports neatly and professionally - their appearance DOES matter!