You will probably want to use code we have written for the practicals to create your own programs. Here is a list of each lab file along with the things it actually illustrates:
|
Exercise |
Objective |
|
Setting a single bit on PORTA | |
|
Setting three bits and then turning them off | |
|
Using a while loop to turn a led on and off | |
|
Flashing a led using for loops to produce proper delays | |
|
Flashing two LEDs in an imitation of a railway crossing light | |
|
Pulsing a led with a different "mark-space" ratio | |
|
Flashing a led using a delay function | |
|
A flashing led which speeds up and slows down | |
|
Using an input port to implement a simple light switch | |
|
Using two buttons for input, one for on and another for off | |
|
Using a single button to toggle the state of an output | |
|
Debounced version of the light switch toggle | |
|
Push on-push off torch with light time out | |
|
Reversed light switch | |
|
Two button torch which turns off if both buttons are held down | |
|
Push on-push off torch with light time out except when the button is held down | |
|
Electronic coin toss | |
|
Display a pattern | |
|
Display a pattern with delay | |
|
Display a pattern with different on/off times | |
|
Delayed input test | |
|
A single working round of the 'Simon Says' game | |
|
Unpolished working Simon Says game | |
|
Polished Simon Says game | |
|
7 segment LED four digit display driver using program refresh | |
|
7 segment LED four digit display driver using program refresh which works properly | |
|
7 segment LED four digit display driver using refresh function | |
|
7 segment LED four digit display driver using interrupt refresh | |
|
7 segment LED counter with numeric display | |
|
1 Hz ticking clock | |
|
Stopwatch with stop, start and reset buttons. | |
|
Stopwatch with single stop/start button using interrupt driven debounce | |
|
Stopwatch with decimal point and lap timer button | |
|
LCD driver program | |
|
LCD program which uses lcdutils to drive the display | |
|
LCD program which tests every position on the display | |
|
Random number generation testing program | |
|
Display flicker program | |
|
Mystic LCD Message selector with bugs! | |
|
Fixed Mystic LCD Message Selector | |
|
Final Mystic LCD program | |
|
EEPROM test program | |
|
Integer reading program | |
|
Lock timer which uses interrupts to time the lock open pulse | |
|
Finished lock program | |
|
Sleep function tester | |
|
Finished lock with sleep | |
|
Reaction timer button state monitor | |
|
Reaction timer button state monitor with clock | |
|
Completed Reaction Timer | |
|
Reaction Timer with improved button handling | |
|
Morse reader state machine demonstration | |
|
Morse reader with character decoding | |
|
Complete Morse reader | |
|
Complete Morse reader with handing for long characters | |
|
ADC test program |
|
|
Light level bar graph |
|
|
Automatic night light |