Difference between revisions of "Matrix - LCD2USB"

From FriendlyELEC WiKi
Jump to: navigation, search
(介绍)
(Application of lcd4linux under Ubuntu)
 
(10 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
[[Matrix - LCD2USB/zh|查看中文]]
 
[[Matrix - LCD2USB/zh|查看中文]]
  
==介绍==
+
==Introduction==
 
[[File:LCD2USB01.png|thumb|LCD2USB]]
 
[[File:LCD2USB01.png|thumb|LCD2USB]]
*Matrix-LCD2USB是一个简单易用的LCD液晶转接模块,模块通过单片机把LCD液晶复杂的并口转成USB接口,可直接通过USB接口和开发板或PC连接使用。
 
 
* The Matrix-LCD2USB module is a simple and easy to use LCD module. It converts a parallel port to a USB port.
 
* The Matrix-LCD2USB module is a simple and easy to use LCD module. It converts a parallel port to a USB port.
 
* It works with LCD4LINUX, LCD Smartie and LCDProc. There are plenty of open source code samples available on the internet.  
 
* It works with LCD4LINUX, LCD Smartie and LCDProc. There are plenty of open source code samples available on the internet.  
Line 17: Line 16:
 
[[File:LCD2USBpcb.png | frameless|400px|LCD2USB-01.PCB]]。
 
[[File:LCD2USBpcb.png | frameless|400px|LCD2USB-01.PCB]]。
  
==工作原理==
+
==Basic Device Operation==
LCD液晶其本身是并行接口,需要较多的IO资源才可以与其通讯。本模块使用AX2210单片机,通过USB接口接收需要显示的数据和控制命令,并解析转换成相应的指令,通过单片机的IO发送给LCD,从而控制LCD液晶的显示。
+
The LCD unit usually communicates via a parallel interface which needs multiple IO resources. This module uses the AX2210 MCU which converts signals to commands and transmit to the LCD.
  
 
==Applications==
 
==Applications==
Line 33: Line 32:
 
[[File:Matrix-LCD2USB_NanoPC-T2.jpg|frameless|600px|Matrix-LCD2USB_NanoPC-T2]]
 
[[File:Matrix-LCD2USB_NanoPC-T2.jpg|frameless|600px|Matrix-LCD2USB_NanoPC-T2]]
  
==使用方法==
+
==Applications==
注意:模块上电后LCD液晶会显示LCD2USB V1.09,如果没有显示,请旋转模块背面的电位器调节屏幕显示的灰度。
+
Note: after the module is powered on the LCD will display "LCD2USB V1.09". If it doesn't show that you may check the module's reverse side and adjust the brightness by adjusting the potentiometer.
  
===在Ubuntu系统使用lcd4linux===
+
===Application of lcd4linux under Ubuntu===
(1)安装lcd4linux
+
(1) Install lcd4linux
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
$ sudo apt-get install lcd4linux
 
$ sudo apt-get install lcd4linux
 
</syntaxhighlight>
 
</syntaxhighlight>
(2)连接模块,并查看模块使用的USB端口,本例中使用的端口为usbdev3.2
+
(2) Connect Module at usbdev3.2
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
$ ls /dev/usb*  
 
$ ls /dev/usb*  
 
</syntaxhighlight>
 
</syntaxhighlight>
(3)更改/etc下的配置文件。软件生成的lcd4linux.conf文件较长,新手不容易配置,可重命名或删除后自己新建,并复制下面的配置代码。
+
(3) Update the configuration file under /etc by running the following commands:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
$ cd /etc
 
$ cd /etc
Line 51: Line 50:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
输入以下配置信息,并保存。
+
Type the following lines and save
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
Display LCD2USB {
 
Display LCD2USB {
     Driver    'LCD2USB'          #模块的类型为LCD2USB
+
     Driver    'LCD2USB'          #Model: LCD2USB
     Size      '16x2'            #LCD液晶的尺寸为1602
+
     Size      '16x2'            #LCD dimension: 1602
     Port      '/dev/usbdev3.2'  #使用的端口为/dev/usbdev3.2
+
     Port      '/dev/usbdev3.2'  #Port: /dev/usbdev3.2
 
}
 
}
  
 
Widget IPaddress {
 
Widget IPaddress {
     class  'Text'                      #类型:Text
+
     class  'Text'                      #Type: Text
     expression netinfo::ipaddr('eth0') #获取eth0的ip地址
+
     expression netinfo::ipaddr('eth0') #eth0's ip
     prefix 'IP:'                      #在行初显示“IP:
+
     prefix 'IP:'                      #display "IP:"
     width 16       #显示宽度:16
+
     width 16       #display width: 16
     align  'C'                        #显示方式:居中
+
     align  'C'                        #display: central
 
     update 1000                         
 
     update 1000                         
 
}
 
}
Line 79: Line 78:
 
Layout Default {
 
Layout Default {
 
     Row1 {
 
     Row1 {
         Col1 'IPaddress'              #在第一行第一列显示Widget IPaddress  
+
         Col1 'IPaddress'              #Display Widget IPaddress in the first row and first column
 
     }
 
     }
 
     Row2 {
 
     Row2 {
         Col1 'Time'               #在第二行第一列显示Widget Time  
+
         Col1 'Time'               #Display Widget Time in the second row and first column
 
     }
 
     }
  
Line 90: Line 89:
 
Layout  'Default'
 
Layout  'Default'
 
</syntaxhighlight>
 
</syntaxhighlight>
详情配置信息请参考lcd4linux网站:https://lcd4linux.bulix.org
+
For more details refer to: https://lcd4linux.bulix.org
  
(4)更改lcd4linux.conf文件权限
+
(4)Modify the access control of lcd4linux.conf
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
$ sudo chmod 600 lcd4linux.conf
 
$ sudo chmod 600 lcd4linux.conf
Line 98: Line 97:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
(5)运行lcd4linux
+
(5) Run lcd4linux
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 +
$ pkill lcd4linux
 
$ lcd4linux
 
$ lcd4linux
 
</syntaxhighlight>
 
</syntaxhighlight>
  
LCD液晶显示信息如下:
+
Here is what you should expect to observe on the LCD:
  
 
[[File:LCD2USBdisplay1.png | frameless|400px|LCD2USBdisplay-01]]
 
[[File:LCD2USBdisplay1.png | frameless|400px|LCD2USBdisplay-01]]
 
[[File:LCD2USBdisplay2004.png | frameless|400px|LCD2USBdisplay-2004]]
 
[[File:LCD2USBdisplay2004.png | frameless|400px|LCD2USBdisplay-2004]]
  
===Windows系统使用LCDSmartie===
+
===Application of LCDSmartie under Windows===
1、模块连接PC的USB口,并安装lcd2usbdriver驱动,LCD2USB提供的驱动下载地址:http://www.harbaum.org/till/lcd2usb/LCD2USB.dll。
+
1. Connect the module to a host PC's USB and install lcd2usbdriver. The LCD2USB driver can be downloaded at http://www.harbaum.org/till/lcd2usb/LCD2USB.dll .
  
2、运行LCDSmartie,软件源码地址:http://lcdsmartie.sourceforge.net/
+
2. Run LCDSmartie which can be downloaded at http://lcdsmartie.sourceforge.net/
  
3、软件界面如下:
+
3. This is the GUI:
  
 
[[File:LCD2USBdisplay2.png | frameless|400px|LCD2USBdisplay-02]]
 
[[File:LCD2USBdisplay2.png | frameless|400px|LCD2USBdisplay-02]]
  
4、点击Setup可进去设置页面,配置模块和显示的内容。
+
4. Click on Setup to make your configurations
  
 
[[File:LCD2USBdisplay3.png | frameless|600px|LCD2USBdisplay-03]]
 
[[File:LCD2USBdisplay3.png | frameless|600px|LCD2USBdisplay-03]]
  
LCD液晶显示信息如下:
+
Here is what you expect to observe on the LCD:
  
 
[[File:LCD2USBdisplay4.png | frameless|400px|LCD2USBdisplay-04]]
 
[[File:LCD2USBdisplay4.png | frameless|400px|LCD2USBdisplay-04]]
Line 128: Line 128:
 
==Resources==
 
==Resources==
 
[https://www.xxx.pdf xxx.pdf]
 
[https://www.xxx.pdf xxx.pdf]
 +
 +
==Update Log==
 +
===July-5-2016===
 +
* Created English wiki

Latest revision as of 07:05, 15 July 2016

查看中文

1 Introduction

LCD2USB
  • The Matrix-LCD2USB module is a simple and easy to use LCD module. It converts a parallel port to a USB port.
  • It works with LCD4LINUX, LCD Smartie and LCDProc. There are plenty of open source code samples available on the internet.
  • It works with various LCDs: 2 * 16, 2 * 20, 4 * 20, 4 * 27, 4 * 40 and etc.
  • It has two function keys which can be configured by users.

2 Features

  • Micro USB interface
  • Supports LCD4LINUX, LCD Smartie, LCDProc。
  • Supports various LCD modules
  • 2 x User key
  • PCB dimension(mm): 24 x 42。

LCD2USB-01.PCB

3 Basic Device Operation

The LCD unit usually communicates via a parallel interface which needs multiple IO resources. This module uses the AX2210 MCU which converts signals to commands and transmit to the LCD.

4 Applications

4.1 Connect to NanoPi M1

Refer to the following connection diagram to connect the module to the NanoPi M1:
Matrix-LCD2USB_nanopi_m1

4.2 Connect to NanoPi M2 / NanoPi 2 Fire

Refer to the following connection diagram to connect the module to the NanoPi M2/ NanoPi 2 Fire:
Matrix-LCD2USB_nanopi_m2

4.3 Connect to NanoPC-T2

Refer to the following connection diagram to connect the module to the NanoPC-T2:
Matrix-LCD2USB_NanoPC-T2

5 Applications

Note: after the module is powered on the LCD will display "LCD2USB V1.09". If it doesn't show that you may check the module's reverse side and adjust the brightness by adjusting the potentiometer.

5.1 Application of lcd4linux under Ubuntu

(1) Install lcd4linux

$ sudo apt-get install lcd4linux

(2) Connect Module at usbdev3.2

$ ls /dev/usb*

(3) Update the configuration file under /etc by running the following commands:

$ cd /etc
$ sudo vi lcd4linux.conf

Type the following lines and save

Display LCD2USB {
    Driver     'LCD2USB'          #Model: LCD2USB
    Size       '16x2'             #LCD dimension: 1602
    Port       '/dev/usbdev3.2'   #Port: /dev/usbdev3.2
}
 
Widget IPaddress {
    class  'Text'                      #Type: Text
    expression netinfo::ipaddr('eth0') #eth0's ip
    prefix 'IP:'                       #display "IP:"
    width 16 			       #display width: 16
    align  'C'                         #display: central
    update 1000                        
}
 
Widget Time { 
    class 'Text' 
    expression strftime('%a %H:%M:%S',time()) 
    width 16 
    align 'C' 
    update 1000 
}
 
Layout Default {
    Row1 {
        Col1 'IPaddress'               #Display Widget IPaddress in the first row and first column 
    }
    Row2 {
        Col1 'Time'	              #Display Widget Time in the second row and first column 
    }
 
}
 
Display 'LCD2USB'
Layout  'Default'

For more details refer to: https://lcd4linux.bulix.org

(4)Modify the access control of lcd4linux.conf

$ sudo chmod 600 lcd4linux.conf
$ chown root.root lcd4linux.conf

(5) Run lcd4linux

$ pkill lcd4linux
$ lcd4linux

Here is what you should expect to observe on the LCD:

LCD2USBdisplay-01 LCD2USBdisplay-2004

5.2 Application of LCDSmartie under Windows

1. Connect the module to a host PC's USB and install lcd2usbdriver. The LCD2USB driver can be downloaded at http://www.harbaum.org/till/lcd2usb/LCD2USB.dll .

2. Run LCDSmartie which can be downloaded at http://lcdsmartie.sourceforge.net/

3. This is the GUI:

LCD2USBdisplay-02

4. Click on Setup to make your configurations

LCD2USBdisplay-03

Here is what you expect to observe on the LCD:

LCD2USBdisplay-04 LCD2USBdisplay-05

6 Resources

xxx.pdf

7 Update Log

7.1 July-5-2016

  • Created English wiki