help with multiple outputs...


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2007
    Posts
    3

    Default help with multiple outputs...

    I am new to programming with picBasic Pro. I have used the parallax version. Here is the trouble I am having....
    I want to sequence 2 outputs, triggered by a push button. In words, this is what i want to happen:
    if button is pressed
    turn on 1st output
    wait half a second
    turn on 2nd output (1st output must stay on)
    wait half a second
    turn 2nd output off
    wait 3 seconds
    turn 1st output off

    my coding goes like this:

    main:
    if portb.6 = 1 then
    goto activate
    else
    high portc.0
    endif
    goto main

    activate:
    high portc.0
    pause 500
    high portc.1
    pause 500
    low portc.1
    pause 3000
    low portc.0
    goto main
    end

    it works fine, except portc.0 shuts itself off when i call portc.1 high. I have tried a variety of simple programs, but can only get one output on at a time.
    What am I doing wrong? Basic Stamp editor holds the output high until it is instructed to move it low.

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default

    Hi rickvan,
    Which PIC are you using? My guess is that it has a comparator or something else on the same pins that needs to be turned off.

    EDIT: Oh, I see, you've got help in another thread.
    Last edited by HenrikOlsson; - 25th November 2007 at 17:36.

Similar Threads

  1. Multiple PICS from Same Crystal?
    By WOZZY-2010 in forum General
    Replies: 2
    Last Post: - 6th February 2010, 15:18
  2. 30 PWM outputs on one chip?
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 25th September 2009, 16:32
  3. multiple outputs on....
    By rickvan in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th November 2007, 16:55
  4. Problems controlling multiple pics
    By gandora in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 29th May 2007, 08:59
  5. Multiple IR LEDs from 1 port using transistor
    By belpe123 in forum General
    Replies: 3
    Last Post: - 20th May 2005, 22:07

Members who have read this thread : 1

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