diff --git a/k3ng_keyer/k3ng_keyer.ino b/k3ng_keyer/k3ng_keyer.ino index 638c319..5a30ae7 100644 --- a/k3ng_keyer/k3ng_keyer.ino +++ b/k3ng_keyer/k3ng_keyer.ino @@ -1683,6 +1683,12 @@ If you offer a hardware kit using this software, show your appreciation by sendi #define WIRECLOCK 400000L #endif +#if defined(FEATURE_LCD_HD44780_PINIO) + #include + #include + #include +#endif + #if defined(FEATURE_OLED_SSD1306) #include #include "SSD1306Ascii.h" @@ -2135,6 +2141,10 @@ byte send_buffer_status = SERIAL_SEND_BUFFER_NORMAL; hd44780_I2Cexp lcd; #endif +#if defined(FEATURE_LCD_HD44780_PINIO) + hd44780_pinIO lcd(lcd_rs, lcd_enable, lcd_d4, lcd_d5, lcd_d6, lcd_d7); +#endif + #if defined(FEATURE_OLED_SSD1306) SSD1306AsciiWire lcd; #endif @@ -18752,6 +18762,13 @@ void initialize_display(){ lcd.begin(); lcd.home(); #else + #if defined(FEATURE_LCD_HD44780_PINIO) + // Slower access to older genuine Hitachi devices + // default is setExecTimes(HD44780_CHEXECTIME, HD44780_INSEXECTIME); + // Values in useconds + // lcd.setExecTimes(2000,38);// default + lcd.setExecTimes(2000, 1200);// has to be slow or lcd_centre_print_timed() causes corruption + #endif lcd.begin(LCD_COLUMNS, LCD_ROWS); #endif #endif diff --git a/k3ng_keyer/keyer_dependencies.h b/k3ng_keyer/keyer_dependencies.h index f5547d7..657d640 100644 --- a/k3ng_keyer/keyer_dependencies.h +++ b/k3ng_keyer/keyer_dependencies.h @@ -1,5 +1,5 @@ -#if defined(FEATURE_LCD_4BIT) || defined(FEATURE_LCD_8BIT) || defined(FEATURE_LCD_ADAFRUIT_I2C) || defined(FEATURE_LCD_ADAFRUIT_BACKPACK) || defined(FEATURE_LCD_YDv1) ||defined(FEATURE_LCD1602_N07DH) || defined(FEATURE_LCD_SAINSMART_I2C) || defined(FEATURE_LCD_FABO_PCF8574) || defined(FEATURE_LCD_MATHERTEL_PCF8574) || defined(FEATURE_LCD_HD44780) || defined(FEATURE_LCD_I2C_FDEBRABANDER) || defined(FEATURE_LCD_TWILIQUIDCRYSTAL) || defined(FEATURE_OLED_SSD1306) +#if defined(FEATURE_LCD_4BIT) || defined(FEATURE_LCD_8BIT) || defined(FEATURE_LCD_ADAFRUIT_I2C) || defined(FEATURE_LCD_ADAFRUIT_BACKPACK) || defined(FEATURE_LCD_YDv1) ||defined(FEATURE_LCD1602_N07DH) || defined(FEATURE_LCD_SAINSMART_I2C) || defined(FEATURE_LCD_FABO_PCF8574) || defined(FEATURE_LCD_MATHERTEL_PCF8574) || defined(FEATURE_LCD_HD44780) || defined(FEATURE_LCD_I2C_FDEBRABANDER) || defined(FEATURE_LCD_TWILIQUIDCRYSTAL) || defined(FEATURE_OLED_SSD1306) || defined(FEATURE_LCD_HD44780_PINIO) #define FEATURE_DISPLAY #endif diff --git a/k3ng_keyer/keyer_features_and_options.h b/k3ng_keyer/keyer_features_and_options.h index 1bbc3d9..411be9d 100644 --- a/k3ng_keyer/keyer_features_and_options.h +++ b/k3ng_keyer/keyer_features_and_options.h @@ -34,7 +34,8 @@ // #define FEATURE_LCD_FABO_PCF8574 // https://github.com/FaBoPlatform/FaBoLCD-PCF8574-Library // #define FEATURE_LCD_MATHERTEL_PCF8574 // https://github.com/mathertel/LiquidCrystal_PCF8574 // #define FEATURE_LCD_I2C_FDEBRABANDER // https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library -// #define FEATURE_LCD_HD44780 +// #define FEATURE_LCD_HD44780 // hd44780_I2Cexp subclass control LCD using i2c i/o expander backpack (PCF8574 or MCP23008) see https://https://github.com/duinoWitchery/hd44780 +// #define FEATURE_LCD_HD44780_PINIO // hd44780_pinIO subclass control LCD using direct Arduino Pin connections see https://https://github.com/duinoWitchery/hd44780 // #define FEATURE_OLED_SSD1306 // https://github.com/greiman/SSD1306Ascii // #define FEATURE_CW_DECODER // https://github.com/k3ng/k3ng_cw_keyer/wiki/385-Feature:-CW-Decoder // #define FEATURE_SLEEP // go to sleep after x minutes to conserve battery power (not compatible with Arduino DUE, may have mixed results with Mega and Mega ADK) diff --git a/k3ng_keyer/keyer_pin_settings.h b/k3ng_keyer/keyer_pin_settings.h index 690f06c..2647fc2 100644 --- a/k3ng_keyer/keyer_pin_settings.h +++ b/k3ng_keyer/keyer_pin_settings.h @@ -41,7 +41,7 @@ FEATURE_SIDETONE_SWITCH //lcd pins -#if defined(FEATURE_LCD_4BIT) || defined(FEATURE_LCD_8BIT) +#if defined(FEATURE_LCD_4BIT) || defined(FEATURE_LCD_8BIT) || defined(FEATURE_LCD_HD44780_PINIO) #define lcd_rs A2 #define lcd_enable 10 // pin 10 is used by Ethernet shield and will conflict with that #define lcd_d4 6