Menu

Choice of a 2x20 LCD Display

2025-08-11
2025-08-20
  • Bertrand BAROTH

    Bertrand BAROTH - 2025-08-11

    Hello again ...
    I wanna buy an alpha display and have the choice between 2 controllers : the ST7066U-0A-B and the S6A0069-22 ; which of them is better (in connection mode 4) together with GC Basic ? Thanks for any answer ...

     
  • Anobium

    Anobium - 2025-08-11

    Can you share the URL to the specificions?

     
  • Anobium

    Anobium - 2025-08-11

    GCBASIC-compatible option:

    • Winstar WH2002A – HD44780-compatible, 20x2, parallel interface
     
  • Bertrand BAROTH

    Bertrand BAROTH - 2025-08-11

    So, none of these ?

     
  • Anobium

    Anobium - 2025-08-11

    Check if they are HD44780-compatible.

     
  • Bertrand BAROTH

    Bertrand BAROTH - 2025-08-20

    Meanwhile I found and ordered a 2x20 display with a HD44780 compatible controller (and even low power OLed ! ) Now two questions :

    1) Since the header in the example is for PIC and I am using AVR's, and I wonder if all connections of the LCD are only inputs, is this header OK :

    #Define Ddr_interface DdrB
    #Define Inp_interface PinB
    #Define Outp_interface PortB

    #Define LCD_IO 4
    #Define LCD_DB4 Outp_interface.0
    #Define LCD_DB5 Outp_interface.1
    #Define LCD_DB6 Outp_interface.2
    #Define LCD_DB7 Outp_interface.3
    #Define LCD_RW Outp_interface.4
    #Define LCD_RS Outp_interface.5
    #Define LCD_Enable Outp_interface.6

    Or does the compiler manage the directions ? Pin7 will be defined and used as an input.

    2) If I send successively the two sequences : locate (0,0) and print ("...") and then locate (1,0) and print ("..."), should I add a "wait" instruction between, or does the display manage this (I wonder how, if all lines are only inputs ...) ?

    Thanks for Your answers ...

     

    Last edit: Bertrand BAROTH 2025-08-20
  • HackInBlack

    HackInBlack - 2025-08-20

    look in:-
    "C:\GCstudio\gcbasic\demos\LCD_Solutions\Eight_Wire_LCD_Solutions\LCDCURSOR_8WIRE_TEST_ATMega8_LCD8Bit.gcb"
    for a clear description of LCD headers for AVR Mega chips

     
  • Bertrand BAROTH

    Bertrand BAROTH - 2025-08-20

    Unfortunately I use the "old" GCBasic, not GCStudio. Could You please attach the file ?

     
  • HackInBlack

    HackInBlack - 2025-08-20

    sure no problem

     
  • Anobium

    Anobium - 2025-08-20

    Here are my thoughts based upon the Help.

    Do not try to be clever with the Constants. Use the following.

    #Define LCD_IO 4
    #Define LCD_DB4 PORTB.0
    #Define LCD_DB5 PORTB.1
    #Define LCD_DB6 PORTB.2
    #Define LCD_DB7 PORTB.3
    #Define LCD_RW PORTB.4
    #Define LCD_RS PORTB.5
    #Define LCD_Enable PORTB.6
    

    If you are not going to read the LCD ( many people do not ) delete #Define LCD_RW PORTB.4 and replace with #DEFINE LCD_NO_RW. This save a pin.


    All pins are managed by the library.


    All performance is managed, start with #DEFINE LCD_SPEED SLOW then try the faster options. The performance is really down the LCD itself.


    There are no need for delays. This is all managed.


    Install the demonstration pack. It has nothing to do with Legacy or Modern IDE. Meanwhile, here are many demo for your config. https://github.com/GreatCowBASIC/Demonstration_Sources/tree/main/LCD_Solutions/Four_Wire_LCD_Solutions


    The LCD library is on of the oldest library and you should be able to use all the functionality in the Help and in the demos.

     
  • Bertrand BAROTH

    Bertrand BAROTH - 2025-08-20

    Thanks for all Your answers ...

     

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.