LCD driver compatability


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    DEFINE OSC 10
    DEFINE LCD_DREG PORTA
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 0
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 1
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50

    ' DATA LINES ON PORTA.0 - 3 for DB4 to DB7
    ' 4 BIT MODE
    ' E PIN ON PORTB.1
    ' RS PIN ON PORTB.0
    ' TRIED COMMANDUS UP TO 5000 and DATAUS UP TO 255

    ADCON1 = 7
    TRISA = %00000000
    TRISB = %00000000



    Pause 5000 ' Wait for LCD to startup

    loop: Lcdout $fe, 1 ' Clear LCD screen
    Lcdout "Hello" ' Display Hello
    Pause 2000 ' Wait 2 seconds

    Lcdout $fe, 1 ' Clear LCD screen
    Lcdout "World"
    Pause 2000 ' Wait 2 seconds

    Goto loop ' Do it forever


    Picture to follow after camera batteries have finished charging.

  2. #2
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default I'm a moron

    Ermmmm yeah - helps to turn OFF the ADC instead of ON!! The 18F1320 has an ADCON1 bit for each ADC pin, and its 0 for ADC channel i/p and 1 for Digtial o/p.
    All is well and my sexy new Optrex Negative blue LCD is working great. Haven't tried the Tianma yet, or the Noritake VFD.
    Will update.

Similar Threads

  1. Is this code not initialising the LCD properly?
    By Platypus in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th January 2010, 20:14
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 20:54
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 17:56
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 27th June 2007, 00:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 03:30

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