A simple IF Statement!!!!


Results 1 to 26 of 26

Threaded View

  1. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    o.k did you declare TRIS pin direction... if not it will not work.

    or try
    IF SW1 = 1 then High LED

    this one will work.

    remind that all pin are set to input when power is apply to PIC.

    in your case you can also add TRISB.0=0 this will set Portb.0 as output.
    Last edited by mister_e; - 6th December 2004 at 17:34.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Simple Blinking LED - WTF!!
    By johnnylynx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st February 2010, 06:19
  2. Simple LCD code not working!...WHY?
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th November 2009, 19:48
  3. 16F883 and Problems with HIGH statement
    By aaanekre in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 29th October 2009, 01:09
  4. END Statement
    By jderson in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 9th November 2008, 14:48
  5. getting around the basic IF - THEN statement
    By dw_pic in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th February 2006, 14: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