I have a Arduino Uno and I followed this guide : http://waihung.net/lcd-smartie-through-arduino/
But when I connect it, it just displays random gibberish(Sometimes I can get it to slightly work: some letters that should be displayed show up but also with gibberish). I'm trying to show my cpu load and free ram. Sorry for bad english, I'm not native.
You need to have the same LCD as the one used in the example.
But I have the same one
ieee488:
You need to have the same LCD as the one used in the example.
OP doesn't need any special LCD for this to work.
The Arduino-code makes it possible to use the generic cheap chinese LCD with LCD-smartie.
// Per.
Zapro:
OP doesn't need any special LCD for this to work.The Arduino-code makes it possible to use the generic cheap chinese LCD with LCD-smartie.
// Per.
If he doesn't need any special LCD, perhaps you can explain why it doesn't work for him.
ieee488:
If he doesn't need any special LCD, perhaps you can explain why it doesn't work for him.
Yes.
Test the LCD with standard LCD example on Arduino. If it works it's a software communication-problem with LCD-smartie.
// Per.
ieee488:
If he doesn't need any special LCD, perhaps you can explain why it doesn't work for him.
Zapro:
Yes.Test the LCD with standard LCD example on Arduino. If it works it's a software communication-problem with LCD-smartie.
// Per.
While it is likely to be a communications issue, the issue could be caused by s/w issues on the Arduino side.
There are several potential issues
-
The serial rx buffer in HardwareSerial could be overrun
This will cause dropped bytes which will cause screen corruption.
If this is the issue, then a lower baud rate might help but 9600 baud isn't particularly fast.
But the LiquidCrystal library is kind of slow so it still might an issue for that library. -
The sketch does not fully implement the MatrixOrbital command set.
If the PC side is using unimplemented commands then there will be issues. -
The LiquidCrystal does not properly wait for instructions to finish when using command()
The sketch uses lcd.command() to send raw LCD instructions to the LCD.
The LiquidCrystal library uses busy waits for instructions. However, it does this in the higher layers of the API.
It does not do any added delays for longer commands such as home or clear when they are sent to the LCD using
the lcd.command() API. This will cause issues if the host is doing any delays when sending those instructions.
My hd44780 library does properly honor the instruction timing even when command() is called.
One option to eliminate the potential command() timing issue would be to use my hd44780 library.
It is available in the IDE library manager.
The i/o class is hd44780_pinIO - the constructor uses the same pin parameters as LiquidCrystal.
See the included hd44780_pinIO class examples for the header files needed and the lcd object declaration.
The hd44780 library also allows LCD instructions to execute in parallel with the Arduino.
This makes the hd44780 library faster than than the bundled LiquidCrystal library so the reduced overhead could also help reduce the possibility of HardwareSerial RX buffer overruns.
Just keep in mind that while the hd44780 library will eliminate a command() timing issue, and help reduce potential RX buffer overruns, there could be multiple issues including the two other issues mentioned above.
--- bill