Hi.
Here's some code that I used to display digits/letters on the 7-seg displays:
module set_7seg_displays ( // *** Inputs *** input wire clk_50mhz, // System clock. (50 MHz) input wire btn, // Button 0. (Active High).
// *** Outputs *** output reg [3:0] digit,// 7-seg display enables. (Active Low). output reg [7:0] seg // 7-Segment display. (Active Low).
);
// 7-Segment display. seg[7:0]={ca, cb, cc, cd, ce, cf, cg, dp}. wire rst_n; // System Reset. (Active Low). reg [25:0] slow_cnt_h; reg slow_clk_2h; reg slow_clk_h; reg [1:0] cd;
// Assign reset to a button push. assign rst_n = ~btn;
// *** Create a 2x 7-Seg display clock *** always @(posedge clk_50mhz or negedge rst_n) begin : CLK_GEN_2x_7SEG if (!rst_n) begin slow_clk_2h