Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Using multiple LCDs

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here
View previous topic :: View next topic  
Author Message
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1257
Location: SYDNEY

australia.gif
PostPosted: Mon Apr 30, 2018 10:40 am    Post subject: Using multiple LCDs Reply with quote

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
Back to top
View user's profile
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1257
Location: SYDNEY

australia.gif
PostPosted: Sat May 12, 2018 5:30 am    Post subject: Reply with quote

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 Alias Portc.2
 Glcd_cs2 Alias Portc.3

   'select LCD two

            'Portd.7 = 0
          Reset Portd.7
            'Portd.6 = 1
          Set Portd.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

     'select LCD one
             'Portd.7 = 0
            Reset Portd.7
            'Portd.6 = 0
             Reset Portd.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
 
Back to top
View user's profile
jure_m

Bascom Member



Joined: 14 Jan 2005
Posts: 68
Location: Ljubljana

slovenia.gif
PostPosted: Thu Jun 21, 2018 8:36 am    Post subject: Reply with quote

Hi Paul,

check if this is of any use for you.

I have used SPI because I wanted to drive LCD with 8-pin AVRs.

Best regards
Jure
Back to top
View user's profile Visit poster's website
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1257
Location: SYDNEY

australia.gif
PostPosted: Thu Jun 21, 2018 11:59 am    Post subject: Reply with quote

Hello jure

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
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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