Menu

Light Logger Demo is not working

2008-05-11
2013-05-30
  • Nobody/Anonymous

    Hi,

    I'm new to GCBasic and I have to admit that it is a great piece of software. But something pulls me back a little when I tried to compile with the default compiler and also other IDEs...

    Just wondering if anyone has tried to compile the Light Logger demo (both at here http://gcbasic.sourceforge.net/Light%20Logger.txt and also C:\Program Files\GCBASIC\Demos\Light Logger.txt)? I got the following error:
    --------------------------------------------------------------------------
    Great Cow BASIC (0.9 10/2/2007)

    Compiling C:\Program Files\GCBASIC\Demos\Light Logger.txt ...
    An error has been found:

    Configuration setting not valid: MCLRE_OFF

    The message has been logged to the file C:\PROGRA~1\GCBASIC\ERRORS.TXT.

    Press any key to continue
    --------------------------------------------------------------------------

    Apparently, this line is causing problem:
    #config MCLRE_OFF   'Turn off MCLR. WDT and LVP disabled and HS OSC selected automatically

    A search for the PIC16F819 datasheet will reveal that MCLRE bit does exist. My guess is the chipdata needs to be updated as I couldn't find MCLRE bit defined. Any clue or any fix?

     
    • Nobody/Anonymous

      One thing to note, I only install GCBasic (GCBASIC_Installer_0930.exe) without MPASM or MPLAB. So my PC is completely clean from any Microchip software.

       
    • Nobody/Anonymous

      Just found out that Siren.txt also giving the following error:
      --------------------------------------------------------------------------------
      Great Cow BASIC (0.9 10/2/2007)

      Compiling C:\Program Files\GCBASIC\Demos\Siren.txt ...
      Errors have been found:

      Siren.txt (5): Array/Function 10US has not been declared
      Siren.txt (5): Delay units not specified
      Siren.txt (7): Array/Function 10US has not been declared
      Siren.txt (7): Delay units not specified

      The message has been logged to the file C:\PROGRA~1\GCBASIC\ERRORS.TXT.

      Press any key to continue
      --------------------------------------------------------------------------------

       
    • kent_twt4

      kent_twt4 - 2008-05-12

      1.  Yes, the chipdata file is wrong, or is it the data sheet?
      2.  Using Mpasm as the assembler, configuring MCLR_On will compile, so go figure.  Understand about MPLAB being a big download, and was reluctant to use also.  In a pinch, MPLAB will blink a light using assembly, just to make sure you are not crazy.
      3.  Looks like you need to define the constant DelayTime (#define DelayTime XX), as it is not in the eracer.h file.

      Even tho I have admin privilages now, it is mostly for the forum work, and bug reports.  Can't help on the file fixes yet.

       
    • Hugh Considine

      Hugh Considine - 2008-05-13

      I've not looked at the config problem yet, but I think I've found the cause of the second issue.

      The trouble is that DelayTime is both a subroutine in siren.txt, and a constant in sound.h which GCBASIC includes by default. For some reason, GCBASIC must have recently started picking this error up after ignoring it for over a year. Try opening sound.h in Notepad (or similar) and running Find and Replace, replacing ToneDelay with SysToneDelay. Please let me know how this goes!

       
    • Nobody/Anonymous

      Thank you folks for the replies. There is nothing wrong with the chip data neither the data sheet. Same finding here where the MPASM is able to compile Light Logger.txt with SFR. I found out that the error comes from SFR but yet to figure out how to make it work in GCBASIC. Still trying to figure it out for GCBASIC as I found out that inside the MPLAB, we just need to include the linker scripts into the project. Forgive me as I just haven't find out how do we make GCBASIC understand these "linker scripts" that it suppose to read.

       
    • Hugh Considine

      Hugh Considine - 2008-05-14

      The latest update doesn't seem to have had any trouble with the file in the demos folder, but it couldn't handle the one from the site. I've now added a bit of code to translate between MCLR and MCLRE and WDT and WDTEN, and this seems to have fixed the problem.

      To install the latest update over the current version, download http://gcbasic.sourceforge.net/newfiles/update.zip and extract it to the GCBASIC installation folder. Next, download http://gcbasic.sourceforge.net/newfiles/gcbasic.exe. Extract the .h files to the include/lowlevel folder, and the rest to the GCBASIC install directory. (The reason for the complicated installation is that there are some bugs with variable handling that I'll be fixing soon, uploading the full update.zip file doesn't seem like a good idea when it'll only be there for a few days anyway.)

      GCBASIC won't understand linker scripts, it doesn't have a linker.

       
    • Hugh Considine

      Hugh Considine - 2008-05-14
       

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.