HOME
Lab components |
CSE
477: Embedded System Design
(Spring 2002) |
Lab
1:
Introduction to Microcontrollers (Part I) Objectives: This lab will require you to:
Getting Started There are some on-line tutorials that are a pretty good introduction to using the Keil environment. Find the CD folder in the Keil folder and run the SETUP.EXE program. This will give you a menu - you want the "Tutorials and Training" option. The three tutorials, "Creating Projects", "Testing and Debugging" and "Advanced Simulation" are all worthwhile (just ignore the market-speak). There are also Keil manuals in the lab, the on-line Help from within Keil, and the following links:
Here is about the simplest program you can imagine. Start a project,
type in this program (or cut and paste) and then use the debugger to step
through the program, watching the registers and the output port P0.
When you make your project, use the SMALL code size and SMALL data size.
#pragma code #include <reg51.h> void main() {
while (1) {
Your Second Program Once we get to running this program on the microcontroller, we are going to connect the port P0 to one of the 7-segment displays. Write a program that turns on one segment at a time, rotating the segment in a circle using the outside 6 segments. For now don't worry that the segments will rotate too fast - we'll fix that later. What to Turnin Turn in your C program that rotates the 7-segment display LEDs.
|
|
BACK
TO TOP
Last Updated:
|
Contact the instructor at:cse477-webmaster@u.washington.edu
|