An I2C text LCD library for Displaytronic ACM1602NI-FLW-FBW-M01
Dependents: ACM1602NI_Demo ROBOT_v01 ROBOT_v02 Boku-Transmit ... more
ACM1602NI Class Reference
An I2C text LCD library for Displaytronic ACM1602NI-FLW-FBW-M01. More...
#include <ACM1602NI.h>
Public Member Functions | |
ACM1602NI (PinName sda, PinName scl) | |
Create an ACM1602NI object connected to the specified I2C pins. | |
ACM1602NI (I2C &i2c) | |
Create an ACM1602NI object connected to the specified I2C port. | |
void | init () |
Initialize the device and clear screen. | |
void | locate (int column, int row) |
Locate to a screen column and row. | |
void | cls () |
Clear the screen and locate to 0,0. | |
int | putc (int c) |
Write a character to the LCD. | |
int | printf (const char *format,...) |
Write a formated string to the LCD. |
Detailed Description
An I2C text LCD library for Displaytronic ACM1602NI-FLW-FBW-M01.
The device does not work with default I2C library due to its slow I2C responce. This library adds some extra waits so that the device can answer to the I2C commands. The interface is basically the same as TextLCD by Simon Ford.
This LCD device is manufactured by Xiamen Zettler Electronics Co. Ltd. and distributed by Akizuki Denshi Tsusho Co. Ltd. http://akizukidenshi.com/catalog/g/gP-05693/ http://akizukidenshi.com/download/ds/xiamen/ACM1602NI-FLW-FBW-M01_DISPLAYTRONIC_%20SPEC%20VER1.2.pdf
Example:
#include "mbed.h" #include "ACM1602NI.h" // I2C pins: p9 = sda, p10 = scl ACM1602NI lcd(p9, p10); // You can specify an I2C object instead. // I2C i2c(p9, p10); // ACM1602NI lcd(i2c); int main() { lcd.printf("Hello, World!\n"); lcd.printf("ACM1602NI\n"); }
Definition at line 50 of file ACM1602NI.h.
Constructor & Destructor Documentation
ACM1602NI | ( | PinName | sda, |
PinName | scl | ||
) |
Create an ACM1602NI object connected to the specified I2C pins.
- Parameters:
-
sda I2C data pin scl I2C clock pin
Definition at line 23 of file ACM1602NI.cpp.
ACM1602NI | ( | I2C & | i2c ) |
Create an ACM1602NI object connected to the specified I2C port.
- Parameters:
-
i2c I2C port
Definition at line 27 of file ACM1602NI.cpp.
Member Function Documentation
void cls | ( | ) |
Clear the screen and locate to 0,0.
Definition at line 66 of file ACM1602NI.cpp.
void init | ( | ) |
Initialize the device and clear screen.
Definition at line 31 of file ACM1602NI.cpp.
void locate | ( | int | column, |
int | row | ||
) |
Locate to a screen column and row.
- Parameters:
-
column The horizontal position from the left, indexed from 0 row The vertical position from the top, indexed from 0
Definition at line 72 of file ACM1602NI.cpp.
int printf | ( | const char * | format, |
... | |||
) |
Write a formated string to the LCD.
- Parameters:
-
format A printf-style format string, followed by the variables to use in formating the string.
int putc | ( | int | c ) |
Write a character to the LCD.
- Parameters:
-
c The character to write to the display
Generated on Tue Jul 12 2022 18:38:34 by 1.7.2