Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Homework # 1 Practical application of flip-flops ENGN/PHYS 208—Winter 2015 1. Flip-flops: Practical Application The basis of memory in modern computers are flipflops (aka data latches). There are several varieties of flip-flops, some of which we have studied thus far—SR latch, D latch, clocked (aka enabled or gated) D latch, level or positiveedge triggered. (a) Digital safe from Honeywell. (b) Teddy KGB, from the movie Rounders. Figure 1: Teddy KGB needs a better digital safe. Can you help him? Of course you can! As a hands on introduction to using these devices, you will build a digital keypad using D latches. Recall, you previously built a keypad combo using standard logic gates in Circuits Lab. Those worked great and Teddy KGB was happy, however he noticed the order didn’t matter. For instance, imagine the combo that opened the safe with Oreos required that bits 1, 3, and 4 be set high. It didn’t matter if the safe cracked entered 1-3-4 or 4-3-1, the safe opened either way. So, Teddy is back to employ your services again. He hears you just learned about some more sophisticated possibilities for his safe, namely building the electronic guts of a keypad where the sequence matters. For instance, only 1-3-4 entered in that order will open the safe (but not, say, 4-3-1, or 3-4-1, etc.) Thus, your task is to design, build, and show proof-of-concept of just such a keypad based on D-latches. Use any kind and number you like (though be friendly to your classmates; there are only a limited number of 7474 and 7475 chips in the lab currently.) Your keypad system should also incorporate some way to reset the keypad. For instance, if some would-be safe-cracker attempts a bunch of wrong combos before fleeing Teddy’s underground bunker compound, Teddy wants to be able to have a button to reset the device such that he can then enter in the proper code to get out his Oreos. Lastly, since we don’t have an actual safe, as a surrogate use and LED that illuminates when the proper code is entered. Even nicer is if your system incorporates a second, different color LED that remains illuminated to indicate the keypad is powered, but the proper code has not been entered (and should turn off when the proper code is entered.) A prize of Oreos goes to the best design (elegant but difficult to crack) 1 (a) Helpful design note: Pull-up and pull-down resistors In any system where a button may be pressed, it is almost always desirable to set a default value of high or low on a pin of a device. The proper way to set this default value requires using a pull-up resistor (if you want to set the default state to high) or a pull-down resistor (if you want to state the default state to low). There’s a wonderful tutorial on sparkfun’s website on this topic, highly recommended reading before you start your design: https://learn.sparkfun.com/tutorials/pull-up-resistors. Note that the input resistance of the 7474 device is not specified in the data sheet, but can be roughly guesstimated as follows: Rin ≥ Vcc /IIH ≈ 5V/20µA = 250kΩ. where IIH is the magnitude of current flowing into the device when the pin input is set to high (read off from data sheet for 7474). This value is just a rough guideline. You may need to adjust and play with pull-up and down resistor values as needed. Lastly, don’t be too alarmed when you see output voltages that don’t attain exactly 5V. Once you start interconnecting things, you are essentially creating voltage dividers everywhere as all devices have input and output resistances. If “high” voltages are dropping below about 3.5V, that could spell t-r-o-u-b-l-e. Ditto if “low” voltages are rising about 0.5V. (b) What to turn in • Circuit diagram. Teddy strongly prefers one drawn with a software package to keep things looking tidy. • Written description of theory of operation (1-2 paragraphs should be sufficient). The text could be built around an immensely helpful timing diagram. • Live demo or quick video demonstration of the safe working properly. 2. Your Move Please list and describe in some reasonable detail (a few sentences) any initial ideas you have a a capstone project in this course. The project should be on the “systems level,” meaning that it integrates various modules—the FitBit incorporates e.g., accelerometer, A/D converter, data transmission protocol so that data can be further processed or visualized. 2