Code that worked with WINDSTAR LCD doesn't work with Newhaven LCD?


Closed Thread
Results 1 to 37 of 37

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Location
    California, USA
    Posts
    323


    Did you find this post helpful? Yes | No

    Default

    When I bought my Newhaven displays, the pinout difference stood out immediately to me in the data sheet.
    On the Lumex, and all other displays I've used, the Vss, Contrast, and Vdd pins are laid out in a row with the contrast in the middle like the pins on a pot usually are, with a voltage across the "outer" legs and the wiper in the middle.

    The out of sequence power / contrast / ground sequence caught my eye right off.

    Sorry I didn't mention it sooner. I didn't think about it until the word "Newhaven" came up again in one of the later posts and sparked a brain cell....

    I hope that's the problem for Jellis00 !


    Steve

  2. #2
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Newhaven LCD interface

    Quote Originally Posted by Byte_Butcher View Post
    The out of sequence power / contrast / ground sequence caught my eye right off.

    Sorry I didn't mention it sooner. I didn't think about it until the word "Newhaven" came up again in one of the later posts and sparked a brain cell....

    I hope that's the problem for Jellis00 !
    Unfortunately not, Steve.
    Here is data right out of the data sheet for my display and Contrast Vo is in the right plac:.
    Pin No. Symbol Function Description
    1 Vss Power Supply Ground
    2 VDD Power Supply Supply voltage for logic (+3.3V)
    3 V0 Power Supply Power supply for contrast (approx. 0.3V)

    My MCU interface to the Newhave LCD is correct with their data sheet and is shown in attached image. Still looking for the problem.
    Attached Images Attached Images
    Last edited by jellis00; - 15th April 2010 at 02:06. Reason: enter table of pins

  3. #3
    Join Date
    Jan 2009
    Location
    California, USA
    Posts
    323


    Did you find this post helpful? Yes | No

    Default

    Well that's a tough nut to crack...

    Did I miss it or is there link to the Data Sheet for your newhaven display somewhere?


    steve

  4. #4
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Here is URl to the LCD spec

    Quote Originally Posted by Byte_Butcher View Post
    Well that's a tough nut to crack...

    Did I miss it or is there link to the Data Sheet for your newhaven display somewhere?
    You can get the spec on this display I am using at this URL:

    http://www.newhavendisplay.com/index...roducts_id=258

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I know you tried COMMANDUS 3000, have you also tried bump up DATAUS? I have some displays(brand???) that need COMMANDUS 3000 and DATAUS 150.

    Silly question...
    Is the ADC stuff off..?
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Problem finally solved!

    I am totally embarrassed to tell everyone I found the problem....and it was one of my own making. I had an intermittent trace on the PCB between the MCU pin and the LCD's R/W pin. I wouldn't have found this if Darrel Taylor hadn't sent me a manual initialization routine that (as he said) if the LCD didn't work with it, it never would. When it didn't work it forced me to go back aqnd re-verify the PCB interfaces to the LCD. I had done this before but somehow missed the bad R/W interconnect....I suppose it was intermittenly working at the time.

    At any rate, I totally appreciate all the good advice I received on this thread. The people that support this forum are the best.

    As a small token of "give back" I am posting my final code for the routine that now works with the NEWHAVEN displays. I highly recommend them...they are low cost ($8.25 ea) and even though they don't require a backlight their reflectance performance gives a very readable display in even low light conditions....plus their tech support is outstanding.
    Here is code for initializing their 2x8 LCD modules...they have one for 5vdc operation and one for 3vdc operation that has exactly the same physical and electrical interfaces...and both at $8.25.

    InitializeDisplay: ' Subroutine to initialize NEWHAVEN NHD-0208AZ-RN-YBW
    '================= ' 2x8 LCD2X8 LCD display

    ' Blink LED_GRN twice to indicate entered IntializeDisplay
    For i = 0 to 1
    HIGH LED_GRN
    Pause 500
    LOW LED_GRN
    PAUSE 500
    Next

    ' LCD DEFINES FOR USING 2x8 LCD with PortA
    DEFINE LCD_DREG PORTA ' Use PORTA for LCD Data
    DEFINE LCD_DBIT 0 ' Use lower(4) 4 bits of PORTA
    ' PORTA.0 thru PORTA.3 connect to
    ' LCD DB4 thru LCD DB-7 respectively
    DEFINE LCD_RSREG PORTA ' PORTA for RegisterSelect (RS) bit
    DEFINE LCD_RSBIT 4 ' PORTA.4 pin for LCD's RS line
    DEFINE LCD_RWREG PORTC ' LCD read/write port
    DEFINE LCD_RWBIT 2 ' LCD read/write bit
    DEFINE LCD_EREG PORTA ' PORTA for Enable (E) bit
    DEFINE LCD_EBIT 5 ' PORTA.5 pin for LCD's E line
    DEFINE LCD_BITS 4 ' Using 4-bit bus
    DEFINE LCD_LINES 2 ' Using 2 line Display
    DEFINE LCD_COMMANDUS 10000' Command Delay (uS)
    DEFINE LCD_DATAUS 100 ' Data Delay (uS)

    ' DEFINE LCD Control Constants
    Line1 CON 128 ' Point to beginning of line 1 ($80)
    Line2 CON 192 ' Point to beginning of line 2 ($C0)

    ' Test the LCD during initialization
    LCDOut $fe,1:FLAGS=0:Pause 250 ' Clear Display
    LCDOut $fe,Line1,"LCD TEST" ' Display on 1st line
    Pause 500
    LCDOut $fe,Line2,"Power On!" ' Display on 2nd line
    PAUSE 1000
    Return

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


    Did you find this post helpful? Yes | No

    Default Re: Code that worked with WINDSTAR LCD doesn't work with Newhaven LCD?

    Bumping this old thread as I'm about to use a Newhaven display for the first time. I have a NHD-0216K1Z-NSRGB-FBW 16x2 5.0V display. http://www.newhavendisplay.com/specs...-NSRGB-FBW.pdf I'll be using a 18F2550 for the first time. The LCD will be on portB and in 4 bit mode.

    Looking at the above working code, is that really a 10000us delay? What does the FLAGS=0 mean?

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