How can i control pic input pins order?


Results 1 to 6 of 6

Threaded View

  1. #1
    tanero's Avatar
    tanero Guest

    Question How can i control pic input pins order?

    For example ,

    Loop :
    IF PORTA=254 then go1
    IF PORTA=253 then go2
    Goto Loop

    go1:
    WHILE PORTA=254
    Pause 500
    High portb.0
    Pause 500
    Low portb.0
    Wend
    Goto Loop


    go2:
    WHILE PORTA=253
    Pause 500
    High portb.1
    Pause 500
    Low portb.1
    Wend
    Goto Loop

    All PORTA inputs goes like that .

    My problem is that ;

    if 1 of "if" is active there is no problem ; it does what should.

    if 2 of "if" is active at the same time ; it doesn't do something , just wait . if i release one of 2 input pins ; it works well.

    Questions;

    is there a way to record input status to use order job. Mean , if one "if" is active it will do its job ; if second if is active (input low) , it will record this request , it will do its job after release first if .

    Note: I just give a part of my code as example ; to be able to understandable . (All A ports will be used.)

    If someone has an idea or some part of code to be used before , i will be happy.
    Last edited by tanero; - 17th August 2005 at 18:32.

Similar Threads

  1. Replies: 9
    Last Post: - 26th October 2009, 19:38
  2. The best way to control a servo with a PIC
    By The Master in forum Off Topic
    Replies: 41
    Last Post: - 19th October 2008, 02:44
  3. using all pins of pwm in pic 18f2431
    By jorgequesada in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 4th May 2007, 21:43
  4. how to control 555 resisters with PIC
    By KB3BYT in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 7th December 2006, 14:27
  5. Analog pins for digital input
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 9th September 2005, 00:32

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