# Storing and Moving Text Solution

\$35.00 \$30.80

Category:

## Description

PURPOSE  In this lab you will design a circuit capable to store short messages and to display them as a scrolling marquee on the four 7-segment LEDs.

—————————————————————————

1. Writing the Verilog description

You will have to design a circuit that can store and display an arbitrary message which has been entered character by character by the user. The characters will be entered using the 8 DIP. For simplicity, you may assume that the total length of the entered message will be no longer than 20 characters. To remain consistent you must use the following mappings for the DIP switches:

SW7 – segA, SW6 – segB, SW5 – segC, SW4 – segD, SW3 – segE, SW2 – segF, SW1

– segG, SW0 – segDP

You will use the three push-buttons to determine the state of your machine. All possible states of the machine are given below:

 BNT2 BNT1 BNT0 Function 0 0 0 Displaying and moving text to the left. 1 1 0 User can modify the DIP switches. The pattern is  displayed  in  real  time  on  the rightmost  7-segment  LED,  while  ‘L’  is displayed on the leftmost 7-segment LED. 1 1 1 The last characters is stored and displayed on  the rightmost  7-segment  LED, while ‘o’ is displayed on the leftmost 7-segment LED. 0 1 0 RESET – All previous stored characters are  cleared  (set  the  index  for  stored characters back to 0). All other possible values Same as ‘000’

In other words, when (BTN2, BTN1, BTN0) = (110), the user modifies the switches to the letter they want to be loaded and stored. Then, when (BTN2, BTN1) = (11) and BTN0 goes from 0 to 1, the letter is loaded and stored into the proper register. To load and store the next letter the user only needs to set BTN0 = 0 again (let go of the pushbutton), modify the switches, and then to switch the BTN0 from 0 to 1. These actions take place as long as the user wants to introduce letters or the blank character (the blank character is simply an “empty” character, when nothing is displayed by the 7-segment LED).

IMPORTANT NOTE: FOR THE FIRST WEEK YOU SHOULD COMPLETE UP TO AT LEAST THE POINT WHERE YOU CAN STORE AND DISPLAY A SINGLE STATIC CHARACTER ENTERED BY THE USER

When the user sets (BTN2, BTN1, BTN0) = (000), the stored text is displayed using the four 7- segment digits in a “moving to the left” fashion. For example, if the input message is “EE4301 CLASS” then during the first second the four 7-segment LEDs will display “EE43”, then during the next second they will display “E430”, then during the third second they will display “4301”, and so forth until the entire stored message is displayed. This is repeated indefinitely with 1 blank between any two repetitions until the resetting combination is detected. After resetting the user will have to introduce again the wanted text in the known manner. Don’t forget to check the case where your try to display moving text without any previous input (in this case, you can display nothing during the 000 state). Also test the case for displaying only a single input. In this case you should only display the one static character. Also, you should keep track of how many characters have been entered in total, so that you only display those characters, and then repeat, without having several blanks at the end if the message is shorter than 20 characters.

1. Verification

Synthesize and implement the circuit. You will have to write an .xdc file to have correct pin assignments. Download the bit-stream file to the board and try different short reasonable texts. Show your design to your TA for full credit.

—————————————————————————-

SUMMARY — In this lab you designed and verified “moving text” circuit.

—————————————————————————-