--- This is a test - only visible to admins ---
--- advertisement may go here ---
  • 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

    normnet-324

    PIC iPod wav player

    Thread Starter: normnet

    Coming in the next month or two a PIC iPod wav player. Plays 44k, 8 bit, stereo wav files from an SD card. Displays BMP pictures on a NOKIA 6100...

    normnet Today, 13:59 Go to last post
    teo-16018

    Frequency counter

    Thread Starter: teo

    Hello everybody Can someone help me with a piece of code to measure a frequency (1Hz to 160 Hz) precision two decimals. The result is transmitted...

    teo Yesterday, 17:43 Go to last post
    joesaliba-353

    Multiple functions by a single switch

    Thread Starter: amod

    Hi, How can I use multiple function by a single switch.I want to use 4 functions by a single switch.

    joesaliba Today, 09:19 Go to last post
    steyn-15336

    PickitPlus for Pickit2 and Pickit3 works well

    Thread Starter: leonj

    Hi Everyone, I have always had issues with Pickit2/Pickit3 and I'm glad to say they seem to all be solved now. I obtained PickitPlus from Even at...

    steyn Today, 09:34 Go to last post
    RGV250-614

    SD routines for 18F series

    Thread Starter: charliecoultas

    I've used the SD routines very successfully for the P24 chips, but now I need to attach an SD card to a 18F26K22. Do such routines exist and if...

    RGV250 Yesterday, 19:40 Go to last post