Menu

LCD

Help
2008-09-09
2013-05-30
  • Peter  Rabiger

    Peter Rabiger - 2008-09-09

    Flipped through the messages if someone posted a similar issue. did not find any. So here is my post:

    I have just discovered GCBasic and I am quite impressed. I am using Crownhill's Proton plus Basic compiler. It looks like that Crownhill against its original promise is not updating for free their compiler anymore. Instead they are offering a so called Proton suite you have to pay for. GCBasic might be a good alternative for my needs.
    Here one observation:
    Proton addresses the LCD by 4 bits. GCBasic can do the same. However it needs an additional port pin for the LCD's RW.  With Proton that RW pin is fixed to ground. That saves a Port pin of the PIC: instead of 7 lines only 6 are needed with Proton. For the connection a standard 8 pin connector can be used ( plus 2 pins for ground and +V) instead of the next bigger size with 10 pins, which would occupy more space on a PCB board and costs a little bit more.
    Port B is the default port for the LCD using Proton. A port definition is only necessary if a different port is selected. Has GCBasic for the print command also a default port setting?
    Is there a chance that the Proton solution (what means a simplification) can be adapted next time?

     
    • kent_twt4

      kent_twt4 - 2008-09-09

      Hugh fixed this previously, but it is hard to dig up from search.
      Try initializing with #define LCD_NO_RW when grounding the RW pin.

       
    • Peter  Rabiger

      Peter Rabiger - 2008-09-10

      Hi Kent,
      thanks for that. I thought its maybe just enough to ground the pin.
      What about my other question:
      Is there a default port-setting for the LCD (like default portb) or must this be defined every time? Not a big thing but convenient if there is a default set-up.

       
    • kent_twt4

      kent_twt4 - 2008-09-10

      By default GCBasic uses the R/W pin feature, it makes for  really fast comms, at the expense of the extra pin.

      There is no default port setting in lcd.h.  I can see where this could be a hassle for some used to doing things a certain way.  Given the confounding number of Pic models out there, and possible board configurations, setting the default would seem futile?

      If you are porting over your code for multiple files there are number of different options available.  It probably makes sense to change the lcd.h library to handle your situation, to save plugging in all those lines of code.  One thought that comes to mind is to have a define in your project files, with a corresponding conditional statement in the lcd.h low level include file.  The code might look like:

      'Project File

      #define LCD_PORTB_NO_RW

      'lcd.h File

      #IFDEF LCD_PORTB_NO_RW
      #define LCD_NO_RW
      'Set the Port Pins for PORTB this way
      ...
      ...
      #ENDIF

      #IFNDEF LCD_PORTB_NO_RW
      'Default setting of aliased Port pins
      ...
      ...
      #ENDIF

       
    • Peter  Rabiger

      Peter Rabiger - 2008-09-30

      Hi Kent,
      thanks for your reply. I am translating the English Help file into German. By this way I LEARNED A LOT about GCB. Actually all my questions are answered here and confirm your suggestions. Thanks again

       

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.