IF-RIO

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with HD44780 LCD driver in Labview FPGA/sbRIO9637

 Dear colleagues,
upon advice from technical salesman I downloaded Labview driver for HD44780-based 2x16 character display.
Here is the source https://www.ni.com/en/support/downloads/tools-network/download.lcd-touch-screen-driver.html
However, the driver itself is not documented at all and provided as is.
I tried to use the functions in my code, but I experienced the following problem:

There is a command handling loop that must be put in code running on the FPGA. It uses a global variable to pass the data to be displayed.

Then, I found some high level functions that initialize the display and display characters.

And here is the problem:

I used another loop that works as a finite state machine. First it initializes the display (state called init), then it should print out 'Welcome' on the display (state called welcome) and then after a second it should just wait for data coming from host PC(state caller run).

If I manually step the states in the finite state machine, in some cases the display initializes properly and prints out the text. However, if I use the finite state machine to run seamlessly, I see that the display sometimes is not initialized at all or sometimes just flashes the text for about 10ms and immediately deletes it. 

I put wait for ready  function after each display init or write function, but it did not help. I also tried to place some delays, but it did not help either.

 

I am suspicious about a way how the display driver passes data from high level functions to the command handling loop. Maybe some data get lost and are not sent to the command handling loop, because the value of the global variable has already been rewritten.

 

I am using sbRIO9637 with fclk 40MHz and LCD driver in four-bit mode to save some digital pins.

For biasing the display, I use DIO4 pin, because the display consumption is just 1.5mA and DIO can provide up to 3mA. The 3V output voltage seems to be stable (checked by V-meter).

 

Please recommend me, if there is a better driver for this display or how we should modify the existing one.

 

Thank you for any advice.

 

 

 

 

 

Download All
0 Kudos
Message 1 of 3
(6,088 Views)
0 Kudos
Message 2 of 3
(6,058 Views)

Dear DGRIFFIN, 

thank you for your reply. It seems that this is completely different driver. 

Fortunately, without documentation I made it working. The problem was that in the initialization procedure I set the display to decrement &shift regime. When I changed this to Increment & no shift , it started working as it was supposed to.

I found that the data passing between command handling loop and high level functions through the global variable was done correctly, so the problem was not there.

For other people dealing with this driver, I highly recommend to consult the original datasheet of HD44780 controller, where all these modes are described.

A few hints, if you are using 2x16 character display and need to go to the second line, you should use function LCD set address with parameter DDRAM address =40 to move to the second line. 

If you need to insert space in your text, then the function  LCD Move cursor is suitable.

 

So now, the display seems to be working as it was supposed.

 

 

Download All
0 Kudos
Message 3 of 3
(6,052 Views)