New to this, Need some starter help


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Here is the code I have currently

    W0 var word
    highin var PORTB 'for input of the inputs pins

    PEEK PORTB, W0 'to take a look at port b and see if
    'if any inputs are high.


    Here are some of the errors I am getting.

    ERROR Line 12: ':' or '=' Expected (Token 'var') (Security.pbc)
    ERROR Line 13: ':' or '=' Expected (Token 'var') (Security.pbc)
    ERROR Line 15: Variable or Constant Expected (Token 'PORTB') (Security.pbc)
    ERROR Line 15: End of Line or ':' Expected (Token ',') (Security.pbc)


    So far this is as far as I have gotten. I am confident that If I can solve these errors I will be better off than I was before.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by power_speed View Post
    W0 var word
    highin var PORTB 'for input of the inputs pins
    PEEK PORTB, W0 'to take a look at port b and see if
    'if any inputs are high.

    Here are some of the errors I am getting.

    ERROR Line 12: ':' or '=' Expected (Token 'var') (Security.pbc)
    ERROR Line 13: ':' or '=' Expected (Token 'var') (Security.pbc)
    ERROR Line 15: Variable or Constant Expected (Token 'PORTB') (Security.pbc)
    ERROR Line 15: End of Line or ':' Expected (Token ',') (Security.pbc)

    So far this is as far as I have gotten. I am confident that If I can solve these errors I will be better off than I was before.
    Are you using PicBasicPro or PicBasic? Where did you buy it from?

    And I suggest you start off with the standard Blinky LED project if you're just getting into PBP. Get that done and you'll be a lot better off...

  3. #3


    Did you find this post helpful? Yes | No

    Default Problem solved!!!!

    I now know what was up. The microcode studio software found the old picbasic that was still installed. I was trying to use picbasic pro commands and it was trying to compile using the picbasic only. I changed that AND no more errors.

    Thank you for your assistance.

    I would still like to know though will the peek command read pins and ports?

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by power_speed View Post
    I now know what was up. The microcode studio software found the old picbasic that was still installed. I was trying to use picbasic pro commands and it was trying to compile using the picbasic only. I changed that AND no more errors.

    Thank you for your assistance.

    I would still like to know though will the peek command read pins and ports?
    The answer awaits you in the manual.

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Yep your right about that. Manual is my new best friend as I proceed onward.

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by power_speed View Post
    Yep your right about that. Manual is my new best friend as I proceed onward.
    I take it that you found the answer to all your questions...at least until next time, yes?

  7. #7


    Did you find this post helpful? Yes | No

    Default

    Yep all is going well now, except for the if then else things. IT keeps telling me that i have a 'then' not preceeded by an if. Also 'else' not proceeded by an if or a then.

    I suppose A little more study will be required to figure this one out.

Similar Threads

  1. PBP and Lassen SQ GPS
    By Ron Marcus in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 2nd July 2012, 16:00
  2. Replies: 4
    Last Post: - 3rd February 2010, 01:47
  3. Replies: 11
    Last Post: - 19th August 2009, 15:23
  4. Remote Car Starter Safety
    By CocaColaKid in forum General
    Replies: 8
    Last Post: - 22nd November 2005, 09:10

Members who have read this thread : 0

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