Skip to content

Commit 8f789fe

Browse files
version 1.3.0
1 parent 231533c commit 8f789fe

File tree

13 files changed

+789
-702
lines changed

13 files changed

+789
-702
lines changed

README.md

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/paypalme/whitelight976)
1+
[![Website](https://img.shields.io/badge/Website-Link-blue.svg)](https://gavinlyonsrepo.github.io/) [![Rss](https://img.shields.io/badge/Subscribe-RSS-yellow.svg)](https://gavinlyonsrepo.github.io//feed.xml) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/paypalme/whitelight976)
22

33

4-
![ lcd ](https://github.com/gavinlyonsrepo/pic_16F1619_projects/blob/master/images/LCDPCF.jpg)
4+
![ lcd image ](https://github.com/gavinlyonsrepo/pic_16F1619_projects/blob/master/images/LCDPCF.jpg)
5+
6+
# Hd44780_LCD_PCF8574
57

68
Table of contents
79
---------------------------
810

911
* [Overview](#overview)
1012
* [Installation](#installation)
13+
* [Software](#software)
1114
* [Output](#output)
12-
* [Tested](#tested)
13-
* [Ports](#ports)
14-
15+
* [Tested on](#tested-on)
16+
* [Notes](#notes)
17+
1518
Overview
1619
--------------------
1720
* Name : HD44780_LCD_PCF8574
@@ -31,11 +34,16 @@ Overview
3134
Installation
3235
------------------------------
3336

34-
The library is included in the official Arduino library manger and the optimum way to install it is using the library manager which can be opened by the manage libraries option in Arduino IDE.
37+
The library is included in the official Arduino library manger and the optimum way to install it is using the library manager in the Arduino IDE.
38+
39+
Software
40+
--------------------------
3541

36-
See link below for instruction for this and for the other methods too.
42+
**API**
3743

38-
[Installing Additional Arduino Libraries guide](https://www.arduino.cc/en/Guide/Libraries)
44+
The API (application programming interface) html documentation is at link. Hosted on github pages and generated by Doxygen software. Here the user will find lots of information on files, functions & data types.
45+
46+
[Software API Url Link](https://gavinlyonsrepo.github.io/misc/software_docs/HD44780_LCD_PCF8574/index.html)
3947

4048
Output
4149
---------------------
@@ -48,22 +56,22 @@ Output of custom character test in testrun example file on 16x02 display.
4856

4957
![ pic2 ](https://github.com/gavinlyonsrepo/HD44780_LCD_PCF8574/blob/main/extras/image/2004.jpg)
5058

51-
Tested
59+
Tested on
5260
------------------------
5361

5462
Tested on following MCUs.
55-
The example files are setup for an UNO/NANO for the pin connections used
56-
by for other MCU testing see extras/doc folder GPIO_MCU_used.MD file.
63+
The example files are setup for an UNO/NANO rev 3.0 for the pin connections used
64+
by for other MCU testing see extras/doc folder GPIO_MCU_used.txt file.
5765

5866
1. Arduino UNO & NANO v3
5967
2. ESP8266
6068
3. ESP32
61-
4. STM32 "blue pill", Can support both I2C ports , In example files comment in #define STM32_BLUE_PILL_SETUP
62-
and pick which port you want. Added in Version 1.2.0.
69+
4. STM32 "blue pill", Can support both I2C ports , Use STM32 example file.
6370

64-
Ports
71+
Notes
6572
------------------------
6673

67-
Raspberry Pi C++ : [URL link](https://github.com/gavinlyonsrepo/HD44780_LCD_RPI)
68-
69-
PIC XC32 : [URL link](https://github.com/gavinlyonsrepo/pic_32_projects)
74+
1. "stm32duino" board manager core used in testing STM32 "blue pill"
75+
2. For description of entry modes , cursor types, custom characters etc [See]( http://dinceraydin.com/lcd/commands.htm)
76+
3. 16X04 board not tested but should work.
77+
4. I2C Debugging can be turned on by commenting in a define in header file.

examples/HelloWorld/HelloWorld.ino

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,26 @@
1-
/*
2-
* File: HelloWorld.ino
3-
* Author: Gavin Lyons.
4-
* Description: See URL for full details.
5-
* URL: https://github.com/gavinlyonsrepo/HD44780_LCD_PCF8574
6-
*/
1+
/*!
2+
@file HelloWorld.ino
3+
@author Gavin Lyons
4+
@brief
5+
Hello World for HD44780_LCD_PCF8574 arduino library
6+
*/
77

88
// Section: Included library
99
#include "HD44780_LCD_PCF8574.h"
1010

1111
// Section: Defines
1212
#define DISPLAY_DELAY_INIT 50 // mS
13-
// **** NOTE :: Comment in If using STM32 bluepill ****
14-
//#define STM32_BLUE_PILL_SETUP
1513

16-
17-
// Section: Globals
18-
#ifdef STM32_BLUE_PILL_SETUP // *** STM32 Blue Pill ***
19-
// Set-up Choice I2C interface 1 or 2 :: pick one and one only
20-
TwoWire Wire2(1,I2C_FAST_MODE); // Use STM32 I2C1
21-
//TwoWire Wire2(2,I2C_FAST_MODE); // Use STM32 I2C2
22-
HD44780LCD myLCD(2, 16, 0x27, &Wire2); // LCD object.rows ,cols ,PCF8574 I2C addr, Interface)
23-
#else
24-
// myLCD(rows , cols , PCF8574 I2C address)
25-
HD44780LCD myLCD( 2, 16, 0x27); // instantiate an object
26-
#endif
14+
HD44780LCD myLCD(2, 16, 0x27, &Wire); // instantiate an object
2715

2816
// Section: Setup
2917

3018
void setup() {
3119
delay(DISPLAY_DELAY_INIT);
32-
myLCD.PCF8574_LCDInit(LCDCursorTypeOn);
20+
myLCD.PCF8574_LCDInit(myLCD.LCDCursorTypeOn);
3321
myLCD.PCF8574_LCDClearScreen();
3422
myLCD.PCF8574_LCDBackLightSet(true);
35-
myLCD.PCF8574_LCDGOTO(LCDLineNumberOne, 0);
23+
myLCD.PCF8574_LCDGOTO(myLCD.LCDLineNumberOne, 0);
3624
}
3725

3826
// Section: Main Loop
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*!
2+
@file HelloWorldSTM32.ino
3+
@author Gavin Lyons
4+
@brief
5+
Hello World for HD44780_LCD_PCF8574 arduino library for STM32 "blue pill"
6+
@note Allows testing of both I2C ports 1 and 2 on the STM32 "blue pill" board
7+
*/
8+
9+
// Section: Included library
10+
#include "HD44780_LCD_PCF8574.h"
11+
12+
// Section: Defines
13+
#define DISPLAY_DELAY_INIT 50 // mS
14+
#define STM_I2C1_PORT 1 // STM32 I2C port 1 = I2C1
15+
#define STM_I2C2_PORT 2 // STM32 I2C port 2 = I2C2
16+
17+
// Section: Globals
18+
TwoWire Wire2(STM_I2C1_PORT); // use I2C1 Port 1
19+
HD44780LCD myLCD(2, 16, 0x27, &Wire2);
20+
21+
// Section: Setup
22+
23+
void setup() {
24+
delay(DISPLAY_DELAY_INIT);
25+
myLCD.PCF8574_LCDInit(myLCD.LCDCursorTypeOn);
26+
myLCD.PCF8574_LCDClearScreen();
27+
myLCD.PCF8574_LCDBackLightSet(true);
28+
myLCD.PCF8574_LCDGOTO(myLCD.LCDLineNumberOne, 0);
29+
}
30+
31+
// Section: Main Loop
32+
33+
void loop() {
34+
char testString[] = "Hello World";
35+
myLCD.PCF8574_LCDSendString(testString);
36+
myLCD.PCF8574_LCDSendChar('!'); // Display a single character
37+
while (true) {};
38+
}
39+
40+
// EOF

0 commit comments

Comments
 (0)