Symbol not previously defined - lib file


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,728


    Did you find this post helpful? Yes | No

    Default Re: Symbol not previously defined - lib file

    hi malcom
    a quick look says

    FOR pid_Channel = 0 TO 3 ; Set # of bits in resolution
    GOSUB SelectSensor ; for all sensors
    GIE = 0 ; disable interrupts before 1-wire
    @ DS1820_Resolution 12
    GIE = 1 ; enable interrupts after 1-wire
    NEXT pid_Channel
    but you have
    Code:
    PID_Channels CON 1

    its not going to fly
    its expecting 3 more sensors
    Last edited by richard; - 6th February 2015 at 12:08.

  2. #2
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: Symbol not previously defined - lib file

    Quote Originally Posted by Scampy View Post
    That's one of the issues with including files, commenting them out can cause it to fail as it can't find variables etc that are declared in said include file -
    That is why I said that you uncomment include first. I just did that, and with all variable definition, and code down to label init: compiles OK.
    I need 2min to locate first error...
    DS1820_Select macro Regin, Bitin <macro from include
    DS1820_Select _TempSensor1 <from your main code subroutine SelectSensor
    You didn't put Bitin...

  3. #3
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: Symbol not previously defined - lib file

    Guys,

    I've come back to this project again and I'm getting the same error in post #4. Since February I re-hashed the 4 channel version to include 4 AM2302 sensors and a 128 x 64 GLCD. The GLCD used a BV4615 serial controller which made sending data to the GLCD as simple as using a normal LCD display. Anyway this code was used as the basis to convert it to a single channel version. It simply changed the values in array variables and removed references to channels 2,3,and 4 throughout the code (and yes I've remove dthe for next loops as Henrik commented on above).

    I've zipped up all the files and attached them to this post. From what I can see the reference to the BITIN and REGIN are part of the 18B20 include file, but I can't remove that from the include files as it's a key element of the code. I must be missing something from the main code that's either been commented out or needs changing, but is not obvious...at least to me. I would welcome someone more experienced going over the code to check for me. The code is messy as I've removed / commented out all the serial GLCD lines. I'm not worried that the code won't display anything on an LCD yet - I'll tidy that up later - I just want it to compile !
    Attached Files Attached Files

  4. #4
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: Symbol not previously defined - lib file

    Sorted... I started from scratch... taken a day but most of the code is now working

Similar Threads

  1. Replies: 10
    Last Post: - 21st December 2013, 18:48
  2. "symbol not previously defined" on 16F1933 - fuse issue i think
    By comwarrior in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd January 2011, 03:24
  3. Symbol not previously defined
    By Archangel in forum Code Examples
    Replies: 2
    Last Post: - 27th December 2008, 09:52
  4. not previously defind (_INTRC_OSC) errror
    By teverett in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th October 2006, 17:59
  5. Replies: 3
    Last Post: - 3rd September 2003, 12:05

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts