• We recently switched our forum platform. If you experience any issues please email support@crystalfontz.com

timeouts on 635


New member
I am having a strange problem with my 635. I have made a lot of changes to the original test code for the 635. The odd part is when I first turn my computer on and plus the 635 in and try to run my code (writes text to the display) I get Timed out waiting for a response. Which is the timeout error from the test code. I test for a time out after each line of text I write to the display. I can try running my program over and over with no success. But if I run the original 635 test program it will work fine. Then after I have run the original 635 test program I can run my program with no problem.
Any ideas?
BTW both programs give me a success for opening the usb port at 115200. I am running both as root. The program must be running because the time out error is reported, just nothing seems to be making it to the LCD. I have to run the original program then mine works fine.
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
USB LCD Displays - Graphic and Character LCDs with a Keypad

CF Mark

Sounds like you might not be setting the COM port up correctly.

IIRC, windows keeps the last applications com port settings until they are changed, so that might explain why your app works after the other.

I use:

GetCommState(com_handle, &dcb);
dcb.BaudRate = baud_rate;
dcb.fBinary = TRUE;
dcb.Parity = FALSE;
dcb.fOutxCtsFlow = FALSE;
dcb.fOutxDsrFlow = FALSE;
dcb.fDtrControl = DTR_CONTROL_ENABLE;
dcb.fDsrSensitivity = FALSE;
dcb.fTXContinueOnXoff = TRUE;
dcb.fOutX = FALSE;
dcb.fInX = FALSE;
dcb.fErrorChar = '\0';
dcb.fNull = FALSE;
dcb.fRtsControl = RTS_CONTROL_ENABLE;
dcb.fAbortOnError = FALSE;
dcb.ByteSize = 8;
dcb.Parity = NOPARITY;
dcb.StopBits = ONESTOPBIT;
SetCommState(com_handle, &dcb)

CF Mark

deltaxfx said:
I am running both as root.
Oops... Linux.

tcgetattr(com_handle, &term);

//input modes 
term.c_iflag |= IGNPAR;

//output modes 
term.c_oflag |= NL0|CR0|TAB0|BS0|VT0|FF0;

//control modes
term.c_cflag |= CREAD|CS8|CSTOPB|CLOCAL;

//local modes 
term.c_lflag |= NOFLSH;

//set baud rate
cfsetospeed(&term, brate);
cfsetispeed(&term, brate);

tcsetattr(com_handle, TCSANOW, &term);