having problems with Hantronix 20x4 lcd


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Rhatidbwoy's Avatar
    Rhatidbwoy Guest

    Default having problems with Hantronix 20x4 lcd

    I am having problems with my hantronix lcd screen. I can not get anything out of it. The unit is getting 5 volts of Vd. The ground is connected to ground with the R/W to ground also. The Vl, which is the contrast is connected as Hantronix prescribed and the voltage to that is .8 volts. Then last I am using the 4bit mode.

    I have tried PBP sample for LCD and I have modified the PBC and tried there sample also for the fact that I can manipulate the Init. seq. I still get nothing from everything and I can not find any information over the internet and none from Hantronix. There tech sup is really of no help finding the problem.

  2. #2
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Could be a timing problem. Write a program to verify your configuration settings.

    With the code below you should see the light of the LED 60 times in 1 minute.
    Just count and check your watch. (The LED is ON for 500 ms and OFF for 500 ms).

    Best regards,

    Luciano


    Code:
            Low PORTB.0    ' Turn off LED connected to PORTB.0
    
    
    loop:   Toggle PORTB.0  ' Toggle the LED connected to PORTB.0
            Pause 500       ' Delay for 500 milliseconds
            Goto loop       ' Go back to loop and blink LED forever
    
            End

    (Connection schematic, see the LED and the 470 ohm resistor)

    Last edited by Luciano; - 18th December 2005 at 08:15.

  3. #3
    Rhatidbwoy's Avatar
    Rhatidbwoy Guest


    Did you find this post helpful? Yes | No

    Default

    I think that you are talking about a different project. What the problem that I was having is not seeing anything on a LCD.

    I got something to display, but the problem that I am having now is that the character lineup for the row and column isn't right. 00 for the hdm-20416h is row 1 column 1. I get nothing there when I write to it. from the home position I get something. If I write to line 2 which is 40 I get nothing. 40 meaning line 2 column 2.

  4. #4
    MikeTamu's Avatar
    MikeTamu Guest


    Did you find this post helpful? Yes | No

    Default

    How about you post your code?

  5. #5
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    I was talking about your problem with the LCD.

    Yesterday, before posting, I went through your previous threads
    and I saw amongst other threads "problem with LCD" and "xtal problem".

    The timing is important for a HD44780-based LCD, especially during its initialization.

    The purpose of my test was to check the oscillator frequency. (SW & HW).
    After all, your post was saying "I can not get anything out of it".

    Post your code.

    Best regards,

    Luciano
    Last edited by Luciano; - 18th December 2005 at 08:13.

  6. #6
    Rhatidbwoy's Avatar
    Rhatidbwoy Guest


    Did you find this post helpful? Yes | No

    Default

    luciano.
    thanks for the concern for everything that i have posted on this forum. I got many things to work since I started to write to this forum. xtal problem i fixed with INTRC. The first lcd problem I got to work with the contrast setting. The seond lcd is a hantronix and that is were I am having problems.

    The hantronix screen that I have is the hdm-20416h. The contrast should be controlled with either a single or dual power source. I tried the single and that did not work. I am now working with a dual power source for the contrast and that works. It is not much that it needs dual power source but that it need to have more than 5volt to work. The second problem that I have with the hantronix screen is that the line address is not correct. Line 1 starts with $00 but to go any further into the line i can not do. Line 2 threw 4 is not to what the hantronix reccomend, but it is $C0, $94, $D4 . Those are the line addresses that I have figured out and what I have gotten to work so far. I am having a time trying to figure out what is happenning with line 1, but that is nothing more than the other problems that I had. Time will tell in getting it to work.

    Thank you again for suggestion that I could use for figuring out timing issues.

    The code that I am using is as follows:

    ' PicBasic program to demonstrate operation of an LCD in 4-bit mode
    ' PIC16F628
    ' LCD should be connected as follows:
    ' LCD PIC
    ' DB4 PortA.0
    ' DB5 PortA.1
    ' DB6 PortA.2
    ' DB7 PortA.3
    ' RS PortA.4 (add 4.7K pullup resistor to 5 volts)
    ' E PortB.3
    ' RW Ground
    ' Vdd 5 volts
    ' Vss Ground
    ' Vo 20K potentiometer (or ground)
    ' DB0-3 No connect

    Pause 1000 ' Wait for LCD to startup
    CMCON = 7

    loop: Lcdout $fe, 1 ' Clear LCD screen

    lcdout $FE, $00 + 0, "LINE 1"
    lcdout $FE, $C0 + 0, "LINE 2"
    lcdout $FE, $94 + 0, "LINE 3"
    lcdout $FE, $D4 + 0, "LINE 4"

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    lcdout $FE, $00 + 1, "LINE 1"
    lcdout $FE, $C0 + 1, "LINE 2"
    lcdout $FE, $94 + 1, "LINE 3"
    lcdout $FE, $D4 + 1, "LINE 4"

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    lcdout $FE, $00 + 2, "LINE 1"
    lcdout $FE, $C0 + 2, "LINE 2"
    lcdout $FE, $94 + 2, "LINE 3"
    lcdout $FE, $D4 + 2, "LINE 4"

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    lcdout $FE, $00 + 3, "LINE 1"
    lcdout $FE, $C0 + 3, "LINE 2"
    lcdout $FE, $94 + 3, "LINE 3"
    lcdout $FE, $D4 + 3, "LINE 4"

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    lcdout $FE, $00 + 4, "LINE 1"
    lcdout $FE, $C0 + 4, "LINE 2"
    lcdout $FE, $94 + 4, "LINE 3"
    lcdout $FE, $D4 + 4, "LINE 4"

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    'lcdout $FE, $00 + 5, "LINE 1"
    lcdout $FE, $C0 + 5, "LINE 2"
    lcdout $FE, $94 + 5, "LINE 3"
    lcdout $FE, $D4 + 5, "LINE 4"

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    'lcdout $FE, $00 + 6, "LINE 1"
    lcdout $FE, $C0 + 6, "LINE 2"
    lcdout $FE, $94 + 6, "LINE 3"
    lcdout $FE, $D4 + 6, "LINE 4"

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    'lcdout $FE, $00 + 7, "LINE 1"
    lcdout $FE, $C0 + 7, "LINE 2"
    lcdout $FE, $94 + 7, "LINE 3"
    lcdout $FE, $D4 + 7, "LINE 4"

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    'lcdout $FE, $00 + 8, "LINE 1"
    lcdout $FE, $C0 + 8, "LINE 2"
    lcdout $FE, $94 + 8, "LINE 3"
    lcdout $FE, $D4 + 8, "LINE 4"

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    'lcdout $FE, $00 + 9, "LINE 1"
    lcdout $FE, $C0 + 9, "LINE 2"
    lcdout $FE, $94 + 9, "LINE 3"
    lcdout $FE, $D4 + 9, "LINE 4"

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    'lcdout $FE, $00 + 10, "LINE 1"
    lcdout $FE, $C0 + 10, "LINE 2"
    lcdout $FE, $94 + 10, "LINE 3"
    lcdout $FE, $D4 + 10, "LINE 4"

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    'lcdout $FE, $00 + 11, "LINE 1"
    lcdout $FE, $C0 + 11, "LINE 2"
    lcdout $FE, $94 + 11, "LINE 3"
    lcdout $FE, $D4 + 11, "LINE 4"

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    'lcdout $FE, $00 + 12, "LINE 1"
    lcdout $FE, $C0 + 12, "LINE 2"
    lcdout $FE, $94 + 12, "LINE 3"
    lcdout $FE, $D4 + 12, "LINE 4"

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    'lcdout $FE, $00 + 13, "LINE 1"
    lcdout $FE, $C0 + 13, "LINE 2"
    lcdout $FE, $94 + 13, "LINE 3"
    lcdout $FE, $D4 + 13, "LINE 4"

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    'lcdout $FE, $00 + 14, "LINE 1"
    lcdout $FE, $C0 + 14, "LINE 2"
    lcdout $FE, $94 + 14, "LINE 3"
    lcdout $FE, $D4 + 14, "LINE 4"

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    'lcdout $FE, $00 + 15, "LINE "
    lcdout $FE, $C0 + 15, "LINE "
    lcdout $FE, $94 + 15, "LINE "
    lcdout $FE, $D4 + 15, "LINE "

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    'lcdout $FE, $00 + 16, "LINE"
    lcdout $FE, $C0 + 16, "LINE"
    lcdout $FE, $94 + 16, "LINE"
    lcdout $FE, $D4 + 16, "LINE"

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    'lcdout $FE, $00 + 17, "LIN"
    lcdout $FE, $C0 + 17, "LIN"
    lcdout $FE, $94 + 17, "LIN"
    lcdout $FE, $D4 + 17, "LIN"

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    'lcdout $FE, $00 + 18, "LI"
    lcdout $FE, $C0 + 18, "LI"
    lcdout $FE, $94 + 18, "LI"
    lcdout $FE, $D4 + 18, "LI"

    pause 2000
    Lcdout $fe, 1 ' Clear LCD screen
    'lcdout $FE, $00 + 19, "L"
    lcdout $FE, $C0 + 19, "L"
    lcdout $FE, $94 + 19, "L"
    lcdout $FE, $D4 + 19, "L"
    PAUSE 250

    GOTO LOOP
    Last edited by Rhatidbwoy; - 18th December 2005 at 22:08.

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. Pic18f452 with 20x4 LCD Help
    By djmachine in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 6th November 2008, 22:43
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  5. LCD 20X4 connect with DS1820
    By jojokatada in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 9th March 2005, 11:04

Members who have read this thread : 1

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