Hello Rob,
I solved it like this:
Modified the lib and saved it separately:
--------------------------------------------------
-------------------------------------------------- --------
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:
> Hi Hans,
>
> Not sure if I understand you correctly but you have 2 enable pins, 1 for
> each display. Why do you want to change the alias of a pin? Why not just
> use the 2 pins and use 2 aliases? I do not understand the difference
> between changing aliases and changing pins.
>
> Can you explain it in more detail?
>
> Thanks
>
> Kind regards,
>
> Rob
>
> ------------------------------
> *Van:* [email protected] <[email protected]> namens hans <
> [email protected]>
> *Verzonden:* woensdag 15 februari 2023 21:00
> *Aan:* jallib <[email protected]>
> *Onderwerp:* [jallib] double LCD
>
> Hi all,
> I have a few LCDs which have 2 x 2 character lines. All connections are
> common, but each part has its own enable. So if I change the enable I can
> control both. Is there a way to change the alias of the enable in the
> program to change to another pin?
> regards
> Hans
>
> --
> You received this message because you are subscribed to the Google Groups
> "jallib" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jallib/37f2b309-6b73-465a-be49-dda946113510n%40googlegroups.com
>
> <https://groups.google.com/d/msgid/jallib/37f2b309-6b73-465a-be49-dda946113510n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jallib/d6908e98-5078-4c81-a7ec-67f8af00c535n%40googlegroups.com.