driving multiple 16x2 LCDS


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1

    Default driving multiple 16x2 LCDS

    i can purchase 8 16x2 LCD displays for the cost of a 20x4 so that makes me think why can't i drive multiple displays from one chip...

    so the idea is that all the data lines, RS and RW lines are all connected together for all displays. it's only the enable lines that have seperate IO lines...

    I tried to compile a uber simple test program as follows;

    Code:
    DEFINE LCD_DREG         PORTD                    ' LCD data port
    DEFINE LCD_DBIT         0                        ' LCD data starting bit 0 or 4
    DEFINE LCD_RSREG         PORTE                    ' LCD register select port
    DEFINE LCD_RSBIT         0                        ' LCD register select bit
    DEFINE LCD_EREG         PORTE                    ' LCD enable port
    DEFINE LCD_EBIT         2                        ' LCD enable bit
    DEFINE LCD_RWREG         PORTE                    ' LCD read/write port
    DEFINE LCD_RWBIT         1                        ' LCD read/write bit
    DEFINE LCD_BITS         8                        ' LCD bus size 4 or 8 data bits
    DEFINE LCD_LINES         2                        ' Number lines on LCD
    DEFINE LCD_COMMANDUS     2000                    ' LCD Command delay time in us
    DEFINE LCD_DATAUS         50                        ' LCD Data delay time in us
    
    Main:
    Pause 1000
    DEFINE LCD_EREG         PORTE                    ' LCD enable port
    DEFINE LCD_EBIT         2                        ' LCD enable bit
    LCDOUT $FE, 1, 2, "LCD 1 line 1"
    LCDOUT $FE, $C0, "LCD 1 line 2"
    DEFINE LCD_EREG         PORTE                    ' LCD enable port
    DEFINE LCD_EBIT         3                        ' LCD enable bit
    LCDOUT $FE, 1, 2, "LCD 2 line 1"
    LCDOUT $FE, $C0, "LCD 2 line 2"
    goto main
    It doesn't allow me to re-define a define... is their another method i could use to get LCDOUT to use a different enable line?

    Thanks

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

  3. #3
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    Just curious why you use 3 pins instead of just 2 pins for the two Enable signals in that circuit?

    Oops! Never mind. It allows you to use a single driver and a single pin for the E signal. Duh!
    Last edited by Mike, K8LH; - 8th October 2010 at 11:14.

  4. #4


    Did you find this post helpful? Yes | No

    Default

    i thought today at work of using two 2 input AND gates on the enable lines and use a second enable line... but, disable works... lol

    Thanks

  5. #5
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    You can use an 8 channels analog mux (74HCT4051), where you connect the pic enable pin to the input and the 8 outputs to 8 different LCDs (with a pulldown resistor). with three extra I/O pic pins you will select the proper LCD address using the selector line S0;S1;S2.


    Cheers

    Al.
    Last edited by aratti; - 9th October 2010 at 16:30.
    All progress began with an idea

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts