This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: ECE 270 Module 5 Practice Homework -1- Solution 2009 by D. G. Meyer ______________________________________________________________________________ I0 I5 I1 I2 I3 I4 D0 A B C D Enable D1 D2 GS 6:3 Encoder I0 I5 I1 I2 I3 I4 D0 D1 D2 GS 6:3 Encoder I0 I5 I1 I2 I3 I4 D0 D1 D2 GS 6:3 Encoder 1 2 3 4 PUSHBUTTONS PUSHBUTTONS PUSHBUTTONS 4-bit adder 4-bit adder VCC 4:16 Decoder 1. As the competition on American Idol heats up, the judges have become aware of the need for an improved scoring circuit. Now that you know something about arithmetic logic circuit design, you can help! Before the next round, RPS (short for Randy, Paula, and Simon) have asked for a circuit that will allow each of them to award a score ranging from zero to five for each contestant; each judge, therefore, will have six pushbuttons to register their result, labeled 0 through 5. The sum of the three judges scores is to be displayed on an LED bar-graph, which should only illuminate when all three judges press their chosen button simultaneously. Further, your design should correctly handle multiple (simultaneous) button presses by any individual judge, registering only the highest numbered button pressed (HINT: sounds like a priority encoder ). Note that the three-judge vote total has the potential to range from 0 to 15, requiring 16 LEDs in the bar-graph display. To help the bewildered contestants quickly ascertain their status, your design should utilize the following LED color-coding scheme: green for scores in the range of 12- 15 (clear winner even Simon kind of liked you), yellow for scores in the range of 8-11 (split decision), red in the range of 1-7 (the competition is over for you), and blue for zero (signed Love is Like a Flower worse than Napoleon Dynamite ). For this problem, you need to complete the following steps: (a) Draw a block diagram of your design. Note that the main building blocks you need include 6:3 priority encoders, 4-bit binary adders, and a 4:16 binary decoder. ECE 270 Module 5 Practice Homework -2- Solution 2009 by D. G. Meyer ______________________________________________________________________________ (b) Create an ABEL source file for your complete solution, noting that nominally 18 inputs (six buttons for each of the three judges) and 16 outputs (all active low, for sinking current through the bar-graph LEDs) are required. MODULE idolbar TITLE 'RPS Idol Bar' DECLARATIONS " Pushbutton inputs (contact closure to ground " when pressed, therefore active low -- assume " pulled up to high state when button not pressed !RB0..!RB5 pin; " Randy's pushbuttons !PB0..!PB5 pin; " Paula's pushbuttons !SB0..!SB5 pin; " Simon's pushbuttons RV0..RV2 node istype 'com'; " Randy's encoded vote RV = [0,RV2,RV1,RV0]; RG node istype 'com'; " Randy's vote strobe PV0..PV2 node istype 'com'; " Paula's encoded vote PV = [0,PV2,PV1,PV0]; PG node istype 'com'; " Paula's vote strobe SV0..SV2 node istype 'com'; " Simon's encoded vote SV0....
View Full Document
- Spring '08