Code: Select all
const // Opcodes
V0Ratio : byte = 0x20; // Add 0-7 for different values
EVRegSet : byte = 0x00; // Add 0-63 for different contrasts
BoosterRatioReg2X4X : byte = 0x00; // Use in conjunction with BoosterRatioMode
BoosterRatioReg5X : byte = 0x01; // Use in conjunction with BoosterRatioMode
BoosterRatioReg6X : byte = 0x03; // Use in conjunction with BoosterRatioMode
ColumnAdressSet : byte = 0x10; // To create...
BoffVRoffVFoff : byte = 0x20; // Power controller settings
BoffVRoffVFon : byte = 0x21;
BoffVRonVFoff : byte = 0x22;
BoffVRonVFon : byte = 0x23;
BonVRoffVFoff : byte = 0x24;
BonVRoffVFon : byte = 0x25;
BonVRonVFoff : byte = 0x26;
BonVRonVFon : byte = 0x27;
DisplayStartLineSet : byte = 0x40; // Arithmetically add line number to this
EVModeSet : byte = 0x81;
ADCSelectNormal : byte = 0xA0;
ADCSelectReverse : byte = 0xA1;
LCDBiasSet1 : byte = 0xA2; // See ST7565R manual
LCDBiasSet2 : byte = 0xA3;
AllPixOn : byte = 0xA4;
AllPixOff : byte = 0xA5;
DisplayNormal : byte = 0xA6;
DisplayReverse : byte = 0xA7;
CMDDispOff : byte = 0xAE;
CMDDispOn : byte = 0xAF;
PageAdressSet : byte = 0xB0; // Arithmetically add page number to this
CommonOutModeSel1 : byte = 0xC0;
CommonOutModeSel2 : byte = 0xC8;
ReadModifyWrite : byte = 0xE0; // See RMW command, and how it works with
ENDlcd : byte = 0xEE; // END command
Resetlcd : byte = 0xE2;
NOP : byte = 0xE3;
BoosterRatioMode : byte = 0xF8;
const displaytech : array[20] of byte =
(DisplayStartLineSet,
ADCSelectNormal,
CommonOutModeSel2,
DisplayNormal,
LCDBiasSet1, 0x2F,
BoosterRatioMode, 0x00,
BonVRonVFon,
EVModeSet, 0x04,
0xAC,
EVRegSet,
CMDDispOn,
NOP, NOP, NOP, NOP, NOP, NOP);