`timescale 1ms / 1ns module lcd_writer_tf ( output reg write_button, output reg reset_button, output [7:0] switches); // All times are in milliseconds // This determines how long to wait for the LCD initialization // If your circuit takes longer to initialize the LCD you can increase this delay parameter INITIAL_DELAY = 2; parameter MSG_LEN = 6; reg [7:0] message [MSG_LEN-1:0]; integer curr; assign switches = message[curr]; initial begin message[0] = "H"; message[1] = "e"; message[2] = "l"; message[3] = "l"; message[4] = "o"; message[5] = "!"; reset_button = 1; output_data; $display("Testing reset"); reset_button = 0; #0.01 reset_button = 1; output_data; $display("Done sending data"); $stop; end task output_data; begin curr = -1; write_button = 1; #INITIAL_DELAY while (curr < MSG_LEN - 1) begin curr = curr + 1; #0.01 write_button = 0; #0.01 write_button = 1; #0.05 ; end end endtask endmodule