LCD Control


Results 1 to 29 of 29

Thread: LCD Control

Threaded View

  1. #19
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Your display is not correctly initialized.
    (This is why you get only one line).

    In order to use your LCD (KS0070b), you will have
    to manually initialize the KS0070b before you call the
    first PicBasic LCDOUT.

    Below you can find the pseudo code + a table.

    Best regards,

    Luciano


    See PDF page 32 for the initialization of the KS0070B in 4 bit mode
    http://www.ee.oulu.fi/research/tklab...river-3316.pdf


    Code:
    KS0070b Initialization
    
    2x16 LCD (KS0070b)
    4 bit mode
    2 lines
    Display=on
    Cursor=off
    Blink=off
    Increment mode
    Entire shif=off
    
    (Pseude-code, same as the table below).
    
    ==============================================
    Power on  
    (PIC and LCD module).
    ==============================================
    Wait 40 ms
    ==============================================
    
    (Function Set)
    
    ------------------
    Set the LCD pins: 
    DB7,DB6,DB5,DB4 = 0010
    
    Toggle the Enable line:
    PULSOUT Enable_Pin,100 (min.100 µs) 
    ------------------
    Set the LCD pins:
    DB7,DB6,DB5,DB4 = 0010
    
    Toggle the Enable line:
    PULSOUT Enable_Pin,100 (min.100 µs)
    ------------------
    Set the LCD pins:
    DB7,DB6,DB5,DB4 = 1000 (2 lines, 5x7 dots)
    
    Toggle the Enable line:
    PULSOUT Enable_Pin,100 (min.100 µs)
    ------------------
    ==============================================
    Wait 100 µs
    ==============================================
    
    (Display On/Off Control)
    
    Set the LCD pins: 
    DB7,DB6,DB5,DB4 = 0000 
    
    Toggle the Enable line:
    PULSOUT Enable_Pin,100 (min.100 µs)
     
    Set the LCD pins: 
    DB7,DB6,DB5,DB4 = 1100 (Display on, cursor off, blink off).
    
    Toggle the Enable line:
    PULSOUT Enable_Pin,100 (min.100 µs) 
    
    ==============================================
    Wait 100 µs
    ==============================================
    
    (Clear display)
    
    Set the LCD pins:
    DB7,DB6,DB5,DB4 = 0000 
    
    Toggle the Enable line:
    PULSOUT Enable_Pin,100 (min.100 µs) 
    
    Set the LCD pins:
    DB7,DB6,DB5,DB4 = 0001
    
    Toggle the Enable line:
    PULSOUT Enable_Pin,100 (min.100 µs) 
    
    ==============================================
    Wait 2 ms
    ==============================================
    
    (Entry Mode Set)
    
    Set the LCD pins:
    DB7,DB6,DB5,DB4 = 0000
    
    Toggle the Enable line:
    PULSOUT Enable_Pin,100 (min.100 µs) 
    
    Set the LCD pins:
    DB7,DB6,DB5,DB4 = 0110 (Incremet mode, entire shif off). 
    
    Toggle the Enable line:
    PULSOUT Enable_Pin,100 (min.100 µs) 
    
    ==============================================
    Wait 2 ms
    ==============================================
    
    
    End of the KS0070b Initialization.
    Last edited by Luciano; - 19th January 2006 at 21:36.

Similar Threads

  1. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  2. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  3. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  5. 4x40 LCD control problem
    By NL2TTL in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 5th January 2005, 11:43

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