Hello Rob,
I solved it like this:
Modified the lib and saved it separately: as lcd_hd44780_4_double
-------------------------------------------------- -------------------------------------------------- --------
if LCD_ON == low then
-- clock pulse
lcd_en = HIGH -- trigger on
_usec_delay(1) -- delay (> 400ns)
lcd_en = LOW
else
lcd_en2 = HIGH -- trigger on
_usec_delay(1) -- delay (> 400ns)
lcd_en2 = LOW
end if -- triggeroff
end procedure
-------------------------------------------------- -------------------------------------------------- ---
and the program adapted accordingly:
-------------------------------------------------- ----------------
alias lcd_en2 is pin_A1 -- data trigger second lcd
pin_A1_direction = output
var bit LCD_ON = low
alias lcd_d4 is pin_B0
alias lcd_d5 is pin_B1
alias lcd_d6 is pin_B2
alias lcd_d7 is pin_B4
--
pin_B0_direction = output
pin_B1_direction = output
pin_B2_direction = output
pin_B4_direction = output
--
include lcd_hd44780_4_double
--
lcd_init()
LCD_ON = high
lcd_init() -- init the lcd controller
-------------------------------------------------- -----------------------------------
Now if I toggle the bit LCD_ON I switch from one to the other.
regards
Hans
Op donderdag 16 februari 2023 om 20:56:21 UTC+1 schreef Rob CJ: