I'm wanting to include a text LCD display in a project I've implemented on a FPGA in verilog, but it seems this is causing me more confusion than the project itself. I think this down in part to state machines and becoming focused on ensuring I have a solid initialization by instruction of the LCD with proper comms timings. Perhaps I am getting way ahead of myself here...
I am using a 1602 display, with a HD44780 controller (datasheet
https://www.sparkfun.com/datasheets/LCD/HD44780.pdf). I'm trying to implement the startup on page 45, as well as ensure I have proper timings (page 52). At the moment I think my biggest trouble is implementing timings greater than what is required using my 48MHz clock. Would a sensible approach be to set up a state machine for pg 45, with a bunch of if's in each state controlling delay counters for the delays on page 45, as well as a bunch of ifs controlling the delays required on page 52 for each line? I've tried doing this but it just seems to be getting messier and messier.
Or would it be better to reduce the clk speed for the state machine such that the timings on pg 52 are irrelevant?
I've tried looking for implementations elsewhere online, but I cannot seem to get any of them to work, regardless of how simple they appear. I'd really like to get something working myself though too... I'm 99% certain I've connected the LCD correctly too.
Apologies for the rambling post.
EDIT: I do have some code I've started writing if you'd like to see the mess I'm getting into...