Menu

Syntax error

Help
2008-04-06
2013-05-30
  • Nobody/Anonymous

    When trying to compile the code to run the LCD routine, I get the following error message.
    "lcd.h (271): Error: Syntax error"
    I am using GCBIDE, a 16f84a @ 20 meg, 8 bit mode...
    Any ideas.
    Mel

     
    • Hugh Considine

      Hugh Considine - 2008-04-06

      What have you set the LCD_DB5 constant to?

       
    • Nobody/Anonymous

      It is not set because I thought that by using 8 bit mode you did not have to set LCD_DB4...DB7.

      Here is the way I wrote the program.(basicly copied form help files, changed for my PIC)

           'Usual setup code
      'Main
           #define LCD_IO 8
           #define LCD_DATA_PORT PORTB
           #define LCD_RS PORTA.0
           #define LCD_RW PORTA.1
           #define LCD_Enable PORTA.2

           PRINT "Hello World"

      Mel

       
    • Hugh Considine

      Hugh Considine - 2008-04-15

      I've no idea what the problem is, I can compile that code with no trouble.

      Try the latest latest update.zip (which I just uploaded a few minutes ago), it didn't generate any error messages when I ran my test program (which makes it compile 230 or so good programs).

      (Link: http://gcbasic.sourceforge.net/newfiles/update-nochipdata.zip\)

      Do any other programs misbehave on your PC, or is it just GCBASIC that isn't working properly? If other programs play up, try running a RAM testing program. I had a PC with a bad RAM module in it once, which made GCBASIC throw random errors and caused Firefox to crash a lot. Running the test program, it'd often fail to compile anywhere up to 5 programs that caused no trouble on other PCs.

       
    • Nobody/Anonymous

      Hugh, see my last post in "DisplayChar".  Last night I compiled the LCD routine with no problem.  The problem was a bad install of one of the updates.  I think that I have it working now.
        Did not have time to set up the bread board to check it out, but will do so in next few days.
      Thanks again for your generous help!!!
      ...Mel

       
    • Nobody/Anonymous

      Hugh, have the LCD on the bread board and it is working fine.  I have only run it in 8-bit mode.  Will try other routines later, but I expect no trouble.
      BTW, clicking on the link above gets me "file does not exist" error.
      ...Mel

       

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.