LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LCD display using DAQ USB6008

I don't use run continously either, and I grew out of the DAQ assistant rather quickly. For Kay's purposes, though, I think it might be enough. I think the mechanism is useable, but I wonder if Kay knows what to actually send, and how to send it.
 
Kay,
 
Run through the "Initializing by instruction" steps.
 
1. Make sure your RS, R/W, and E lines are correctly wired by turning on one at a time and checking the voltage of the lines.
2. Make sure your DB7-DB0 lines are in the right order, as in, right-most array element (the 8th one over) gives you an output on the actual DB0 input of the LCD, and the left-most gives you an output on the actual DB7 input of the LCD. Use the same method as used for checking the control lines.
3. For every instruction you send, set all the data and control lines to the appropriate state, THEN bring your E bit high then low. Heck, switch the E bit a few times if you want to, since it won't hurt anything (unless you are sending a character to the LCD, in which case it will send it once for every register of the E clock signal).
 
Remember that characters are ASCII encoded, so a 01000001 (decimal 65) sent on DB7-DB0 will give you a capital "A"
 
Sorry if I am beating the same points into you over and over again. 🙂
 
Edited because of smilies mistakenly showing up for DB7_:_DB0


Message Edited by morgol on 07-10-2008 12:49 PM
____
Ryan R.
R&D
0 Kudos
Message 21 of 41
(1,656 Views)
Morgol,

i think i need your help step by step...
when i turn on the power, im seeing all squares on the LCD rite?
then, i follow what u have teach me...
ok for example, 1st i need to clear the display ... i manually set RS and R/W to 0, and then DB7-DB0 is 00000001...
after that i'll give a high to the Enable pin to send this instruction isit??
but after i do this, the display is stil all squares....and when i send the instruction to make the cursor home,its stil al squares...
until now no matter what i do, the displays are stil all squares...haiz,headache lerr Smiley Sad
hope u can continue to help me a.s.a.p.
Thanks Morgol.
0 Kudos
Message 22 of 41
(1,640 Views)
You are getting ahead of yourself. Look at the datasheet again. When you look at the "initialize by instruction" sequence, you will see that clearing the display is not the first thing you do. Look at the code I gave you, and check out case 1 and case 2 in the "Init. LCD" (LCD Initialize (SubVI).vi) SubVI. You will see that the first command to set the data length and so forth with decimal 56. After that I send decimal 14. Remember to send the binary equivalent of those numbers!
 
And actually you need to give a high»low transition on the clock line.


Message Edited by morgol on 07-11-2008 07:33 AM
____
Ryan R.
R&D
Message 23 of 41
(1,626 Views)
oh i see...now i realise what my mistake is...im doing in a wrong way..
but i dun understand this "give a high»low transition on the clock line"....what clock line u mean??
and by the way,mayb i ask....
 is the VI u send to me works with your LCD?? Did u try connect wtih your LCD already??
and what is the LCD u are using??
0 Kudos
Message 24 of 41
(1,614 Views)
The "E" input to the LCD is a clock signal. Like all clock signals, it operates by detecting a transition from high to low or vice versa. When you make the E (clock) line go from low to high, nothing happens. But when you make it go back from high to low, it "clocks" all the data in.
 
The VI I made has details as notes in the block diagram that tell you what display controller I used, and what the screen size is. And yes, it definitely works, and very well. Just type something in and run it, and you will see exactly what I get on my display in that array indicator on the front panel.
____
Ryan R.
R&D
Message 25 of 41
(1,612 Views)
hey morgol...i reali need to say thanks to u...
i finally manage to initialize my LCD...thank you...
after initialize i manage to see the cursor at home, although it is not blinking...
another thing is, can u modify the VI u send me so that it can display the words i type onto my 16x2 LCD display?
i saw the description that u wrote on the VI that say that need to make some modification..i tried but cant manage to do it..
so can u please help me??
0 Kudos
Message 26 of 41
(1,596 Views)
Look at the Word Wrap SubVI and change the offset constant to 17 (originally 21), and the search length constant to 16 (originally 20). Finally, remove 2 of the Word Wrap/Line Feed/Write LCD stages in the main VI, and go into the Line Feed SubVI and check that Case 2 has the right hex address for line 2 on your display. Unfortunately I don't have the latest revision since I'm at home now, but the practice won't hurt you. 🙂
By the way, changing the 56 on the Init. LCD to a 60 should set the bit that tells the cursor to blink. 🙂
____
Ryan R.
R&D
Message 27 of 41
(1,595 Views)
ok Morgol...i manage to do the modifications like u said on the SubVIs..
but for the main part,im not really sure how to do .....
please help....thanks Smiley Wink
0 Kudos
Message 28 of 41
(1,585 Views)
As explained in the notes on the main VI, the VI consists of successive stages of SubVI's, each stage responsible for one line of the display:
 
1. Initialize
2. Word Wrap Line 1
3. Write Line 1
4. Feed to Line 2
5. Word Wrap Line 2
6. Write Line 2
7. Feed to line 3
8. Word Wrap Line 3
9. Write Line 3
10. Feed to line 4
11. Word Wrap Line 4
12. Write Line 4
13. Display all lines to the array control
 
Simply remove items 7-12 to reduce it to a 2-line display.
____
Ryan R.
R&D
0 Kudos
Message 29 of 41
(1,583 Views)
hey Morgol...
i see the VI u send me, u did not Word Warp line 4 after u Line feed to line 4...
so is it ok or?? bcoz from the stages u mention i saw that u have mention about word wrapping line 4 after feeding the line....
0 Kudos
Message 30 of 41
(1,548 Views)