en-us_commands:reference:iclcdcreatechar
This is an old revision of the document!
Table of Contents
IclcdCreateChar()
IclcdCreateChar() registers a custom character.
bool IclcdCreateChar(uint8_t location, const uint8_t charmap[8], uint8_t device = 0)
Commands
| Command | Arguments | Return Value | Operation |
|---|---|---|---|
IclcdCreateChar(location, charmap, device) | uint8_t locationconst uint8_t charmap[8]uint8_t device = 0 | bool | Registers a custom character. |
Example
const uint8_t heart[8] = { 0b00000, 0b01010, 0b11111, 0b11111, 0b01110, 0b00100, 0b00000, 0b00000 }; IclcdCreateChar(0, heart); IclcdSetCursor(0, 1); IclcdWrite(0);
Precautions
- PCF8574 connections use the same mapping as the existing CLCD library: P0=RS, P1=R/W, P2=Enable, P3=backlight, P4~P7=LCD D4~D7.
- Verify the LCD module's actual I²C address using its settings and I²C scan results.
- SDA/SCL can share the bus with other I²C devices, but addresses must not overlap.
- Do not run
Wiretransfers or I²C slave callbacks concurrently withIclcd…(). Iclcd transfers run at 100 kHz and then restore the previous TWI settings. - On MPAINO, using D20/D21 for external interrupts prevents simultaneous I²C use.
IclcdCommand()can change the LCD state directly. Use it only if you understand HD44780 commands.
en-us_commands/reference/iclcdcreatechar.1788785566.txt.gz · Last modified: by 127.0.0.1
