Presentation is loading. Please wait.

Presentation is loading. Please wait.

Last week’s project demos RC circuit with creative use of 7- segment display Demo in class tonight – don’t start on the next project until I’ve seen this.

Similar presentations


Presentation on theme: "Last week’s project demos RC circuit with creative use of 7- segment display Demo in class tonight – don’t start on the next project until I’ve seen this."— Presentation transcript:

1 Last week’s project demos RC circuit with creative use of 7- segment display Demo in class tonight – don’t start on the next project until I’ve seen this one!

2 More circuit design Digital Potentiometer

3 Similar in function to the potentiometer Different in that it is controlled electronically rather than mechanically

4 Pin out Clock pulses to set the wiper Logic signal to set the direction Terminal A Terminal B Wiper Terminal And don’t forget to hook up Vdd, GND (Vss), and Chip-Select-bar (Vss)

5 Programming Set the direction with a LOW or HIGH command Send the desired number of pulses [0..127] to the clock ‘ reset to the “low” direction potentiometerreset: LOW digpotupdown FOR counter = 0 TO 127 PULSOUT digpotclock, 1 PAUSE 10 NEXT RETURN

6 Assignment (in class) Drive the standard servo motor with the digital potentiometer –Same as we did with the mechanical potentiometer but now software controlled

7 Final Project Simple Simon –A repeat the sequence game –Four different tones tied to four buttons

8 Start of Play Simple Simon plays all four tones, one at a time, in sequence The first tone is affiliated with the first button, second tone with the second button, etc. Simple Simon then randomly selects a tone and plays it Set the time between tones for sequence generation The player must press the button that is associated with the tone –If the correct button is pressed, play resumes (next slide) –If the correct button is not pressed, play ends

9 Resume Play Simple Simon adds a new tone to the end of the sequence and plays the entire sequence from the beginning with tones spaced by the set time The player must press all the buttons associated with the tones in the proper sequence –If the correct buttons are pressed, play resumes –If the correct buttons are not pressed, play ends

10 End Game Simple Simon should keep track of the highest score (length of longest sequence repeated) since the reset button was pressed (start of game) When a play ends (incorrect button press or maximum score of 9 correct is achieved) Simple Simon should –Play a “happy sound” and “dance” the green-segment of a bi-directional LED if the previously stored longest score was achieved or surpassed –Play a “sour sound” and “dance” the red-segment of a bi- directional LED if the previously stored longest score was not achieved or surpassed –High score should be displayed on the debug monitor –If the high score is achieved the time between tones (when generating a sequence) is reduced for the next game

11 Alternate (unused) End Game Simple Simon should keep track of the highest score (length of longest sequence repeated) since the reset button was pressed (start of game) When a play ends (incorrect button press) Simple Simon should –Play a “happy sound” and “dance” the 7-segment display if the previously stored longest score was achieved or surpassed –Play an “unhappy sound” if the previously stored longest score was not surpassed High score should be displayed on a 7-segment display (up to 9)

12 Deliverables Due week 11 –A functional description of the system –Bill of Materials (parts list) –A state-machine diagram depicting the operation of the system –A test plan for both hardware and software Unit test and integrated test –Source code –A schematic diagram of the circuit –A working demonstration on the Basic Stamp development board (in class)

13 Deliverables The final paper should be of professional quality –Sections, section headings, table of contents, clear legible diagrams, writing free of grammatical errors, etc. All submissions must be printed and handed in! –You can turn in your reports via email TOO, but not email ONLY

14 Grading 40% working system 60% write-up –Accuracy of report (40%) Proper use of schematic symbols Proper use of state diagram symbols Comments within and structure of source code –Neatness of report (20%) Equal to 4 projects when figuring your final course grade


Download ppt "Last week’s project demos RC circuit with creative use of 7- segment display Demo in class tonight – don’t start on the next project until I’ve seen this."

Similar presentations


Ads by Google