LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LCD, extented commands and Labview

Solved!
Go to solution

Hello,

 

I am using a serial LCD (https://www.sparkfun.com/products/9395) associated with a TTL-USB converter (http://www.miniinthebox.com/fr/cp2102-usb-2-0-vers-uart-ttl-convertisseur-6pin-serie-du-module_p3910... and labview with VI n°1. Sending simple commands such as the one in VI n°1 works fine. My problem is that I don't know how to send the Extended commands on page 2 here https://www.sparkfun.com/datasheets/LCD/SerLCD_V2_5.PDF.

 

For instance as far as I understand  the data sheet I need to send 124 128 in order to turn off the brightness of the screen. If I type "124 128" in VI n°1 the LCD screen displays "124128".  I get the same result with VI n°2.

Would anybody know what I could try next?

 

Thansk a lot.

 

User1979

Download All
0 Kudos
Message 1 of 6
(2,977 Views)
Try sending the hex codes. Right click on the string constant and select Hex display.
Message 2 of 6
(2,966 Views)

Make sure your string control is set for hex display rather than normal display.

 

You want to send two bytes of 124 and 128.  Not 6 characters of 1 and 2 and 4 and 1 and 2 and 8 which is what you are doing if you type those characters into a string control set for normal display.

 

You could also use an array of U8 integers then use byte array to string to send the data to the Serial Write.

Message 3 of 6
(2,963 Views)
Solution
Accepted by topic author User79

It looks like those values (124 and 128) are the decimal equivalent of the bytes to be transmitted 0x7C and 0x80. It is not possible to tell for sure from your images but most likely you are sending the ASCII text characters for "1" "2" "4" and "1" "2" "8". Since they show up on the display that is almost certainly what is happening.

 

In your second VI pop upon the string constants and select Hex Display from the pop up menu. Then type in the hex values 7C and 80.

 

Lynn

Message 4 of 6
(2,955 Views)

Hi everyone,

 

Thanks for all your quick and accurate answers. Lynn your "In your second VI pop upon the string constants and select Hex Display from the pop up menu. Then type in the hex values 7C and 80" worked.

 

Thanks again.

 

Regards

 

User

0 Kudos
Message 5 of 6
(2,872 Views)

It is important to understand the difference between the representation of the data and the format of the display. Please look at the help files and if you do not understand why it worked, ask for further explanation.

 

Lynn

0 Kudos
Message 6 of 6
(2,865 Views)