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

633 No Cursor

dsa

New member
Hello.

I have a project (C++) for serial CFA-633 under Linux that working fine.

Now I need to make this project working with USB CFA-633.

I found the device string (/dev/ttyS0) and changed it to USB (/dev/ttyUSB0) and compiled again.

It looks like that it was enough to make it working (strings is appeared on screen, buttons is operational).

But one issue is appeared.

There is no cursor on screen always even if cursor style is set to visible style (blinking block, underscore cursor or blinking block plus underscore) by '12' command.

Please tell me what could be wrong and how to fix it?

Thank You.
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 
Last edited:

CF Tech

Administrator
The USB and serial versions of the CFA-633 run identical firmware and have identical hardware. The USB just adds the piggy-back USB board.

I think that there must be some kind of terminal translation on your USB device, compared to your serial device.

Please make sure any translation (like CR -> CR+LF) is turned off. I think this is something to do with TERMIOS:

https://forum.crystalfontz.com/showthread.php?p=24238#post24238
 
USB LCD Displays - Graphic and Character LCDs with a Keypad

dsa

New member
Hm.

Might be, but i don't see what exactly wrong.

Here is my termios flags (they are the same as for serial version and very close to another samples from this forum).

Code:
    //input modes 
    term.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|INPCK|ISTRIP|INLCR|IGNCR|ICRNL
                    |IXON|IXOFF);
    term.c_iflag |= IGNPAR;

    //output modes 
    term.c_oflag &= ~(OPOST|ONLCR|OCRNL|ONOCR|ONLRET|OFILL
                    |OFDEL|NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY);

    //control modes 
    term.c_cflag &= ~(CSIZE|PARENB|PARODD|HUPCL|CRTSCTS);
    term.c_cflag |= CREAD|CS8|CSTOPB|CLOCAL;

    //local modes 
    term.c_lflag &= ~(ISIG|ICANON|IEXTEN|ECHO);
    term.c_lflag |= NOFLSH;
As I see all translations are disabled...
 

dsa

New member
I don't know whats was the trick.

cfmakeraw() does not help.

I copypasted Serial_Init() function from 'linux_cli_examples' example and cursor is working now.

CF Tech, thank you for pointing me to the TERMIOS.

Problem solved!
 
Last edited:

CF Tech

Administrator
Hey, I am glad you got it going.

Someone here (possibly me, more probably CC Admin) looked that stuff up long ago, wrote the Command Line Examples, and them most likely completely forgot about again forever.

Good that your program is functioning correctly now. If you think it might be a good example, feel free to post it over in the 3rd party software:

https://forum.crystalfontz.com/forumdisplay.php?f=6
 
Top