CE 433 Spring 2022 USB Tutorial Taylor Nakai tsnakai@fortlewis.edu
Introduction: In this homework,
we focused on interfacing a keyboard to the Basys 3 board as the
PIC24FJ128 microcontroller on the Basys 3 board allows USB HID host
capability. The PIC24FJ128
microcontroller converts the USB input to standard PS/2 signal to
communicate with a keyboard. We were tasked with using the Basys 3 as a
receiver and the keyboard as a receiver to indicate which key had been
pressed. Task 1: In
Task 1, we were given the task of implementing the code give to display
the scan code in the upper 8 bits of the LEDs and which key had been
pressed (1-8) in the lower 8 bits of the LEDs. Figure 1 shows the code
used to implement this. Figure 2 shows the demonstation showing the
implementation in action.
Figure 1. Code used to implement displaying the scan code in the upper 8 bits of the LEDs and which key had been pressed (1-8) in the lower 8 bits of the LEDs.
Figure 2. Demonstration of displaying the scan code in the upper 8 bits of the LEDs and which key had been pressed (1-8) in the lower 8 bits of the LEDs. Task 2: In Task 2, we needed to make some modification to be able to show the value of the key pressed in the serial monitor. Figure 3 shows the code used to implement this. Figure 4 shows the demonstation showing the implementation in action.
Figure 3. Code used to show the value of the key pressed in the serial monitor.
Figure 4. Demonstration of showing the value of the key pressed in the serial monitor.
Discussion: By
completing this homwork, it allowed me to become more comfortable using
the USB receiving module, UART TX operation protocals associated
with the Basys3. I really enjoyed reading what key had been pressed on
the keyboard and displaying it in the terminal and on the Basys 3
board's LEDs. I really liked this tutorial as it was something that I
never have explored. Overall, I think this homework was a great
introduction into using the USB and UART protocal that the Basys3 has
to offer. I look forward to the next! ....................................................