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