• Pic® Basic


  • How to connect two LCD's to one PIC®

    Should the need arise to connect two LCD's at one to one PIC®, it can be accommodated easily without having to duplicate pinouts or code.

    Simply wire the two LCD’s onto the same IO pins with the exception of the Enable lines which are wired through an AND gate. Each display can be activated by toggling the other input on the AND gate.



    It is wise though to use the AT modifier as things can get a little confusing as you swap between the two LCD's.

    Note: This has only been tested using a 4-line LCD device where the 2 drivers are on the one board. Care should be taken to ensure there are no clashes with dormant data lines.

    Example Code
    Code:
    SYMBOL TOPDISPLAY = PORTB.0
    SYMBOL BOTTOMDISPLAY = PORTB.2
    
    Sets up the bits to control the two halves of the display 
    
    HIGH TOPDISPLAY
    HIGH BOTTOMDISPLAY
    delayms 20
    
    DECLARE LCD_TYPE 0
    DECLARE LCD_DTPIN PORTB.4
    DECLARE LCD_ENPIN PORTB.1
    DECLARE LCD_RSPIN PORTB.3
    DECLARE LCD_INTERFACE 4
    DECLARE LCD_LINES 4
    
    'standard LCD set up
    
    CLS
    LOW BOTTOMDISPLAY
    PRINT AT 1,1,"HELLO WORLD"
    Thanks to Carrotts for supplying this article.
  • Recent Activity

    teo-16018

    Microsoft security essentials blues

    Thread Starter: shantanu@india

    Hi, A strange thing happened just now.My Windows 7 Micrsoft Sercurity Essentials suddenly gave a warning that prplus.exe(Compiler) is a potential...

    teo Today, 19:23 Go to last post
    barak-1433

    SPI mssp

    Thread Starter: picprotonguy

    Just ordered Digital to Analog IC MCP4822 with SPI interface and immediately opened proton manual. I'm very disappointed, it looks like Proton...

    barak Today, 22:50 Go to last post
    David Barker-251

    UMC bootloader 18F46K22

    Thread Starter: shunt010

    Hi all. I am trying to build a UMC bootloader file for the 18F46K22, and it doesn't appear to work. It returns (in the error log) Error ...

    David Barker Today, 11:20 Go to last post