====== IclcdBegin() ====== ''IclcdBegin()'' sets the address and screen dimensions of a PCF8574 character LCD. {{:en-us_commands:reference:iclcdbegin.svg?900|IclcdBegin command operation flow}} ''bool IclcdBegin(uint8_t address, uint8_t columns, uint8_t rows, bool backlight = true, uint8_t device = 0)'' ===== Commands ===== ^ Command ^ Arguments ^ Return Value ^ Operation ^ | ''IclcdBegin(address, columns, rows, backlight, device)'' | ''uint8_t address''\\ ''uint8_t columns''\\ ''uint8_t rows''\\ ''bool backlight = true''\\ ''uint8_t device = 0'' | ''bool'' | Sets the address and screen dimensions of a PCF8574 character LCD. | ===== Example ===== void setup() { Serial.begin(115200); if (!IclcdBegin(0x27, 20, 4)) { // Set the address and dimensions of the PCF8574 character LCD. Serial.println(F("CLCD connection failed")); return; } IclcdSetCursor(0, 0); // Move the cursor to the specified column and row. IclcdPrint(F("ILOGICS Iclcd")); // Print a string or number to the LCD. IclcdSetCursor(0, 1); // Move the cursor to the specified column and row. IclcdPrint(1234); // Print a string or number to the LCD. IclcdSetCursor(6, 1); // Move the cursor to the specified column and row. IclcdPrint(12.34, 2); // Print a string or number to the LCD. } void loop() { } ===== 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 ''Wire'' transfers or I²C slave callbacks concurrently with ''Iclcd...()''. 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. ===== Built-in Commands in the Same Category ===== * [[:en-us_commands:reference:iclcdclear|IclcdClear() View detailed description]] * [[:en-us_commands:reference:iclcdhome|IclcdHome() View detailed description]] * [[:en-us_commands:reference:iclcdsetcursor|IclcdSetCursor() View detailed description]] * [[:en-us_commands:reference:iclcddisplay|IclcdDisplay() View detailed description]] * [[:en-us_commands:reference:iclcdcursor|IclcdCursor() View detailed description]] * [[:en-us_commands:reference:iclcdblink|IclcdBlink() View detailed description]] * [[:en-us_commands:reference:iclcdbacklight|IclcdBacklight() View detailed description]] * [[:en-us_commands:reference:iclcdscrollleft|IclcdScrollLeft() View detailed description]] * [[:en-us_commands:reference:iclcdscrollright|IclcdScrollRight() View detailed description]] * [[:en-us_commands:reference:iclcdtextdirection|IclcdTextDirection() View detailed description]] * [[:en-us_commands:reference:iclcdautoscroll|IclcdAutoscroll() View detailed description]] * [[:en-us_commands:reference:iclcdcreatechar|IclcdCreateChar() View detailed description]] * [[:en-us_commands:reference:iclcdwrite|IclcdWrite() View detailed description]] * [[:en-us_commands:reference:iclcdcommand|IclcdCommand() View detailed description]] * [[:en-us_commands:reference:iclcdprint|IclcdPrint() View detailed description]] [[:en-us_commands:builtin|← Built-in Command List]]