Menu

40 x 4 LCD

Help
MBB
2015-12-28
2021-11-09
  • MBB

    MBB - 2015-12-28

    I have a 40 x 4 LCD. It appears that GCB does not support an LCD this large. Is that correct?

    Are there any plans to add this to GCB?

     
  • Anobium

    Anobium - 2015-12-28

    Do you have the datasheet? I can see no reason why is should not work. Did you try it?

     
  • Keith

    Keith - 2015-12-28

    If I'm not mistaken, attached is the 4x40 Datasheet. I have a couple of them but I haven't had a chance to play with them as yet.

    Hope this helps

     
  • Keith

    Keith - 2015-12-28

    O'pps Sorry wrong Datasheet

     
  • MBB

    MBB - 2015-12-28

    I tried it but it only prints out in the first two rows. I've used locate x, 0, where x = 0 to 8 but it overwrites the previous data and prints in first two rows.

    Its a Vishay VK2440.

    Attached is the data sheet. Note the pin out table on page 2 is completely wrong. The pin out in the block diagram on page 1 is correct. This LCD uses two separtae ENABLE lines.

     
  • Anobium

    Anobium - 2015-12-28

    I really need the programming interface datasheet for Vikay device. Can you find one?

     
  • MBB

    MBB - 2015-12-28

    It uses two HD44780 LCD Display Controller driver chips.

    Does this attachment help?

     
  • Anobium

    Anobium - 2015-12-29

    Should be easily implemented. You have two options. You develop the solution or you send me a display.

    Option 1. We take the exist LCD driver and adapt. For ease, we strip out all but the essential software. Creating new driver LCD40.h. Same commands as a standard LCD.

    Option 2. Send. 😃

    You up for a challenge?

    😃

     
  • MBB

    MBB - 2015-12-29

    Since your in Great Britian and I'm in the USA, it makes shipping and customs fees very expensive. I'll go for option 1.

     
  • Anobium

    Anobium - 2015-12-29

    Let me create a draft driver file. I will to you.

    Can you confirm that you get good functionality from the existing driver? What results do you get when you use locate 0,0 1,0 2,0 and 3,0 with one enable high and the other low? And, the results when you enable the other chip?

    Send me a personal message with your contact email address. I will send you the draft driver.

    Anobium

     
  • MBB

    MBB - 2015-12-29

    Locate 0, 0 gives top LEFT.
    Locate 1, 0 gives second row, LEFT side
    Locate 2, 0 gives top RIGHT
    Locate 3, 0 gives second row, RIGHT side.
    The above use the Enable signal supplied by the GCB LCd.h.

    The below Enable is produce by feeding a high from the PIC to the Enable 2 pin on the LCD module. I'm don't know how to disable the LCD.h enable signal while doing this.

    With Enable 2 high, I got the same results as above for locate 0,0 1,0 2,0 and 3,0.

    If I try locate 4,0 to 7, 0
    I get the following:

    Locate 4, 0 gives top RIGHT.
    Locate 5, 0 gives second row, RIGHT side
    Locate 6, 0 gives top RIGHT
    Locate 7 0 gives second row, RIGHT side.

     
  • Anobium

    Anobium - 2016-01-04

    Now available is a 404, 40 characters by 4 lines, LCD display driver.

    The driver supports all the standard GCB commands plus a few more to control the two chipsets.

    • PUT
    • LOCATE
    • CLS (you can clear all or any one of the screens)
    • LCDHOME (you can home both or any one of the screens)
    • LCDcmd
    • Print – strings, bytes, words, longs and integers
    • LCDHex
    • LCDCursor
    • LCDCreateChar
    • LCDCreateGraph
    • LCDSpace
    • LCDDisplaysOff (note... Displays...)
    • LCDDisplaysOn

    The driver ONLY support 4-bit mode and hardware scrolling of the text across two screen is not implemented. Hardware scrolling of the text across any one of the two screens is supported. There may be other limitations - I will keep this posting updated.

    Example code:

    dim mystring as string * 40
    mystring = "This is a string this is very long."
    
    Cls
    print "Great Cow Basic @ 2016"
    locate 1,0
    print mystring
    locate 2,0
    print mystring
    

    I will include this driver in the v0.95.003 build of Great Cow BASIC. I will also post a direct link to the driver once I have feedback from @MBB.

     
  • Chris Roper

    Chris Roper - 2016-01-04

    For the sake of consistancy would it not be better to make the commands:

    LCDPUT
    LCDLOCATE
    LCDCLS (you can clear all or any one of the screens)
    LCDHOME (you can home both or any one of the screens)
    LCDcmd
    LCDPrint – strings, bytes, words, longs and integers
    LCDHex
    LCDCursor
    LCDCreateChar
    LCDCreateGraph
    LCDSpace
    LCDDisplaysOff (note... Displays...)
    LCDDisplaysOn

    Cheers
    Chris

     
  • Anobium

    Anobium - 2016-01-04

    I should do. I wrote commands based upon the existing command set but I can easily add these commands whilst maintaining backwards compatibility. I will add the LCD prefix to the list of changes to be made.

     
  • Chris Roper

    Chris Roper - 2016-01-04

    I don't think it makes any differance to the compiler but, for the sake of documentation, it may also be better to have them all in sentance case too, i.e.

    LCDPut
    LCDLocate

    etc.

    Cheers
    Chris

     
  • Lawrence E Cox

    Lawrence E Cox - 2021-11-09

    I had two units of this type. They are difficult to use only because their correct pinouts are so difficult to obtain. The datasheet referenced above (ERM4004) gives the correct pinout for the units I purchased.

    I use mostly Arduino, but basics should cross language barriers. There are TWO controllers on each unit, each running half of the display. On my units (VK2440) the top two lines are the first controller (E1) and the bottom two lines are the second (E2). All the other control pins can be bussed, but E1 and E2 must be brought out separately. After figuring out how to connect this display, it works quite well for me, though looks a bit retro.

     
    • Anobium

      Anobium - 2021-11-09

      Good to hear you had success.

      :-)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.