Menu

problem write Hardware Settings for LCD

2023-09-20
2023-09-28
  • LANCELOT Thierry

    Hello,
    I'm a college teacher and I want to use only the graphics mode of GCB.
    I have a problem configuring the hardware settings with a ground. The full explanation is in the pdf file.
    Is this a problem with GCB in graphics mode or do I need to configure Hardware Settings with a specific command?
    Sorry for the writing but I'm French and I only have school English.
    Merci beaucoup
    Sincerely

     
  • Anobium

    Anobium - 2023-09-20

    Great question.

    In GC Graphical BASIC - edit as text ( press ALT-F2) and change the program to have #define LCD_NO_RW as shown below. This will disable the RW and then you can ground the connection.

    ALT-F1 to revert to icon mode.

    Hope this helps.

    Evan

    ;Chip Settings
    #chip 16F88,4
    #config MCLRE=ON
    
    ;Defines (Constants)
    #define LCD_IO 4
    #define LCD_NO_RW 
    #define LCD_RS PORTB.3
    #define LCD_Enable PORTB.0
    #define LCD_DB4 PORTB.4
    #define LCD_DB5 PORTB.1
    #define LCD_DB6 PORTB.6
    #define LCD_DB7 PORTB.7
    
    Do Forever
        Print "Test"
        Wait 500 ms
        CLS
        Wait 800 ms
    Loop
    
     
  • LANCELOT Thierry

    Hello Anobium,
    Thanks for the reply. I already had this solution and it works very well for me. It's a pity that there isn't the possibility of configuring the mass directly in graphic mode. Perhaps a modification should be made in a future version of GCBG.
    In any case, congratulations on this wonderful software.
    Have a nice day!
    Thierry

     
    • Anobium

      Anobium - 2023-09-23

      I agree. I will try to find time to add this as a feature.

       
  • Anobium

    Anobium - 2023-09-26

    @Thierry,

    Please replace the attachment in your GCBASIC directory replacing the file that is there.

    This will now show a new entry, LCD_NO_RW - if you select then the the source will be correct.

     
  • LANCELOT Thierry

    Hello Anobium,
    Thank you very much for the replacement. It's good :-)
    See you later

     
    • Anobium

      Anobium - 2023-09-26

      Well today I learnt that the UI in GC Graphical BASIC is in that configuration file.

      How cool is that!

      If someone wants to add more of the newer commands, please do. Post to the forum and I will pick up.

       
  • LANCELOT Thierry

    Oops!
    More thorough check: there are still problems.
    Hardwares Settings with 2 lines R/W Pin
    And the Basic program is

    ;Chip Settings!
    #chip 16F628A,4
    
    Defines (Constants)
    #define LCD_IO 4
    #define LCD_NO_RW LCD_NO_RW
    #define LCD_RS PORTB.3
    #define LCD_Enable PORTB.0
    #define LCD_DB4 PORTB.4
    #define LCD_DB5 PORTB.1
    #define LCD_DB6 PORTB.6
    #define LCD_DB7 PORTB.7
    

    There is a compilation problem with #define LCD_NO_RW LCD_NO_RW
    (Indication Error : Recursive define)
    Have a nice day
    Thierry

     
  • Anobium

    Anobium - 2023-09-26

    Of course,

    Try this. Change line 529 in commands.dat to Ground

    Change, test and post result. :-)

     
    • Anobium

      Anobium - 2023-09-26

      A more meaningful message on line 529 would be this.

      // RW Connected to 0v0

       
  • LANCELOT Thierry

    Hello Anobium,
    Now, it's OK :

    ;Defines (Constants)
    #define LCD_IO 4
    #define LCD_NO_RW RW Connected to 0v0
    #define LCD_RS PORTB.3
    #define LCD_DB4 PORTB.4
    #define LCD_Enable PORTB.0
    #define LCD_DB5 PORTB.1
    #define LCD_DB6 PORTB.6
    #define LCD_DB7 PORTB.7
    
    Do Forever
      Print "Test"
      Wait 500 ms
      CLS
      Wait 800 ms
    Loop
    

    Now Compilation is OK
    Thanks you very Much
    Cordialy
    Thierry

     
  • Anobium

    Anobium - 2023-09-28

    Superb - pleasure.

     

Log in to post a comment.