-
Notifications
You must be signed in to change notification settings - Fork 7
BTHQ21605V_lcd_init
gicking edited this page Feb 8, 2018
·
2 revisions
back to Command Reference / LCD-BTHQ21605V-I2C
Resets the I2C LCD display via (high active) reset pin and clears it for output.
Notes:
- only checked for 2x16 LCD Batron BTHQ21605V-COG-FSRE-I2C (Farnell 1220409).
- defined in
mub_lcd.h
-
not loaded by
main_general.h
- no
#define
required - a custom I2C address can be set using
#define
inconfig.h
BTHQ21605V_lcd_init(pPort, pin)
-
input:
- pPort: address of port for reset, e.g.
&PORT_A
- pin: pin you wish to set (0..7)
- pPort: address of port for reset, e.g.
-
output:
- none
- 1: LCD found / 0: no LCD attached
The below code periodically blinks "hello world" to the LCD.
#include "main_general.h" // board-independent main
#include "lcd-BTHQ21605V.h"
void setup()
{
// init I2C module
i2c_init();
// init and reset LCD display
BTHQ21605V_lcd_init(&PORT_E, 3);
}
void loop()
{
// print to LCD
BTHQ21605V_lcd_print(1, 1, "hello");
BTHQ21605V_lcd_print(2, 1, "world");
// wait a bit
delay(500);
// clear LCD display
BTHQ21605V_lcd_clear();
// wait a bit
delay(500);
}
-
Getting Started
-
- General Commands
- Libraries
- LCD BTHQ21605V
- poti AD5280
- poti AD5282
- freemodbus
- PetitFS SD-card (min)
- FatFS: SD card (full)
- Board Specific
-
- Universal
- Board Specific