Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Task 2 was to make a counter that, like the one in Task 1, counts up from 0 to F, except this time, on two 7-segment displays

Image Removed

, and in 8-bit binary. I only had to make a few changes from the files in Task 1. First of all, the counter for this goes up to 8 bits (0 to 7) instead of 4 (0 to 3). Next, I split the counter output into two halves-- one for the first seven-segment display (the ones' place) and another for the second (the tens' place). This was because the higher half of the counter is linked to the first set of 4, and after that, it naturally goes on to the first bit in the tens' place, then resets all the others below to zeroes again, meaning that linking the first four (left to right) bits to the tens' place output and the last 4 bits to the ones' place output would work. For instance, 0000 1111 would be 0F, then on the next count up, it would be 0001 0000, or 10. Therefore, the outputs displayed on the breadboard range from 00 to FF, or 0 to 255. The information on the segments for the provided number is input into the display, and this is done for both the first and second displays. An image of my block design is shown below:

Image Added

For Task 3, we had to build a circuit that adds two user-determined 4-bit binary numbers. Instead of a counter, the idea was to use 4 switches to control each bit of a 4-bit number. There would be 8 switches in total that would be used, the first four for the first addend and the next four for the second addend. The screen would display the sum in hexadecimal, on two seven-segment screens, much like the way the numbers showed up in Task 2. I started off having 8 inputs, connected to the adding driver I made in VHDL (called "P2Part3driver" here). The adder takes all of the inputs, adds them, and puts the first four (right to left) bits into the displaying driver. The most significant bit, result[4], goes through an AND gate (which was done to assign it to a new variable), then goes through the displaying driver. Both seven-segment displays then work together to show the result of adding any 4-bit binary numbers in hexadecimal.