Simple LCD code not working..


Results 1 to 8 of 8

Threaded View

  1. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    In theory it has to work, you may have one of those LCD timing problem OR LVP mode set to on. try

    for 16F877a
    Code:
    @   __CONFIG _XT_OSC & _LVP_OFF
    define OSC 4
    
    ' Define LCD registers and bits
    DEFINE  LCD_DREG        PORTB            
    DEFINE  LCD_DBIT        4                    
    DEFINE  LCD_RSREG       PORTB            
    DEFINE  LCD_RSBIT       2                
    DEFINE  LCD_EREG        PORTB            
    DEFINE  LCD_EBIT        3
    DEFINE LCD_COMMANDUS 2000   'Command delay time in us 
    DEFINE LCD_DATAUS 50        'Data delay time in us
    Play with the contrast pot, make sure the R/W pin is tied to low. Not better, you may need to play with COMMANDUS and DATAUS values.

    For the 16F88 you may need to disable some Analog feature.


    HTH
    Last edited by mister_e; - 23rd April 2008 at 14:58.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Simple LCD code not working!...WHY?
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th November 2009, 19:48
  2. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  3. My LCD code is not working...
    By kvrajasekar in forum mel PIC BASIC
    Replies: 2
    Last Post: - 7th December 2008, 05:41
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. LCD issue with EasyPIC5
    By manwolf in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 15th June 2008, 09:17

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