Skip to content

Commit

Permalink
fix typo 8754 -> 8574
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursiveError committed Mar 28, 2023
1 parent f02d173 commit 5965c23
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class LCDPCF8754_SOFT : public LCDInterface{
private:
const uint8_t _addr;
public:
LCDPCF8754_SOFT(const uint8_t addr) : _addr{addr}
LCDPCF8574_SOFT(const uint8_t addr) : _addr{addr}
{i2c_init();}
void send(uint8_t config, uint8_t data){
/*
Expand Down
12 changes: 6 additions & 6 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Modular library for alphanumeric LCD compatible with HITACHI HD44780 made with CoreArduino

This Library allows the user to choose and create the communication interface with the LCD display, This Library comes with two interfaces by default: parallel and PCF8754(Wire)
This Library allows the user to choose and create the communication interface with the LCD display, This Library comes with two interfaces by default: parallel and PCF8574(Wire)

(PCF6754 IS NOT IMPLEMENTED FOR PLATFORM WITHOUT I2C SUPPORT, use softI2C example on these platforms)

Expand All @@ -19,7 +19,7 @@ The "send" function receives two uint8_t parameters, "data" and "config", in whi
the state of each bit represents the state of the port: 1 == HIGH | 0 == LOW

connect each bit to its respective port and that's it you already have a functional interface
(to work with PCF8754 you can copy this line ```uint8_t package = (config & 0b00000111) | (data & 0xF0) | 0x08; ``` and send it through I2C library of your choice)
(to work with PCF8574 you can copy this line ```uint8_t package = (config & 0b00000111) | (data & 0xF0) | 0x08; ``` and send it through I2C library of your choice)

#### example soft_i2c
```c++
Expand Down Expand Up @@ -47,15 +47,15 @@ https://github.com/felias-fogg/SoftI2CMaster
#include <SoftI2CMaster.h>

//Implements LCDinterface
class LCDPCF8754_SOFT : public LCDInterface{
class LCDPCF8574_SOFT : public LCDInterface{
private:
const uint8_t _addr;
public:
LCDPCF8754_SOFT(const uint8_t addr) : _addr{addr}
LCDPCF8574_SOFT(const uint8_t addr) : _addr{addr}
{i2c_init();}
void send(uint8_t config, uint8_t data){
/*
The first 3 Low Bits of PCF8754 correspond respectively
The first 3 Low Bits of PCF8574 correspond respectively
RS - R/W - EN

0x08 is the backlight
Expand All @@ -70,7 +70,7 @@ class LCDPCF8754_SOFT : public LCDInterface{
};

//that's all you need to create a custom interface, now just use it.
LCDPCF8754_SOFT interface(0x27);
LCDPCF8574_SOFT interface(0x27);
Omnicrystal lcd(interface, Bus4Bits, 2, 16);

void setup() {
Expand Down
8 changes: 4 additions & 4 deletions examples/Soft_i2c/Soft_i2c.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ https://github.com/felias-fogg/SoftI2CMaster
#include <SoftI2CMaster.h>

//Implements LCDinterface
class LCDPCF8754_SOFT : public LCDInterface{
class LCDPCF8574_SOFT : public LCDInterface{
private:
const uint8_t _addr;
public:
LCDPCF8754_SOFT(const uint8_t addr) : _addr{addr}
LCDPCF8574_SOFT(const uint8_t addr) : _addr{addr}
{i2c_init();}
void send(uint8_t config, uint8_t data){
/*
The first 3 Low Bits of PCF8754 correspond respectively
The first 3 Low Bits of PCF8574 correspond respectively
RS - R/W - EN
0x08 is the backlight
Expand All @@ -45,7 +45,7 @@ class LCDPCF8754_SOFT : public LCDInterface{
};

//that's all you need to create a custom interface, now just use it.
LCDPCF8754_SOFT interface(0x27);
LCDPCF8574_SOFT interface(0x27);
Omnicrystal lcd(interface, Bus4Bits, 2, 16);

void setup() {
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_char/custom_char.ino
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ data: 2023-03-21
LCDParallel LcdInter(RS,EN,D4,D5,D6,D7);
*/
LCDPCF8754 LcdInter(0x27);
LCDPCF8574 LcdInter(0x27);
Omnicrystal lcd(LcdInter, Bus4Bits, 2, 16);

//character array for each part of the Eletrogate logo
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=omnicrystal
version=1.0.7
version=1.0.8
author=Guilherme Silva Schultz
maintainer=Guilherme Silva Schultz <[email protected]>
sentence=Modular Library for HITACHI HD44780
Expand Down
2 changes: 1 addition & 1 deletion src/interface/defultmodules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void LCDParallel::send(uint8_t config, uint8_t data){


#if defined(PIN_WIRE_SDA) && defined(PIN_WIRE_SDA)
void LCDPCF8754::send(uint8_t config, uint8_t data){
void LCDPCF8574::send(uint8_t config, uint8_t data){
uint8_t package = (config & 0b00000111) | (data & 0xF0) | 0x08; //organiza os bits corretamente e envia o pacote
Wire.beginTransmission(_addr);
Wire.write(package);
Expand Down
4 changes: 2 additions & 2 deletions src/interface/defultmodules.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ class LCDParallel : public LCDInterface{

#include "Wire.h"
//Funciona apenas no mode de 4BITS!!!
class LCDPCF8754 : public LCDInterface{
class LCDPCF8574 : public LCDInterface{
private:
const uint8_t _addr; //endereço I2C
public:
LCDPCF8754(const uint8_t addr): _addr{addr}{
LCDPCF8574(const uint8_t addr): _addr{addr}{
Wire.begin(); //Inicia o I2C do hardware
}
void send(uint8_t config, uint8_t data);
Expand Down

0 comments on commit 5965c23

Please sign in to comment.