This assignment introduces you to the software and hardware development tools you will use this semester to work with the Atmel AT90-series microcontroller (MCU) chips. You will use the STK500 development board to build a human reaction time tester. The STK500 pushbuttons, an external LCD, and the mcu will be used to see how fast you can push a button after a light flashes.
Project. When asked if you wish to use
CodeWizard, decline the offer. At this point, you have made a new project, now you need to configure it. The configure dialog should be open but if it is not, under the
Filestab, add the source code to the project you just defined.
Compilertab, set the Chip type to
After maketab, set the
Program the Chipcheckbox.
The Liquid Crystal Display (LCD):
A 16 character, two line (16x2), LCD display be used as a numerical display. The display we are using has an industry-standard interface. A more detailed data sheet for a similar display shows the command set. There are several aspects of the display you should note:
[LCD] [Mega32 pin] 1 GND- GND 2 +5V- VCC 3 VLC 10k trimpot wiper (trimpot ends go to +5 and gnd) 4 RS - PC0 5 RD - PC1 6 EN - PC2 11 D4 - PC4 12 D5 - PC5 13 D6 - PC6 14 D7 - PC7Trimpot schematic: Bottom view: Image:
eepromand assign it a value when declared, then the variable will be stored in nonvolitile memory. It will be initialized when the program is downloaded to the MCU, but not at RESET time. You can read the variable as often as you like, but you must write it very infrequently, usually only when something unusual happens, like a new high score or a serious error.
delayfunction, your program will not work correctly.
Produce an C language program based on the example above which:
Be prepared to demo the program you wrote to your TA in lab.
Your written lab report should include: