Page 1 of 1
Failure trying to communicate via C program to display
Posted: Thu Oct 10, 2002 12:08 am
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.
Posted: Thu Oct 10, 2002 12:16 am
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.
Posted: Thu Oct 10, 2002 7:53 am
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.
Posted: Thu Oct 10, 2002 10:49 am
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.
Posted: Thu Oct 10, 2002 11:12 pm
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.
Posted: Thu Oct 10, 2002 11:33 pm
by Henry
try with MOGD.
Posted: Sat Oct 12, 2002 10:20 am
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.
Posted: Sat Oct 12, 2002 2:44 pm
by nikko
Ello!
In the progs try to set it at another com port, if that don