@ Define


Closed Thread
Results 1 to 3 of 3

Thread: @ Define

  1. #1
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511

    Default @ Define

    Hello folks,

    Lets start with what I have.. ok?


    I have the 99 dollar melab programmer with melab software. (It says melabs programmer on the window line).


    I am using the Cdlite IDE for my editor, and using PBP V 2.43? for basic compiler.


    Now with that said, i have tried numberous times to use the @ DEFINE in my *.bas program, and it does not work.

    I have my melabs programmer defaulted under "Options" as

    Update Configuration Checked

    What else must I do to make the melabs programmer automatcially change to the correct chip and defaults?


    I have shorten the @DEFINE down to something small..and tried the following:

    @ DEFINE M12F675,XT_OSC
    @ DEFINE 12F675,XT_OSC
    @DEFINE M12F675,XT_OSC
    @DEFINE 12F675,XT_OSC
    DEFINE 12F675,XT_OSC

    and FINALLY got the following to compile without ERROR:

    DEFINE M12F675,XT_OSC

    (notice there is no @ sign).


    I finally got it to compile, but the melabs does not switch to XT_OSC


    I figured I am missing something... I dont know what yet...

    I would appreciate any help!

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    To save repeating myself, see the detailed reply I just posted on thread "PIC12F629 w/ Internal Oscillator"... There's got to be an FAQ added to this board sometime...

    @ DEVICE XT_OSC

    or

    @ DEVICE pic12F675, XT_OSC

    Defines without @ don't work (other than PBP defines listed in the manual) - compiler just ignores erroneous ones without flagging any error (that includes ones from the PBP manual that you've done a typo on... so make sure you spell them right!).

  3. #3
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Melanie,,

    Melanie>>
    @ DEVICE XT_OSC

    or

    @ DEVICE pic12F675, XT_OSC
    <<


    Thanks!.... You solved the problem, but may not have realized how<g>.

    In Borland Language (My main programming language for our company... we use "DEFINE"...and it is also all capitalized. I was consistantly reading "DEVICE" as "DEFINE" <chuckle>... So I switched all my "DEFINE" to "DEVICE" and presto!

    Dwayne(glazed eyes...)
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

Similar Threads

  1. 2 Pics, different baud rates needed
    By peter_wiersig in forum Serial
    Replies: 3
    Last Post: - 27th February 2010, 15:51
  2. RX TX modules - intermitent communication
    By ruijc in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 11th June 2009, 00:13
  3. Replies: 8
    Last Post: - 17th September 2006, 17:46
  4. help
    By zugvogel1 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th February 2005, 20:42
  5. Need once your help one please
    By zugvogel1 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 9th February 2005, 20:33

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