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.

DE2 LCD Display Character of Inputs One by One using Verilog HDL

Status
Not open for further replies.

michie

Newbie level 3
Joined
Sep 6, 2013
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
32
Hi, this is my first time using the LCD module on DE2. I need a clear to clear the display and also I need to display the character on the LCD after I input the input data, which means, when I get an input data from previous module, the one data will be displayed. The input data has been processed by previous module and the data input to this LCD modules will be the 9-bit data, including the RS data and LCD data. My concept is to set the position of data and send it to the LCD data and then send the input data to the LCD data again to display one character. I get the coding which is working to display out the whole 16x2 data and edit it to display character one by one. I am not sure why my coding is not working as I am only able to clear the display. I have tried it for few days but still unable to find out the causes. Can anyone please help to find out or correct the mistakes, please? Thanks a lot!!!
 

Attachments

  • LCD_controller.txt
    1.4 KB · Views: 5
  • LCD_data.txt
    3.7 KB · Views: 3
  • LCD_display.txt
    1.5 KB · Views: 2
  • reset_delay.txt
    265 bytes · Views: 4

rberek

Full Member level 6
Joined
May 23, 2007
Messages
339
Helped
98
Reputation
202
Reaction score
83
Trophy points
1,308
Location
Canada
Activity points
4,009
Maybe I missed it, but where do you initialize the LCD?

LCDs have an initialization procedure, with very specific timings, where you set such things as cursor style, 4-bit or 8-bit data input, etc.

Without this sequence, the LCD will do nothing.

r.b.
 

michie

Newbie level 3
Joined
Sep 6, 2013
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
32
Hi rberek,

Thanks for your reply and effort!

I have made the initialization such as reset, turn on display and clear display at LCD_data module.
I have use the reset_delay module to give time for the LCD for initialization.
In LCD_controller module, I did some initialization such as to enable falling edge of LCD_EN.
I am not sure which type of initialization still needed.

This coding I saw from a website which is used for displaying the 32 characters at a time and I have tested it before I edit.
The only thing I have deleted is the mode set to the LCD which is 9'h006 which I found out that it is used for automatic cursor shifting and I am not sure whether I need it or not.
I have deleted it from the original coding and it seems working so I assume I can delete it.
I attached the original coding (LCD_test) which I have replaced it with LCD_data module for your reference.
 

Attachments

  • LCD_test.txt
    4.1 KB · Views: 3

rberek

Full Member level 6
Joined
May 23, 2007
Messages
339
Helped
98
Reputation
202
Reaction score
83
Trophy points
1,308
Location
Canada
Activity points
4,009
You have to initiate and perform the LCD initialization and I do not see that in your code, though I admit I only took a quick look. You don't just sit and wait for it to initialize.

I am assuming this character LCD is a standard HD44780-based one.

If so, this link shows you the procedure you must follow to the letter or the LCD will not work. He as a flow chart which shows the steps to take complete with the large delays that are required.

If you are already doing this, my apologies.

r.b.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top