Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The objective of Lab 1 is to write a Verilog module that displays the message Hello xxxx or anything on the 7 - segment displays

The objective of Lab 1 is to write a Verilog module that displays the message Hello xxxx or anything on the 7-segment displays of your FPGA prototype board. To do this you will write a Verilog module that converts the ASCII. Problem 1) Complete the code above for all 26 letters and 10 numbers not just the ones you need for
your test.
Problem 2) Next you need to write the parent module in which the code above is an instance. This parent module that instantiates ASCII27Seg to display Hello OLH(replace with your initials) should look something like this in Verilog. Note, if you run a simulation of ASCIICodes you must force Kkey0 to 0 or 1 for it to choose a message. You can choose a ASII radix in ModelSim which will cause it to show Hello and OLH for the message, but you might as well use a radix of binary for the HexSeg variables. They are not ASCII codes and will not look in ModelSim like the letter or number.
Code is giving me errors please help me to correct them:
// ASCII to 7segment display coversation
module ASCII27Seg (input [7:0] AsciiCode, output reg [6:0] HexSeg);
always @(*) begin
HexSeg =7'd0// initialization of variable HexSeg
$display("AsciiCode %b", AsciiCode);
case (AsciiCode)
//Letter A
8'h41 : HexSeg[3]=1;
//Letter a
8'h61 : begin
HexSeg[3]=1;
end
//Letter B
8'h42 : begin
HexSeg[0]=1; HexSeg[1]=1;
end
//I finished the 1st part
default : HexSeg =8'b11111111; // Turn all the bits by default
module ASCIICodes (input Kkey0, output [6:0] HexSeg4, HexSeg3, HexSeg2, HexSeg1, HexSeg0);
reg [7:0] Message [4:0];
always @ (*) begin
Message [4]="H"; // Initialization of the message in each pass
Message [3]="E";
Message [2]="L";
Message [1]="L";
Message [0]="0";
case(Kkey0)
1'b1 : begin
Message [4]="S"; // Case for a parallel structure
Message [3]="T";
Message [2]="E";
Message [1]="V";
Message [0]="E";
end
default : begin
Message [4]="H"; // Default to set message in every case
Message [3]="E";
Message [2]="L";
Message [1]="L";
Message [0]="0";
end
endcase
end
ASCII27Seg SevH4(Message [4], HexSeg4);
ASCII27Seg SevH3(Message [3], HexSeg3);
ASCII27Seg SevH2(Message [2], HexSeg2);
ASCII27Seg SevH1(Message [1], HexSeg1);
ASCII27Seg SevH0(Message [0], HexSeg0);
endmodule

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Database Systems With Internet And Java Applications

Authors: Greg Riccardi

1st Edition

020161247X, 978-0201612479

More Books

Students also viewed these Databases questions