Please look over my code


Results 1 to 11 of 11

Threaded View

  1. #5
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: Please look over my code

    Sam,

    the ";" simply denotes a comment. Any code after the ";" has no effect on the program other than to provide a comment anyone trying to figure out what the code is supposed to be doing.

    the "!" is used in combination with the "=" and means "not equal".

    From the PBP manual...
    NOT EQUAL TO you can use either "<>" or "!="
    so where he has
    open_led != open_led
    simply means open_led "is not equal to" open_led.
    It causes the state of "open_led" to go to the opposite state. Similar to a "Toggle" command.

    A couple of other things to consider...
    Is there any chance of moisture accumulating on your PCB that would cause it to be erratic??
    Is your power supply good and stable?
    Why do you use an external ceramic resonator when the PIC has an internal 4MHz oscillator (not that this would cause you problems but it does reduce the I/O pins you have available.)
    You might want to consider incorporating a gate open/closed sensor for positive indication of gate position.



    dwight
    Last edited by Heckler; - 27th March 2016 at 14:51.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

Similar Threads

  1. avr code to code for PIC
    By JasonMcG in forum General
    Replies: 1
    Last Post: - 11th September 2014, 00:57
  2. Serial problem between BasicStamp code and PBP code
    By AllanZilkowsky in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 6th April 2014, 02:15
  3. Working code but my layman approach uses too much code space
    By Christopher4187 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 14th December 2012, 20:44
  4. Code: Why is this code greater than 2000 words?
    By DrDreas in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 1st June 2007, 19:51

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