Custom character with Sparkfun Serial LCD

ok I can create custom characters using the LCD library with a regular LCD display
I now have to do the same thing with SparkFun Serial interface LCD

I'm sending what I think are the right data bytes

0x40 // for custom char 0
0x02
0x04
0x08
0x1F
0x08
0x04
0x02
0x00

I then try and display character 0
I get two vertical bars (seems to be the default for an undefined char)

what di I miss??
cheers
Mike

What is your code?

Are you useing lcd.write() or lcd.println()? the second will not work because:

  1. It will always put a newline after the characeter (which I bet is two vertical bars)
  2. It has trouble oprinting the character 0 as it usually means the end of the string (ie, you are printing and empty string).

In any case, hard to make any relevant comment unless you post code.

nah the issue is whether you can actually define custom chars with the serial LCD
I'm NOT using the lcd library it's a serial device

but, as luck would have it, the chars I want are already defined
so problem sorta evaporates a bit :slight_smile:
cheers
Mike

You should be able to use the new 'fm' LiquidCrystal libraries with a serial device. You can get them at

https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home

and they are a direct replacement for the libraries that are supplied wit hthe IDE download.

I then try and display character 0
I get two vertical bars (seems to be the default for an undefined char)

We ran into this problem a while ago and if I get a chance I will look for the thread.

As I recall, the 'solution' I came up with is to use custom character 8 in place of 0 when trying to display the character. The address 08 is what is called a 'foldback address' for address 00 (the high bit is ignored) and it bypasses whatever problem there is with using address 0.

Don

[Edit]: Here it is --> Arduino Forum