28905 Parallax Inc, 28905 Datasheet - Page 6

no-image

28905

Manufacturer Part Number
28905
Description
Interface Modules & Development Tools AVRSimon Game Kit
Manufacturer
Parallax Inc
Datasheet

Specifications of 28905

Lead Free Status / RoHS Status
Lead free / RoHS Compliant
How it Works
Hardware
The schematic is available from the AVRsimon product page; search “28905” at www.parallax.com.
Like the original game of Simon, AVRSimon’s user interface is simple, comprising four buttons, four LEDs,
and a buzzer for playing sounds. AVRSimon runs on an Atmel ATtiny2313V, an 8-bit AVR microcontroller.
One side of each button (SW1, SW2, SW3, SW4) is connected to Port B 1, 4, 0, and 3, respectively. The
other side of the buttons are connected to ground. The internal pull-up resistor (with a value between
20 kΩ and 50 kΩ, according to the ATtiny2313V data sheet) is enabled on each of the Port B pins,
removing the need for four external resistors. The buttons are active low, so the microprocessor normally
sees a high signal (‘1’), due to the pull-up resistor, when the button isn’t being pressed. When a button is
pressed, the microprocessor sees a low signal (‘0’).
The cathodes of the four LEDs, matching the four colors of the original Simon game (D1 red, D2, blue,
D3 green, D4 yellow), are connected to Port D 0, 3, 1, and 2, respectively. A current limiting resistor (R1,
R3, R4, R2) connected to VCC is used in series with each LED to limit the amount of current allowed to
flow through the LED, which sets the brightness and prevents excessive current from damaging the LED.
Like the buttons, the LEDs are active low and set up in a current sink configuration, meaning they will
turn on when the output signal on one of the Port D pins is low (‘0’). When we want to turn an LED off,
we simply set the corresponding pin’s output value to high (‘1’). Each port pin on the ATtiny2313V can
safely sink 20 mA, which is well above what the LEDs on AVRSimon require - when the red LED is on, it
requires 1.3 mA, the green 3.0 mA, blue 0.13 mA, and yellow 3.2 mA.
One side of the piezo buzzer, LS1, is connected to ground and the other side is connected to Port B 2 via
R6, a current-limiting resistor. Instead of using the general purpose I/O function as with the button
inputs and LEDs, Port B 2 is used as its special function, Output Compare for Timer 0, which output
waveforms that will drive the piezo buzzer.
Turning the game on and off is achieved with a simple slide switch used in an SPST configuration that
connects and disconnects the battery supply from the VCC bus of the circuitry. The system is powered
with a single CR2032 3V Lithium coin cell, which is easy to obtain from any local drugstore, convenience
store, or electronics outlet. The CR2032 has a very nice current capacity for its size (20mm in diameter)
of approximately 225 mAh, although the lithium battery chemistry works best for applications requiring
very low current discharge over months or years of use. Its maximum recommended continuous
discharge is 3 mA, which is what AVRSimon draws during gameplay. When the game is not being used
and while the system is waiting for a button press to begin a new game, U1 is placed into a sleep mode
and current consumption is reduced to a scant 19.5uA. With typical gameplay of a few hours a day, a
single battery should last more than a month.
There are a few other discrete components used in this design: C1 is a standard bypass/decoupling
capacitor connected close to the VCC input of U1. R5 is a pull-up resistor connected to the active-low
/RESET line of U1 that keeps the microcontroller operating properly (e.g., not resetting) unless the pin is
intentionally pulled low, which will only be done if you take advantage of the AVR In-System
Programming (ISP) functionality. P1 is the standard 6-pin AVR ISP header. This is an optional part that is
only required if you plan on making changes to the firmware and want to reprogram U1 while it is in-
circuit.
Copyright © Parallax Inc.
AVRSimon Game Kit (#28905)
v1.0 3/22/2010 Page 6 of 10

Related parts for 28905