A continue lab of 'Lab1' as a part of the 'Embedded Systems' course. Using switches to control LEDs and generate sound. The program includes 3 modes, a binary counter, a shifter, and a fan, each one controlled by a specific switch, and controlling the LCD diaplsy. The code is written for the Basys MX3 board.
Turn on SW0, the counter will initiate with 0
and will binary count up to 255
.
Stage 0: ---- ----
Stage 1: ---- ---+
Stage 2: ---- --+-
Stage 3: ---- --++
.
.
.
Stage 37: --+- -+-+
.
.
.
Stage 255: ++++ ++++
Turn on SW1, the first LED will turn on and will shift one LED each time.
Stage 1: -------+
Stage 2: ------+-
Stage 3: -----+--
Stage 4: ----+---
Stage 5: ---+----
Stage 6: --+-----
Stage 7: -+------
Stage 8: +-------
Turn on SW2, the two middle LEDs will turn on and will shift to the sides.
Stage 1: ---++---
Stage 2: --+--+--
Stage 3: -+----+-
Stage 4: +------+
Turn on SW3 to change the direction of the action performed.
Turn on SW4 to change the speed of the action performed.
Turn on SW5 to pause any action that is performed.
Turn on SW6 to generate a sound by the speaker on the board.
Turn on SW7 to break from the loop and end the program.