Character LCD: print a filled block without using custom characters

Hey!

Is it true that you can print a filled block (11111,11111,11111,11111,11111,11111,11111,11111)
on a regular 16x2 LCD display
without using the createChar function?

I'm using LiquidCrystal library to drive my LCD...

K.

kilian23:
Hey!

Is it true that you can print a filled block (11111,11111,11111,11111,11111,11111,11111,11111)
on a regular 16x2 LCD display
without using the createChar function?

I'm using LiquidCrystal library to drive my LCD...

K.

Yes

Don

OK, and now the big question:

How do I do this?

Need some code...

How do I do this?

I'm not sure using 'C'. Have you tried

lcd.print(255);

?

Don

I'm not sure using 'C'. Have you tried lcd.print(255); ?

This prints the number "255", unfortunately.

It's trivial using assembly language. All you have to do is send the binary number 11111111 (instead of the ASCII code for a normal alphanumeric character) to the data register of the LCD controller. This is expressed as FF in hex or 255 in decimal.

It's probably equally trivial using 'C' but I'm afraid you will have to get someone who knows how to deal with the 'C' interpreter to help you out here.

Don

One of the characters in the ROM is a filled in block. Google is your friend here, the character set is on a large number of web sites. Look for "LCD hitachi HD44780 datasheet pdf" and something should land.

Alternatively, just print every characters from 9 onwards and see which one it is. A lot of them above ASCII 127 will be Japanese.

BTW, you have to use lcd.write(255) to get the ascii character, not print().

One of the characters in the ROM is a filled in block. Google is your friend here, the character set is on a large number of web sites.

You really don't need Google - just look at the first paragraph of reply #5.

Don

As previously mentioned, I did try to send the binary number and it worked. the code is below. I am using a 20x4 LCD display with i2c control

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
uint8_t testChar[8] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}; // Custom char

void setup() {
lcd.backlight(); // Turn on the lcd backlight
lcd.begin(16, 2); // Set up the lcd to have 16 char on 2 lines
lcd.createChar(0, testChar); // Sends the custom char to lcd
}

void loop() {
lcd.setCursor(0,0); // Set lcd cursor to the start of the first row
//lcd.print(“test”); // Prints to the LCD
lcd.print((char)0); // Custom char
}

Now jump in your DeLorean and set it up to take you back a few years so you can contact the OP.

Don