Menu

lcdcmd

2022-02-02
2022-02-07
  • roger lower

    roger lower - 2022-02-02

    Tried using "lcdcmd 24" get "syntax error" have to use "lcdcmd = 24"

     
    • Anobium

      Anobium - 2022-02-03

      We would need a lot more information.

      LCDCMD value works.

      Please post your program as an attachment ?

       
  • William Roth

    William Roth - 2022-02-03

    Hi Roger,

    lcdcmd is a subroutine in the lcd.h library. "lcdcmd 24" or "lcdcmd (24)" is the correct syntax.

    If you are getting a syntax error, then it is most likely that the LCD setup/configuration is incorrect or missing in your GCB source code. "lcdcmd = 24 only stops the error and does not resolve anything.

    As Anobium suggested, we need to see the complete GCB source code to find the cause of the syntax error.

    To see examples of various LCD configurations with correct syntax you can look at the Demos.

    C:\GCB@Syn\GreatCowBasic\Demos\lcdsolutions

     

    Last edit: William Roth 2022-02-03
  • roger lower

    roger lower - 2022-02-03

    You have given me a lot to check, but to give a quick response I have attached the code that gives the syntax error

     
  • William Roth

    William Roth - 2022-02-04

    I am assuming that you are using the current version Great Cow Basic. If not then you should update to the latest release. If for some reason you are using an old version please let us know what version as there have been hundreds of fixes, updates, and enhancements since the previous release.

    I loaded your code and did not get a "syntax error". However the compiler did return the following error:

    "Warning: Internal oscillator clock source does not support the specified 
    frequency. A simulator will operate with the specified frequency"
    

    This appears to be due to a typo on line 29 of 16F627.dat

     IntOsc=0
    

    This should read "IntOsc=4" instead

    However this may not be the case if you are using an old version of GCB as the chip data files could be different.

    So please update or tell tell us what version of GCB you are using.

     
  • roger lower

    roger lower - 2022-02-04

    I am actually using graphical basic, version is 1.0.6462.39479 ?

    My code had :
    ;Chip Settings

    chip 16F627,4

    config OSC=INTRC_OSC_NOCLKOUT

    ?

     
  • roger lower

    roger lower - 2022-02-04

    I just tried "LCD cursor 8 wire test" from C:\GCB@Syn\GreatCowBasic\Demos\lcdsolutions,
    all of the printable characters are OK but non of the non printable functions work, just random non alpha numeric characters show. Perhaps I have a faulty LCD display.

     
    • Anobium

      Anobium - 2022-02-05

      Probably not broken.

      Explicit question. Is this the file you are using? C:\GCB@Syn\GreatCowBasic\Demos\lcd_solutions\eight_wire_lcd_solutions\lcdcursor_8wire_test_16f688_lcd8bit.gcb or it is another program? I cannot find a demo "LCD cursor 8 wire test" from C:\GCB@Syn\GreatCowBasic\Demos\lcdsolutions,

      Explicit question. What version are you using? Please open the ASM file that is being produced. This is located in the same folder as your source but the ASM has the extension of .ASM (not .GCB). Look at the top line. Post the top line to a post.

      We need this info.

       
  • roger lower

    roger lower - 2022-02-04

    I may be missing a data bus bit to the display I will scope an all 0's all 1's repetative write to it tomorrow

     
  • roger lower

    roger lower - 2022-02-05

    Checked wiring to the LCD with alternating 0,1 bits and all is good.
    The file I am using is C:\GCB@Syn\GreatCowBasic\Demos\lcd_solutions\eight_wire_lcd_solutions\lcd_8wire_test_16f688_lcd8bit, modified for 16f627, copy attached.

    Version is 0.9 18/2/2011

     
  • roger lower

    roger lower - 2022-02-05

    Just checked and it looks like I am way out of date! I will go ahead and try to update

     
  • roger lower

    roger lower - 2022-02-05

    Updated everything and things are starting to work. Many thanks to all, how do I close this thread

     
  • roger lower

    roger lower - 2022-02-06

    I don' know how I got an old copy of everything, I only set it up about 2 months ago. You obviously have to pay close attention to the download site you are using. Everything makes sense now, I feel a bit of a twit (I'm a brit). Will go to the close out.

     
    • Anobium

      Anobium - 2022-02-07

      What version number where you using?

       
    • stan cartwright

      stan cartwright - 2022-02-07

      I usually check the forum for Anobiums posts about new gcb releases and click the link he provides. There on sourceforge will be a download gcb button top-left and a list beneath.
      In that list will be the latest gcb version, it's not the download gcb button at the top.

       

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.