CE 433 Embedded Devices

HW7: UART
Name: Lucien Verrone
Email: ljverrone@fortlewis.edu

Introduction:

This assignment was an introduction to the UART communication protocol, but sending and recieving data.

Task 1:

Task one was to create a  program that countes the number of button presses using a debounce module and displays this count (from 0-9) on the seven segment display.
`
Figure 1: Button counter SSD code
 
Figure2: Button counter SSD demonstration

Task 2:

Task two was to modify the code from task one to transmit ASCII characters to the serial port of the connected computer. These ASCII character values are increased by one every button press.

Figure 3: UART Tx sending to serial monitor code
 
Figure 4:
UART Tx sending to serial monitor demonstration.

Task 3:

Task three was to take input from the serial monitor of the connected computer rather than outputting to the serial monitor. The ASCII code is displayed on the first eight LEDs of the FPGA board, while the parity and error bits being LEDs 8 and 9 respectively, and the rest of the LEDs being a counter of how many times data has been recieved.

Figure 5: UART Rx recieving from serial monitor code.

Figure 6: UART Rx recieving from serial monitor demonstration.

Task 4:

Task four was to combine tasks one and three, creating a program that takes input from the serial monitor of the connected computer and displays the corisponding number (0-9) on the seven segment display. The top module below uses the same UART Rx control module as in task three.

Figure 5: Recieving from seerial monitor and outputting to SSD code.

Figure 6: Recieving from seerial monitor and outputting to SSD demonstration.

Discussion:

This assignment gave me an introduction to the UART commmunication protocol. Though the assignment were straight forward, I had an issue where my FPGA board would return an error for the LEDs for numbers 3, 5, 6 and 8 from the serial monitor. I still do not know what caused this, and the problem fixed itself the morning after when I reprogrammed the board.  Overall I feel more confdent dealing with communication protocols in the future, and it was really cool to program what I had used in Arduino projects many times