Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

coolrunner II and DIo4 interconnect

Status
Not open for further replies.

bbgil

Full Member level 2
Joined
Mar 11, 2006
Messages
135
Helped
13
Reputation
26
Reaction score
9
Trophy points
1,298
Activity points
2,321
I'm currently using coolrunner ii Xc2c256cxl as my system board and DI04 as my I/O board. Using verilog, i am having problem turning on the 7-sement display. any link or verilog code that help me understand how to implement this is well appreciated. attached is my verilog code. the problem is the 4 common anode lines, how to turn it on inside my code.

module seg_disp(input b1, b2, b3, b4, output SA,SB,SC,SD,SE,SF,SG);

wire [3:0] HEX = {b4, b3, b2, b1} ;
reg [6:0] led;
assign { SG, SF, SE, SD, SC, SB, SA} = led;

always @(HEX)
case (HEX)
4'b0001 : led = 7'b1111001; // 1
4'b0010 : led = 7'b0100100; // 2
4'b0011 : led = 7'b0110000; // 3
4'b0100 : led = 7'b0011001; // 4
4'b0101 : led = 7'b0010010; // 5
4'b0110 : led = 7'b0000010; // 6
4'b0111 : led = 7'b1111000; // 7
4'b1000 : led = 7'b0000000; // 8
4'b1001 : led = 7'b0010000; // 9
4'b1010 : led = 7'b0001000; // A
4'b1011 : led = 7'b0000011; // b
4'b1100 : led = 7'b1000110; // C
4'b1101 : led = 7'b0100001; // d
4'b1110 : led = 7'b0000110; // E
4'b1111 : led = 7'b0001110; // F
default : led = 7'b1000000; // 0
endcase



endmodule
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top