LCD display remains empty


Closed Thread
Results 1 to 14 of 14
  1. #1
    Join Date
    Aug 2006
    Location
    In a world of german electrons
    Posts
    102

    Default LCD display remains empty

    I wrote this to display Geez on a lcd and it showed nothing. Can this be due to the code. Circuitry is the one in the manual next to lcdout. PIC 16F628A.

    Code:
        Define OSC 20
        
    Go:    
        LCDOUT "Geez"
        Sleep 100
        GOTO Go
    Greetings
    Last edited by selbstdual; - 20th January 2008 at 11:20.
    Be well - whoever you are.

  2. #2
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    Whe you read the book that came with your version of picbasic you will see that some declarations must be made for the LCD.
    In the declartions the display driver will know how much pins and where the pins come from.
    like this:
    Code:
    	        DEFINE	LCD_DREG PORTB
    		DEFINE	LCD_DBIT 0
    		DEFINE	LCD_RSREG PORTB
    		DEFINE 	LCD_RSBIT 4
    		DEFINE	LCD_EREG PORTB
    		DEFINE	LCD_EBIT 5	
    		DEFINE	LCD_BITS 4
    		DEFINE	LCD_LINES 2
    		DEFINE	LCD_COMMANDUS 2000
    		DEFINE	LCD_DATAUS 50

  3. #3
    Join Date
    Aug 2006
    Location
    In a world of german electrons
    Posts
    102


    Did you find this post helpful? Yes | No

    Default

    I thought this was only necessary if you do not use the standard setup....

    I tried and it did not change anything. So.

    I got this:

    Code:
       Define OSC 20
            DEFINE	LCD_DREG PORTB
    		DEFINE	LCD_DBIT 0
    		DEFINE	LCD_RSREG PORTB
    		DEFINE 	LCD_RSBIT 4
    		DEFINE	LCD_EREG PORTB
    		DEFINE	LCD_EBIT 5	
    		DEFINE	LCD_BITS 4
    		DEFINE	LCD_LINES 2
    		DEFINE	LCD_COMMANDUS 2000
    		DEFINE	LCD_DATAUS 50
        
    Go:    
        LCDOUT "Geez"
        Sleep 100
        GOTO Go
    Last edited by selbstdual; - 20th January 2008 at 11:38.
    Be well - whoever you are.

  4. #4
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    Let us see how you connected everything from the chip to the display.
    Try to adjust the background voltage, may be that is the problem!
    Put a pause of 1 sec. between the declaration and your programm. Maybe the display was not yet setup.

  5. #5
    Join Date
    Aug 2006
    Location
    In a world of german electrons
    Posts
    102


    Did you find this post helpful? Yes | No

    Default

    I have not told you yet that the LCD's functionality is not proven. I was given it by someone in a waste utilization for free.

    How do I figure out whether it works or not? I was able to make the lcd's points show(two rows, all matrices black). What can I conclude from that?
    Be well - whoever you are.

  6. #6
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    selbstdual, If you can see all black pixels then it sounds like the contrast is set too high. How do you have the contrast circuit setup? It should be at minimum a 5k pot between VCC and ground with the center wiper connected to the contrast input pin.

    Dave Purola,
    N8NTA

  7. #7
    Join Date
    Aug 2006
    Location
    In a world of german electrons
    Posts
    102


    Did you find this post helpful? Yes | No

    Default

    Dave, does seeing the matrices mean that the display is working at all?
    Be well - whoever you are.

  8. #8
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    Try adding these 2 things:

    Code:
       Define OSC 20
            DEFINE	LCD_DREG PORTB
    		DEFINE	LCD_DBIT 0
    		DEFINE	LCD_RSREG PORTB
    		DEFINE 	LCD_RSBIT 4
    		DEFINE	LCD_EREG PORTB
    		DEFINE	LCD_EBIT 5	
    		DEFINE	LCD_BITS 4
    		DEFINE	LCD_LINES 2
    		DEFINE	LCD_COMMANDUS 2000
    		DEFINE	LCD_DATAUS 50
    
                    PAUSE 100
        
    Go:    
        LCDOUT $FE,1,$FE,2,"Geez"
        Sleep 100
        GOTO Go
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  9. #9
    Join Date
    Aug 2006
    Location
    In a world of german electrons
    Posts
    102


    Did you find this post helpful? Yes | No

    Default

    First of all I want to make sure that the lcd is working at all. How do I do that?
    Last edited by selbstdual; - 21st January 2008 at 22:13.
    Be well - whoever you are.

  10. #10
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    first, make sure that when you apply power, the top line of the LCD displays solid blocks. If this is the case, try the additions i suggested above.

    If this is not the case, you probably need to have a contrast control for the LCD. You need a variable resistor and hook it up like this:

    Code:
    LCD pin 3
       |
       |   +5v
       |    |
       |    |
       |    \
       |    /
       ---->\ variable resistor (10k or bigger)
            /
            \
            |
            |
           gnd
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  11. #11
    Join Date
    Jun 2006
    Location
    Mountain View California
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    I am not sure if this is your problem, but you might want to try changing "Define OSC 20" to all capitals "DEEFINE OSC 20". The compiler may not recognize lower case in DEFINE statements.

    Ben

  12. #12
    Join Date
    Aug 2006
    Location
    In a world of german electrons
    Posts
    102


    Did you find this post helpful? Yes | No

    Default

    Can we come back to the topic whether the display works or not? Actually the blocks are black, when power is applied. But does that mean that symbols can be displayed? How to figure that out?
    Be well - whoever you are.

  13. #13
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by selbstdual View Post
    I wrote this to display Geez on a lcd and it showed nothing. Can this be due to the code. Circuitry is the one in the manual next to lcdout. PIC 16F628A.

    Code:
        Define OSC 20
        
    Go:    
        LCDOUT "Geez"
        <font color=red>Sleep 100</font color>
        GOTO Go
    Greetings
    Try changing sleep 100 to pause 100 or even pause 1000
    JS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  14. #14
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by selbstdual View Post
    Can we come back to the topic whether the display works or not? Actually the blocks are black, when power is applied. But does that mean that symbols can be displayed? How to figure that out?
    Did you read my last post?

    When power is applied, does the entire screen show blocks, or just the top line? There is a big difference.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

Similar Threads

  1. LCD Display
    By lambert in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th January 2010, 22:18
  2. LCD display not working properly
    By dilpkan in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 2nd February 2008, 07:43
  3. Replies: 14
    Last Post: - 26th September 2007, 05:41
  4. LCD Display not working - PIC heating...
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 24th September 2006, 07:35
  5. A/D display result on LCD
    By winsthon in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 10th January 2004, 10:09

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