Project 1: LED Blinkers with User I/O and LCD Display
This Project uses a Motorola 9S12XCPUV2 microcontroller to control 2 pairs of LED lights, a Hexadecimal Keypad, and a 2 line LCD display screen. The objective of the project was to create a cooperative input/output device where users can enter a range of 16 bit unsigned decimal numbers to set the period of each pair of LED lights. The 16 bit unsigned decimal entered represents the period in terms of milliseconds. The LED lights are programmed to blink in an alternating pattern based on the period entered. The display echos the digits entered and displays error messages back to the users when the magnitude of the period entered is outside the range of 16 bit numbers (1 - 65,535). Each pair of LEDs are controlled separately and can be set to different periods by the user. The keypad allows 0-9 to be pressed and ignores letter keys. It additionally uses the F1/F2 keys to determine the LED pair being set and the enter key to start the LED blinkers. Backspace functionality has been programmed into the keypad.
Finite State Machines:









Assembly Code:
Project 2: I/O Function Generator
This Project uses a Motorola 9S12XCPUV2 microcontroller to control a Hexadecimal Keypad and a 2 line LCD display screen in order to generate different wave forms on an Oscilloscope . The objective of the project was to create a cooperative input/output device where users can enter a range of 1 byte unsigned decimal numbers to set the number of interrupts per 1 millisecond to create the waveform period. The display echos the digits entered and displays error messages back to the users when the magnitude of the period entered is outside the range of 8 bit numbers (1 - 255). Four types of waveforms can be generated: a seven-segment sine wave, a fifteen-segment sine wave, a square wave, and a sawtooth wave. The keypad allows 0-9 to be pressed and ignores letter keys and the F1/F2 keys. Backspace functionality has been programmed into the keypad only when entering the number of interrupts not the waveform type number. The Oscilloscope is hooked up to our microcontroller through the DAC A output.
Finite State Machines:





Assembly Code: