Failure trying to communicate via C program to display

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
jason@eatonweb.com
LCD?
Posts: 5
Joined: Mon Aug 12, 2002 6:00 pm
Contact:

Failure trying to communicate via C program to display

Post by jason@eatonweb.com »

I hope somebody can give me a hand. I'm running RedHat 7.2 and I am trying to program some serial port communication with the matrix display. Using the simple C program provided elsewhere on this site, the "open" is sucessfull but the first call "tcgetattr" failes with "Input/Output" error.

I'm thinking that maybe I am pointing to the wrong device file for my instalation of Linux. I tried ttys0, ttys1, ttys2, and ttys3.

Anybody have any RedHat com programming expierence here to give me a hand?

I am also curious if I need to use a Null Modem cable?

Thanks.
Henry
OMNIPRESENT
OMNIPRESENT
Posts: 3014
Joined: Tue Aug 14, 2001 6:00 pm
Contact:

Post by Henry »

I know nothing about Linux, but I can tell you that you should not use a null cable. First make sure the LCD works at all with our demo sotware under a Windows machine.
linear
evil Dr. linear
evil Dr. linear
Posts: 288
Joined: Wed Aug 15, 2001 6:00 pm
Location: USA
Contact:

Post by linear »

Nice thing about *NIX is you can test without anyhting more than the shell.

echo "foo" > /dev/ttys0

should write nicely to the display, and

cat /dev/ttys0

should read keypad presses for quick and dirty testing. Substitute the correct device as applicable.
jason@eatonweb.com
LCD?
Posts: 5
Joined: Mon Aug 12, 2002 6:00 pm
Contact:

Post by jason@eatonweb.com »

Thanks guys. I think I will try out the display on windows first to make sure it works then diagnose why my serial port is not working under linux.
jason@eatonweb.com
LCD?
Posts: 5
Joined: Mon Aug 12, 2002 6:00 pm
Contact:

Post by jason@eatonweb.com »

Arg! .. I moved to win2k to try out my lk204-25 and I cannot get characters to display. I opened up hyperterminal and set it to com2 it connects but typing does not display chars to the lcd.

I set baud to 19200 and turned off flow control. I am powering my lcd with the power supply from the computer adapted to input only 5v into the power connector on the back of the lcd.

I downloaded the AlphaDemo but I believe I miss configured it and when it fails to connect it causes an assertion violation and crashes. Therefore I cannot set it up properly. I uninstalled/re-installed it but it must keep it's settings in the registry somewhere.

Any help would be appreciated.
Henry
OMNIPRESENT
OMNIPRESENT
Posts: 3014
Joined: Tue Aug 14, 2001 6:00 pm
Contact:

Post by Henry »

try with MOGD.
jason@eatonweb.com
LCD?
Posts: 5
Joined: Mon Aug 12, 2002 6:00 pm
Contact:

Post by jason@eatonweb.com »

Well I tried MOGD and I am still unable to communicate to the display. I also tried a different serial cable. I set the settings to COM2 and hit the "display text" button. Nothing happens. I have 5v hooked to the power connnector and I see a nice backlight screen with a flashing block cursor.

With MOGD I am not sure what to set the display size to for my lk204-25 but I tried several display sizes with no results.

Thanks.
nikko
LCD!
Posts: 19
Joined: Sun Oct 06, 2002 9:45 am
Location: sweden
Contact:

Post by nikko »

Ello!

In the progs try to set it at another com port, if that don
Post Reply