Shop OBEX P1 Docs P2 Docs Learn Events
PAK VIII and PWM — Parallax Forums

PAK VIII and PWM

ArchiverArchiver Posts: 46,084
edited 2001-10-29 16:35 in General Discussion
Hi All,
I bought a PAKVIII that I want to use to generate PWM with a
signal input from the Stamp, but I'm having dificulty trying to
figure out how to use it. Anyone out there with experience in this?

Thanks,
Robert

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-10-27 18:47
    I have the pakV and it works great for pwm


    richard




    Original Message
    From: <robert_hiebert@s...>
    To: <basicstamps@yahoogroups.com>
    Sent: Saturday, October 27, 2001 12:39 PM
    Subject: [noparse][[/noparse]basicstamps] PAK VIII and PWM


    > Hi All,
    > I bought a PAKVIII that I want to use to generate PWM with a
    > signal input from the Stamp, but I'm having dificulty trying to
    > figure out how to use it. Anyone out there with experience in this?
    >
    > Thanks,
    > Robert
    >
    >
    > 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/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-10-28 06:27
    Hi Richard,
    I'm using a PAK Va in my program now. It has to update every
    program loop, and is relatively slow. I was hoping that the PAK VIII
    would be able to do the same job a bit faster.

    Robert

    --- In basicstamps@y..., "Richard Friedrich" <rfriedrich@a...> wrote:
    > I have the pakV and it works great for pwm
    >
    >
    > richard
    >
    >
    >
    >
    >
    Original Message
    > From: <robert_hiebert@s...>
    > To: <basicstamps@y...>
    > Sent: Saturday, October 27, 2001 12:39 PM
    > Subject: [noparse][[/noparse]basicstamps] PAK VIII and PWM
    >
    >
    > > Hi All,
    > > I bought a PAKVIII that I want to use to generate PWM with a
    > > signal input from the Stamp, but I'm having dificulty trying to
    > > figure out how to use it. Anyone out there with experience in
    this?
    > >
    > > Thanks,
    > > Robert
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@y...
    > > 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/
    > >
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2001-10-28 09:34
    I am surprised that you are seeing a delay. In my application I am
    controlling spped of motor with pwm. the inertia of the motor is such that
    it cannot instantly change rpm - the PAC is very fast compared to changing a
    motor speed. I update my PAC every 20 ms.



    richard




    <robert_hiebert@s...>
    To: <basicstamps@yahoogroups.com>
    Sent: Sunday, October 28, 2001 12:27 AM
    Subject: [noparse][[/noparse]basicstamps] Re: PAK VIII and PWM


    >
    > Hi Richard,
    > I'm using a PAK Va in my program now. It has to update every
    > program loop, and is relatively slow. I was hoping that the PAK VIII
    > would be able to do the same job a bit faster.
    >
    > Robert
    >
    > --- In basicstamps@y..., "Richard Friedrich" <rfriedrich@a...> wrote:
    > > I have the pakV and it works great for pwm
    > >
    > >
    > > richard
    > >
    > >
    > >
    > >
    > >
    Original Message
    > > From: <robert_hiebert@s...>
    > > To: <basicstamps@y...>
    > > Sent: Saturday, October 27, 2001 12:39 PM
    > > Subject: [noparse][[/noparse]basicstamps] PAK VIII and PWM
    > >
    > >
    > > > Hi All,
    > > > I bought a PAKVIII that I want to use to generate PWM with a
    > > > signal input from the Stamp, but I'm having dificulty trying to
    > > > figure out how to use it. Anyone out there with experience in
    > this?
    > > >
    > > > Thanks,
    > > > Robert
    > > >
    > > >
    > > > To UNSUBSCRIBE, just send mail to:
    > > > basicstamps-unsubscribe@y...
    > > > 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/
    > > >
    > > >
    >
    >
    > 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/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-10-28 13:33
    Hi Robert,

    The idea behind using a PAK-VIII to do PWM is to compute the on and off
    times yourself and then set them with the appropriate commands to the PAK.
    This is not as convinient as the PAK-V which only generates PWM but it gives
    you more control.

    For example, suppose you decide you want 100mS total time and 30% "on" time.
    You could set the on time to 30mS and the off time to 70mS. 50% at the same
    duration would be 50mS on and 50mS off.

    Of course, there are many ways to compute PWM. You could look for the
    minimum period that would let you express your ratio. So with a 10uS base
    you could use 70uS and 30uS to get the same ratio. But then for 50% you
    could use 10uS and 10uS (10/20).

    Hope that helps.

    Al Williams
    * Easy RS-232 Prototyping
    http://www.al-williams.com/awce/rs1.htm

    >
    Original Message
    > From: robert_hiebert@s... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=9ZvQc1FjE8nw_I1huu9b60ZItvzMWBiGeistH43rSKE9IycuI2KJP6Du9gIj1bDFu8G3PEfc4PMZ-FzraaJ8HBoH]robert_hiebert@s...[/url
    > Sent: Saturday, October 27, 2001 12:40 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] PAK VIII and PWM
    >
    >
    > Hi All,
    > I bought a PAKVIII that I want to use to generate PWM with a
    > signal input from the Stamp, but I'm having dificulty trying to
    > figure out how to use it. Anyone out there with experience in this?
    >
    > Thanks,
    > Robert
    >
    >
    > 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/
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-10-28 18:03
    Gentlemen,
    I'm quite new at this, and have no previous electronics or
    programming background, so I could be way off base. I'm pretty sure
    that the serout commands, like debug and the PAK V commands take
    longer to execute than the shift in/shift out commands used with the
    PAK VIII. I was hoping to reduce my program cycle times a bit with
    the PAK VIII.
    The lookup tables I'm now using for the PAK V are certainly easy
    enough, and one command sets the PAK. Using the VIII may not be
    practical, but I'm trying to figure that out.

    Regards,
    Robert

    --- In basicstamps@y..., "Al Williams" <alw@a...> wrote:
    > Hi Robert,
    >
    > The idea behind using a PAK-VIII to do PWM is to compute the on and
    off
    > times yourself and then set them with the appropriate commands to
    the PAK.
    > This is not as convinient as the PAK-V which only generates PWM but
    it gives
    > you more control.
    >
    > For example, suppose you decide you want 100mS total time and
    30% "on" time.
    > You could set the on time to 30mS and the off time to 70mS. 50% at
    the same
    > duration would be 50mS on and 50mS off.
    >
    > Of course, there are many ways to compute PWM. You could look for
    the
    > minimum period that would let you express your ratio. So with a
    10uS base
    > you could use 70uS and 30uS to get the same ratio. But then for 50%
    you
    > could use 10uS and 10uS (10/20).
    >
    > Hope that helps.
    >
    > Al Williams
    > * Easy RS-232 Prototyping
    > http://www.al-williams.com/awce/rs1.htm
    >
    > >
    Original Message
    > > From: robert_hiebert@s... [noparse][[/noparse]mailto:robert_hiebert@s...]
    > > Sent: Saturday, October 27, 2001 12:40 PM
    > > To: basicstamps@y...
    > > Subject: [noparse][[/noparse]basicstamps] PAK VIII and PWM
    > >
    > >
    > > Hi All,
    > > I bought a PAKVIII that I want to use to generate PWM with a
    > > signal input from the Stamp, but I'm having dificulty trying to
    > > figure out how to use it. Anyone out there with experience in
    this?
    > >
    > > Thanks,
    > > Robert
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@y...
    > > 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/
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2001-10-29 13:12
    Stampers,

    I'm currently developing an application using the Pak8 and a bs2. The
    pak8 seems to be self-supporting. Once I've set the registers, my BS2 can
    forget about it and do other stuff such as read an a/d among other things.
    Then if the need arrises to adjust the PWM output, it simply resets a few
    variables of the pak8 and goes on with life.

    This project is still in the development phases, however, I have two notes:

    1) The oscillator x-tal seems to not work sometimes (bread board, long
    wires, I really haven't figured out why?)

    2) The 10K resistor between the data line, and the 5V helps!

    David Fixemer
  • ArchiverArchiver Posts: 46,084
    edited 2001-10-29 13:33
    Hi David,

    One thing to watch for that makes the chip not start up is a "slow rising"
    power supply. If your power supply doesn't snap to 5V quickly the chip can
    power up in an odd state. The Stamp has a reset controller that prevents
    this problem.

    To see if this might be your problem, notice if resetting the PAK makes it
    recover. If so, consider disconnecting everything from the PAK's reset line
    and connecting it to the Stamp's RESET pin. You could also use an RC network
    to "stretch" the power on reset pulse or use a cheap reset controller.

    On the second point, yep... the output is open collector (so you can tie it
    with the input). That means you have to have the pull up resistor specified
    or nothing works!

    Hope that helps.

    Al Williams
    * Easy RS-232 Prototyping
    http://www.al-williams.com/awce/rs1.htm

    >
    Original Message
    > From: Production Technology, L.L.C. [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=_9WASvgQwIBdevVvizGuK9sbUUszMapI03JjbQUz7xZBf3BODa9K0Hmy3MMRGJO4Uk8nw_pRN6dLuggEBQ]fixemerd@a...[/url
    > Sent: Monday, October 29, 2001 7:12 AM
    > To: basicstamps@yahoogroups.com
    > Subject: RE: [noparse][[/noparse]basicstamps] Re: PAK VIII and PWM
    >
    >
    > Stampers,
    >
    > I'm currently developing an application using the Pak8 and a bs2. The
    > pak8 seems to be self-supporting. Once I've set the registers, my BS2 can
    > forget about it and do other stuff such as read an a/d among other things.
    > Then if the need arrises to adjust the PWM output, it simply resets a few
    > variables of the pak8 and goes on with life.
    >
    > This project is still in the development phases, however, I have
    > two notes:
    >
    > 1) The oscillator x-tal seems to not work sometimes (bread board, long
    > wires, I really haven't figured out why?)
    >
    > 2) The 10K resistor between the data line, and the 5V helps!
    >
    > David Fixemer
    >
    >
    >
    > 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/
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-10-29 13:40
    Al,

    Never mind the last email, just got yours, thanks for the answer!

    David Fixemer
  • ArchiverArchiver Posts: 46,084
    edited 2001-10-29 16:35
    >The Stamp has a reset controller that prevents this problem.....
    >consider disconnecting everything from the PAK's reset line and
    >connecting it to the Stamp's RESET pin.

    Just a note on this: Only the original BS2 brings the active low
    reset signal as an output (or input) to pin 22 on the carrier board.
    The 'SX based Stamps do not; pin 22 is input only.
Sign In or Register to comment.