CFA632 USB Linux SendByte() failed

LuisC

New member
Hello.

I am trying the CFA632 test program, and I saw that sometimes the LCD does not print a character, and in my Linux console I get the "SendByte() failed" message.

I've modified the program, adding a little sleep time after each character sent.
Here is the code:
Code:
void SendString(char *data)
  {
        while(*data){
                SendByte(*data++);
                usleep(50);
        }
  }
Now it sends the characters correctly, but the result is a slowdown in the speed in printing to the display.

How can I assure that the characters arrives well in the display without the slowdown?

Thanks

Luis
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

LuisC

New member
Slackware Linux 11, kernel 2.4.33.3 (shipped with the distro)

I have also noted that, even with the sleep, the display stop to respond (give me the "SendByte() failed" message) after some time of displaying strings (I am trying to simulate a clock, displaying a name in the first row and the clock in the second one, refreshing the clock every 1 minute).
 

CF Tech

Administrator
I do not know much about Linux, but I would think it almost has to be in the USB system somewhere.

Can you try lcdProc or LCD4Linux and see if either of those work reliably?
 

LuisC

New member
I think that I've found the solution...

I was using the "uchi" USB Host Controller Driver (Known as the "Alternative JE"), but my USB subsystem works better with the "usb-uhci" driver (known as "Intel Standard").

I've also reduced the usleep time to 10, and now I'm happy with the result :D (however, without the "usleep", sometimes my system cannot send at least 1 character to the display, resulting in an incomplete message. Then, I prefer a little delay with a complete message than displaying it instantaneously but incomplete).

Thanks you very much
 

CF Mark

Administrator
The usleep() function is similar to the Windows Sleep() function in that itll normally sleep for a longer time period than what you specify.

Ie, the Windows Sleep() function is pretty useless at giving an accurate sleep period below 10ms.

I would be surprised if a normal Linux kernel would give anything better than 1ms accuracy normally (ie, usleep(1000)).
 
Top