Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

European University of Lefke

Lab Manual
Faculty of Engineering
COMP362/EE320/ECE308 4 - Port manipulation
Contains 2 tasks
Microprocessor systems
Student number: Name:

1 Ports In
In this task you are required to create a circuit that contains 4 switches (use buttons in the lab). Read values of
these switches all at once, treating input as a 4-bit binary number. Display the number in the Serial terminal.
Draw your circuit and write your program on this page.
2 Ports out
Modifying your previous program, interpret buttons as 2 3-bit numbers, use bit manipulation techniques to split the
number into two. Then sum these numbers and display the output as a binary number using 4 LEDs. Use your
program to verify correctness of the output. Draw your circuit and write your program on this page. Additionally,
show one of the states of your program by drawing state of the switches and LED on your circuit.

You might also like