Transcript Slide 1

PONG REDUX
Gregg Scranton
Ben Pratt
The Idea
• ATMega88PA chip controls the
game logic
• DAC and ADC interface analog
world with digital logic
• Oscilloscope used as the
display
• Paddles controlled by
potentiometers
Hardware
• 8-bit DAC
– SPI interface
• 10-bit ADC
– Only 8-bit precision
– Mux
• Two 10k potentiometers
– Voltage divider
SPI wires
Y voltage
X voltage
Hardware
• Tektronix 2445A analog oscilloscope
– Retains old-school feel
– Phosphor display offers better persistence
– Ball can be a single point
• Obstacles
– Buttons, knobs, and options! Oh, my!
– Trace “ghosting”
– Flickering
Trace
artifacts
Software
• Plotting points
• Ball movement
– Velocity & angle variables
• Collisions
– Checks against
ball/paddles/boundary
• Angle of reflection is affected by
angle and position of collision
• Embellishment
Software
• Main loop switches between
graphics and game logic
– Timing used to schedule processes
• ISR
– ADC, timer overflow
• SPI
Game
Over