Posted: Mon Apr 30, 2018 10:40 am Post subject: Using multiple LCDs
Normally with bascom you use only one lcd but sometimes its nice to have more than one
Here I will show how to use four or more by switching the chip select lines with an analog switch IC.
Below is a circuit diagram to show how its done I will post some code when I have finished testing
Here are two LCDs displaying different information
this is data from my offgrid solar system
and code used to initialise the two LCDs
Regards Paul
Code:
'=====================================
Glcd_cs1 AliasPortc.2
Glcd_cs2 AliasPortc.3
'select LCD two
'Portd.7 = 0 ResetPortd.7 'Portd.6 = 1 SetPortd.6
'make both chip select 1 Set Glcd_cs1
Set Glcd_cs2
'call initialise LCD from library
!call _Init_lcd
'make both chip select 0 Reset Glcd_cs1
Reset Glcd_cs2
'make both chip select 1 Set Glcd_cs1
Set Glcd_cs2
'call initialise LCD from library
!call _Init_lcd
'make both chip select 0 Reset Glcd_cs1
Reset Glcd_cs2
Yes we have two solutions for character LCDs SPI & I2C
These are graphic LCDs it would be great to have the same for them
they use almost two ports.
Regards Paul
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum