Вы находитесь на странице: 1из 7

SCHOOL OF TECHNOLOGY

College of Engineering
Summer, A. Y. 2015 2016
ECE/CPE Elective 4
Midterm Machine Problem 3
Date of Submission:

3:30 PM, June 3, 2016

Guideline for Submission:

Compressed and upload (Schoology) your MP3 folder using this format:
LastNameMember1_LastNameMember2_ LastNameMember3.zip

UART-based Rotating Banner


A rotating banner on the monitor screen moves a line from right to left and then wraps around.
It is similar to the Window's Marquee screen saver. Let the text on the banner be "ELE4". The banner
should be displayed in four font sizes, eight font color and eight background color. It can also travel at
four different speeds. The said features and other functionalities are controlled by UART commands.
UART Commands
All UART commands are sent through serial port in HEXADECIMAL FORMAT. The settings for UART
are as follows: baud rate --> 19200, 8 data bits, no parity and 1 stop bit.

Base Format
CONTROL
| Head (AA) | Length| Command | Data | End (0A) |
Length = L(Length + Command + Data)
RETURN
| Head (AA) | Length| Command | Data | End (0A) |
Length = L(Length + Command + Data)
NOTE: Data area is different with different with commands.

Code
FRAME CODE
AA--> Frame Head
0A --> Frame End
CHECK
00 --> Check System Settings
01 --> Check Default Text

SYSTEM SETTINGS
10 --> Restore System Settings
11 --> Set Background Color
12 --> Set Font Size
13 --> Set Font Color
14 --> Set Speed
15 --> Set Number of Characters
16 --> Set Spaces between Repeated Texts
BANNER CONTROLS
20 --> Go
21 --> Pause
22 --> Change Direction
23 --> Load Characters

Details
Check System Settings (00)
Use "Check System Settings" command to check current settings of the Rotating Banner, include
background color, font size, font color, speed, number of characters, and spaces between repeated texts.
Format:
| AA | 02 | 00 | 0A |
Return:
| AA | 08 | 00 | BC | FS | FC | SP | NC | SR | OA |

BC

FS

FC

Description
Background Color
0 black (default)
1 blue
2 green
3 cyan
4 red
5 magenta
6 yellow
7 white
Font Size
0 16 x 32
1 32 x 64
2 64 x 128 (default)
3 128 x 256
Font Color
0 black
1 blue
2 green
3 cyan
4 red (default)
5 magenta

SP

NC

SR

6 yellow
7 white
Speed
0 Slow (default)
1 Moderate
2 Fast
3 Very Fast
Note: Define your own scheme
Number of Characters
Range: 1 64
16 characters (default)
Spaces between Repeated Texts
Range: 0 16
4 spaces (default)

Check Default Text (01)


Use "Check Default Text" command to check the default text, ELE4, of the Rotating Banner.
Format:
| AA | 02 | 01 | 0A |
Return:
| AA | 06 | 01 | 45 | 4C | 45 | 34 | OA |
Restore System Settings (10)
Use this command to restore settings of the Rotating Banner to default.
Format:
| AA | 02 | 10 | 0A |
Return:
| AA | 03 | 10 | 00 | 0A |
Set Background Color (11)
Use this command to change the background color of the display.
Format:
| AA | 03 | 11 | BC | 0A |
Return:
| AA | 03 | 11 | 00 | 0A |

BC

Description
Background Color
0 black (default)
1 blue
2 green
3 cyan
4 red
5 magenta
6 yellow
7 white

Set Font Size (12)


Use this command to change the font size of the text.
Format:
| AA | 03 | 12 | FS | 0A |
Return:
| AA | 03 | 12 | 00 | 0A |

FS

Description
Font Size
0 16 x 32
1 32 x 64
2 64 x 128 (default)
3 128 x 256

Set Font Color (13)


Use this command to change the font color of the text.
Format:
| AA | 03 | 13 | FC | 0A |
Return:
| AA | 03 | 13 | 00 | 0A |

FC

Description
Background Color
0 black
1 blue
2 green
3 cyan
4 red (default)
5 magenta
6 yellow
7 white

Set Speed (14)


Use this command to change the speed of the displayed text.
Format:
| AA | 03 | 14 | SP | 0A |
Return:
| AA | 03 | 14 | 00 | 0A |

SP

Description
Speed
0 Slow (default)
1 Moderate
2 Fast
3 Very Fast
Note: Define your own scheme

Set Number of Characters (15)


Use this command to change the maximum number of characters of displayed text.
Format:
| AA | 03 | 15 | NC | 0A |
Return:
| AA | 03 | 15 | 00 | 0A |

NC

Description
Number of Characters
Range: 1 64
16 characters (default)

Set Spaces between Repeated Texts (16)


Use this command to change the number of spaces between repeated texts.
Format:
| AA | 03 | 16 | SR | 0A |
Return:
| AA | 03 | 16 | 00 | 0A |

SR

Description
Spaces between Repeated Texts
Range: 0 16
4 spaces (default)

Go (20)
Use this command to assert the rotation of the displayed text. The banner is rotating the default text
ELE4 after its reset state.
Format:
| AA | 02 | 20 | 0A |
Return:
| AA | 03 | 20 | 00 | 0A |
Pause (21)
Use this command to pause the rotation of the displayed text.
Format:
| AA | 02 | 21 | 0A |
Return:
| AA | 03 | 21 | 00 | 0A |

Change Direction (22)


Use this command to change direction of rotation of the displayed text.
Format:
| AA | 03 | 22 | CD | 0A |
Return:
| AA | 03 | 22 | 00 | 0A |

CD

Description
Change Direction
0 From right to left (default)
1 From left to right

Load Characters (23)


Use this command to change the content of the displayed text.
Format:
| AA | 02+n | 23 | C0 | | Cn | 0A |
Return:
| AA | 03 | 23 | RE | 0A |
C0 Cn are characters in ASCII code format
Note: The number of characters should be less than or equal to the maximum characters minus the
number of spaces.

RE

Description
Response
0 Okay
1 The number of characters is greater than the maximum
characters minus the number of spaces.

The following are the file names in implementing the UART-based Rotating Banner:
Verilog Top Module:
uart_vga_banner_top.v
Verification Module: uart_vga_banner_top_tb.v
User-constraint file:
uart_vga_banner_top.ucf
Submission Details
All parts of this lab are to be submitted on Schoology. No hard-copy submission is needed.
IEEE Documentation, include the following Abstract, Introduction, Methodology, Results and
Discussion, Conclusions and Short Members Profile (Grade Assignment, Seatwork and Short
Quiz)
All Verilog code
Any testbench code or do-files that you use
[filename].bit files from compilation
UCF file

Checkout Details
During your checkout you will be expected to demonstrate the machine problem (both simulation
and implementation if required for the problem) and answer verbal questions about the problem.

Вам также может понравиться