取消
显示结果 
搜索替代 
您的意思是: 

LCD, extented commands and Labview

已解决!
转到解答

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

下载全部
0 项奖励
1 条消息(共 6 条)
3,884 次查看
Try sending the hex codes. Right click on the string constant and select Hex display.
2 条消息(共 6 条)
3,873 次查看

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.

3 条消息(共 6 条)
3,870 次查看
解答
已被主题作者 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

4 条消息(共 6 条)
3,862 次查看

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 项奖励
5 条消息(共 6 条)
3,779 次查看

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 项奖励
6 条消息(共 6 条)
3,772 次查看