last week’s project demos rc circuit with creative use of 7- segment display demo in class tonight...

14
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!

Upload: tamsin-hensley

Post on 03-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 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

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!

Page 2: 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

More circuit design

Digital Potentiometer

Page 3: 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

Digital Potentiometer

• Similar in function to the potentiometer

• Different in that it is controlled electronically rather than mechanically

Page 4: 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

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)

Page 5: 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

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” directionpotentiometerreset:LOW digpotupdownFOR counter = 0 TO 127 PULSOUT digpotclock, 1 PAUSE 10NEXTRETURN

Page 6: 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

Assignment (in class)

• Drive the standard servo motor with the digital potentiometer– Same as we did with the mechanical

potentiometer but now software controlled

Page 7: 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

Final Project

• Simple Simon– A repeat the sequence game– Four different tones tied to four buttons

Page 8: 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

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

Page 9: 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

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

Page 10: 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

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

Page 11: 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

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)

Page 12: 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

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)

Page 13: 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

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

Page 14: 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

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