LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Serial LCD (https://www.linuxquestions.org/questions/linux-newbie-8/serial-lcd-935260/)

linux_user0302 03-19-2012 07:20 AM

Serial LCD
 
Hi,
I am trying to control a serial lcd(16x2) connected to my usb port. When I use the command
echo "hi" > /dev/ttyUSB0
then nothing is displayed on LCD. But then i used
screen /dev/ttyUSB0
and then type something and exit. Then again i run the command
echo "hi" > /dev/ttyUSB0
then hi was displayed on the screen perfectly. Can anyone explain the reason for this and how to overcome this problem of display without using screen command and just use echo command every time i restart my computer.

Satyaveer Arya 03-19-2012 02:21 PM

If there is no screen command, you need to open multiple ssh session with remote host.
Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells). The same way tabbed browsing revolutionized the web experience, GNU Screen can do the same for your experience in the command line. Instead of opening up several terminal instances on your desktop or using those ugly GNOME/KDE-based tabs, Screen can do it better and simpler. Not only that, with GNU Screen, you can share sessions with others and detach/attach terminal sessions. It is a great tool for people who have to share working environments between work and home.

By adding a status bar to your screen environment, you are able to name your shell instances on the fly or via a configuration file called .screenrc that can be created on the user’s home directory.

A Guide to GNU Screen

Satyaveer Arya 03-19-2012 02:24 PM

You can also open the screen with the correct baud rate:
an example:

Code:

# screen /dev/ttyUSB0 115200
You can also enable CTS/RTS handshake:

Code:

# screen /dev/ttyUSB0 115200,ctsrts

273 03-19-2012 02:29 PM

I'm sorry I have no answers for this but I am interested in what this device is.
Is this something being used in an embedded system or is it possible to add a USB LCD to a desktop machine? I can think of a few fun uses for something like this, and a few good uses if/when I finally get a Raspberry Pi.

Satyaveer Arya 03-19-2012 04:17 PM

It is possible to add a USB LCD to a desktop machine also.

273 03-19-2012 04:34 PM

Quote:

Originally Posted by Satyaveer Arya (Post 4630940)
It is possible to add a USB LCD to a desktop machine also.

I'm not going to ask you to be google for me but do you know of a model number or supplier?
I did google but I'm not 100% sure what to search for to find an LCD I can send characters to through USB, I'm actually surprised it's as easy as the original post sugests.

Satyaveer Arya 03-19-2012 05:07 PM

I think most of the LCDs support connecting with USB. You can refine your search on google.

linux_user0302 03-20-2012 07:23 AM

Quote:

Originally Posted by Satyaveer Arya (Post 4630829)
If there is no screen command, you need to open multiple ssh session with remote host.
Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells). The same way tabbed browsing revolutionized the web experience, GNU Screen can do the same for your experience in the command line. Instead of opening up several terminal instances on your desktop or using those ugly GNOME/KDE-based tabs, Screen can do it better and simpler. Not only that, with GNU Screen, you can share sessions with others and detach/attach terminal sessions. It is a great tool for people who have to share working environments between work and home.

By adding a status bar to your screen environment, you are able to name your shell instances on the fly or via a configuration file called .screenrc that can be created on the user’s home directory.

A Guide to GNU Screen

the problem here is,I have to display something using bash scripting. But if I run the command screen /dev/ttyusb0 inside the script, there is no way to quit the screen window as it will be waiting for the inputs. I think multiple ssh session can also be not opened using scripts. Is there any other way just by using commands in scripts?

linux_user0302 03-20-2012 07:26 AM

Quote:

Originally Posted by 273 (Post 4630835)
I'm sorry I have no answers for this but I am interested in what this device is.
Is this something being used in an embedded system or is it possible to add a USB LCD to a desktop machine? I can think of a few fun uses for something like this, and a few good uses if/when I finally get a Raspberry Pi.

The lcd here is 16x2 character serial lcd. It has pic controller attached to it. So the serial commands that are sent to pic are displayed on lcd. The pic is already programmed by the vendor.

linux_user0302 03-20-2012 07:28 AM

Quote:

Originally Posted by 273 (Post 4630957)
I'm not going to ask you to be google for me but do you know of a model number or supplier?
I did google but I'm not 100% sure what to search for to find an LCD I can send characters to through USB, I'm actually surprised it's as easy as the original post sugests.

The model is [RKI-1213]. This is serial lcd with back light.

273 03-20-2012 07:41 AM

Thanks, sounds like a useful little device.


All times are GMT -5. The time now is 11:25 PM.