Shop OBEX P1 Docs P2 Docs Learn Events
Q: BSII - Two Output-Pins at the same time? Help needed. — Parallax Forums

Q: BSII - Two Output-Pins at the same time? Help needed.

ArchiverArchiver Posts: 46,084
edited 2003-10-26 22:38 in General Discussion
Hello Group,

my question is:

Is there a possibility to drive 2 output-pins at the same time?

What I mean is, I use this to drive two LED`s:


FOR level = 0 TO 255 Step a
PWM Pin0,level,25
PAUSE DlyTm
NEXT

FOR level = 255 TO 0 Step a
PWM Pin1,level,25
PAUSE DlyTm
NEXT


But this are two steps one after another, not at the same time.

Can anybody show me how I can make from this two steps ONE step?
And ist there a possibility to integrate a delay?
Also:
Pin1 goes from 0 to 255 and at the same time should Pin2 goes from
255 to 0 but a little bit later as Pin1.

Is this possible?

With best regards, Kai

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-10-26 22:38
    Hi Kai,

    Try this:

    FOR level = 0 TO 255 Step a
    PWM Pin0,level,25
    PWM Pin1,255 - level,25
    PAUSE DlyTm
    NEXT

    Best regards,

    Russell Warburton
    email: russell@w...
    website: http://www.warburtech.com
    telephone: +44 (0)7814 044 754
    Original Message
    From: "kai_kuehle" <kai@u...>
    To: <basicstamps@yahoogroups.com>
    Sent: Sunday, October 26, 2003 6:07 PM
    Subject: [noparse][[/noparse]basicstamps] Q: BSII - Two Output-Pins at the same time? Help
    needed.


    > Hello Group,
    >
    > my question is:
    >
    > Is there a possibility to drive 2 output-pins at the same time?
    >
    > What I mean is, I use this to drive two LED`s:
    >
    >
    >
    > FOR level = 0 TO 255 Step a
    > PWM Pin0,level,25
    > PAUSE DlyTm
    > NEXT
    >
    > FOR level = 255 TO 0 Step a
    > PWM Pin1,level,25
    > PAUSE DlyTm
    > NEXT
    >
    >
    >
    > But this are two steps one after another, not at the same time.
    >
    > Can anybody show me how I can make from this two steps ONE step?
    > And ist there a possibility to integrate a delay?
    > Also:
    > Pin1 goes from 0 to 255 and at the same time should Pin2 goes from
    > 255 to 0 but a little bit later as Pin1.
    >
    > Is this possible?
    >
    > With best regards, Kai
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
Sign In or Register to comment.