New to this, Need some starter help


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1

    Default New to this, Need some starter help

    Hey everybody,
    Thanks for reading this.

    I have in the past used microcontrollers to control pumps on and off at different time intervals.

    For my next project I would like to build an security system for my truck. I have got the hardware all worked out. However, I cannot seem to find the right set of keywords.

    I need these keywords to be able to scan pins set to input. I looked at the peek command. It seems promising, I am not sure how to make it read input pins though. I've looked all through the help files, but every time I compile it gives me errors.

    I am using PIC Basic PRO for this one.

    Please help me get this one going.

    Thankyou

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by power_speed View Post
    I have in the past used microcontrollers to control pumps on and off at different time intervals.
    At least you have some sort of a base to work with...

    For my next project I would like to build an security system for my truck. I have got the hardware all worked out. However, I cannot seem to find the right set of keywords. I need these keywords to be able to scan pins set to input. I looked at the peek command. It seems promising, I am not sure how to make it read input pins though. I've looked all through the help files, but every time I compile it gives me errors.
    And yet again, we don't see any code that you've written so far, so we can't tell you why you have errors, what those errors are, why your code doesn't work..etc...etc... My crystal ball doesn't work that well...

    Post some code!!!

  3. #3


    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.

  4. #4
    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...

  5. #5


    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?

  6. #6
    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.

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