Simple If.. Then help:


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Tear,

    Bruce beat me to the punch..<g> I was typing away, and my automessage came on.... Bruce typed what I was going to type.

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  2. #2
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Tear,

    Using Bruces Code...

    TRISA = %00000011
    TRISB = %00000000
    loop1:
    if PORTA.0 = 1 then
    PORTB.0 = 1
    else
    PORTB.0 = 0
    endif
    goto loop1
    end


    I removed one one of his code (3rd line from the bottom)

    high PORTB.1


    I think without this line, you may have what you are looking for...

    If Porta is on, PortB is on.... If POrta is off.. POrt b is off...
    This also assumes Portb will STAY on until Port A is off. (then PortB will turn off).

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  3. #3
    Tear's Avatar
    Tear Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks for the help guys!


    It is one of the off days on my part

Similar Threads

  1. Simple RF remote control code
    By Bruce in forum Code Examples
    Replies: 13
    Last Post: - 22nd January 2014, 10:45
  2. Simple Blinking LED - WTF!!
    By johnnylynx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st February 2010, 06:19
  3. Simple LCD code not working!...WHY?
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th November 2009, 19:48
  4. Replies: 0
    Last Post: - 2nd February 2009, 23:23
  5. Replies: 4
    Last Post: - 7th September 2005, 14:11

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