1#ifndef SEGDRIVER_PCx85_H
2#define SEGDRIVER_PCx85_H
13 #define MAX_HW_ADDRESS 0
17 #define CMD_LOAD_POINTER 0x00
19 #define CMD_DEVICE_SELECT 0x60
20 #define CMD_BLINK 0x70
21 #define CMD_BANK_SELECT 0x78
22 #define CMD_LAST_COMMAND 0x80
70 virtual void init()
override;
81 void bankSelect(uint8_t input, uint8_t output);
90 void clear()
override;
105 void flush(uint8_t startAddr, uint8_t length)
override;
120 void _writeRam(uint8_t data, uint8_t address = 0)
override;
121 void _writeRam(uint8_t *data,
size_t length, uint8_t address = 0)
override;
146 #define MAX_HW_ADDRESS 39
147 #define MAX_ADDRESS MAX_HW_ADDRESS
Base class for segment LCD display drivers.
ModeBias
Bias mode used by LCD controller.
Definition SegLCDLib.h:25
@ MODE_BIAS_13
1/3 bias
Definition SegLCDLib.h:26
ModeDrive
Drive mode used by LCD controller.
Definition SegLCDLib.h:15
@ MODE_DRIVE_14
1/4 multiplexing
Definition SegLCDLib.h:19
Implementation of the PCF85176 controllers.
Definition SegDriver_PCx85.h:144
SegDriver_PCF85176(TwoWire &i2c, uint8_t address=DEFAULT_PCF85176_I2C_ADDRESS, uint8_t subaddress=DEFAULT_SUBADDRESS)
Constructor for PCF85176 segment driver.
Definition SegDriver_PCx85.h:157
PCF8576 LCD segment driver.
Definition SegDriver_PCx85.h:170
Base class for PCx85 LCD segment display drivers.
Definition SegDriver_PCx85.h:12
ModeStatus
Enable/disable display.
Definition SegDriver_PCx85.h:33
@ MODE_STATUS_BLANK
Display is blanked.
Definition SegDriver_PCx85.h:34
@ MODE_STATUS_ENABLED
Display is enabled.
Definition SegDriver_PCx85.h:35
void command(uint8_t command) override
Send RAW command to controller.
Definition SegDriver_PCx85.h:95
uint8_t _subaddress
Definition SegDriver_PCx85.h:126
void _setMode(ModeStatus status, ModeDrive drive=MODE_DRIVE_14, ModeBias bias=MODE_BIAS_13)
Set the mode of the display.
Definition SegDriver_PCx85.cpp:105
void clear() override
Clear all visible segments on the display.
Definition SegDriver_PCx85.cpp:40
void off() override
Turn the display off.
Definition SegDriver_PCx85.cpp:67
virtual void flush()
Flush all buffered changes to the display.
Definition SegLCDLib.cpp:332
ModeBias _bias
Definition SegDriver_PCx85.h:128
void _deviceSelect()
Select the device for communication.
Definition SegDriver_PCx85.cpp:93
uint8_t _address
Definition SegDriver_PCx85.h:125
virtual void init() override
Logical display sections that can be targeted by higher-level rendering logic.
Definition SegDriver_PCx85.cpp:10
BlinkFrequency
Set blink frequency.
Definition SegDriver_PCx85.h:41
@ BLINK_FREQUENCY_OFF
No blinking.
Definition SegDriver_PCx85.h:42
@ BLINK_FREQUENCY_2
Blink at ~1Hz.
Definition SegDriver_PCx85.h:44
@ BLINK_FREQUENCY_3
Blink at ~0.5Hz.
Definition SegDriver_PCx85.h:45
@ BLINK_FREQUENCY_1
Blink at ~2Hz.
Definition SegDriver_PCx85.h:43
void on() override
Turn the display on.
Definition SegDriver_PCx85.cpp:63
void _writeRam(uint8_t data, uint8_t address=0) override
Low-level method to write a single byte to display RAM.
Definition SegDriver_PCx85.cpp:71
TwoWire & _i2c
Definition SegDriver_PCx85.h:124
static constexpr uint8_t DEFAULT_PCF85176_I2C_ADDRESS
Definition SegDriver_PCx85.h:26
void bankSelect(uint8_t input, uint8_t output)
Select bank for input and output.
Definition SegDriver_PCx85.cpp:14
ModeDrive _drive
Definition SegDriver_PCx85.h:127
BlinkMode
Set blink mode.
Definition SegDriver_PCx85.h:54
@ BLINK_MODE_NORMAL
Normal blink mode.
Definition SegDriver_PCx85.h:55
@ BLINK_MODE_ALTRAM
Alternate RAM blink mode.
Definition SegDriver_PCx85.h:56
void blink(BlinkFrequency blink=BLINK_FREQUENCY_OFF, BlinkMode mode=BLINK_MODE_NORMAL)
Set blink frequency and mode.
Definition SegDriver_PCx85.cpp:27
static constexpr uint8_t DEFAULT_SUBADDRESS
Definition SegDriver_PCx85.h:27
Abstract base class for LCD segment display drivers.
Definition SegLCDLib.h:36
virtual void flush()
Flush all buffered changes to the display.
Definition SegLCDLib.cpp:332