Re: More fun with VHDL

Discussion in 'VHDL' started by Chuck McManis, May 22, 2004.

  1. "Mike Treseler" <> wrote:
    > Take sdata_in out of the sensitivity list and
    > you have a synchronous process that will
    > sim and synth the same way.
    >
    > Hmmm. Why are we making bytes in the first place?
    > -_______--______----____-------_
    >
    > Don't we just want to preset a counter
    > while the data is high and count down
    > while it is low?


    Well if we were doing one PWM channel perhaps. My goal is to have several
    PWM channels.

    Constraints on my design are that I want to be able to "clock in" the
    various widths behind the running the circuit. Then, once I have the next
    set of widths ready to go, to assert "load" and at the start of the next PWM
    period, all PWM channels running at their new value.

    As a roboticist, and a "hobby" one at that, one application of this
    technique is to build a device for driving a number of R/C servos that can
    be programmed with a serial bitstream, and then commanded to operate
    synchronously. This level of control is essential in using R/C servos to
    control articulated walking robots for example. (google on the term Robo-One
    for examples)

    I'd like to build it out of a CoolRunner CPLD. I am, perhap prematurely,
    trying to be stingy on flip flops to save macrocells. If I create a single
    "master counter" that is counting through its iterations, then I can create
    a PWM output which consists of 'n' flip flops (equivalent to the counter
    width) and some combinitorial logic that implements an n-bit compare. So if
    my count width is 'n' then my macrocell count is (pwm_channels + 1) x 'n'.
    This is because I can use the same macro cells for both the latch and the
    comparator. The more channels I can get into the CPLD, the fewer CPLDs I'll
    need. Many Robo-one robots have 27 degrees of freedom (that is a lot of PWM
    channels :).

    The synchronous change facility is a "freebee" once I've isoloated the
    serial shift register chain from the pwm generator channels (I end up
    burning another n macro cells for each channel making it (2 * pwm_channels +
    1) x 'n' macrocells.

    There is some other magic with them being synchronous but not simultaneous
    but I'm not close to needing that stuff yet. :)

    --Chuck
    http://www.mcmanis.com/chuck/robotics/
     
    Chuck McManis, May 22, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Fish
    Replies:
    65
    Views:
    1,796
    Mabden
    May 18, 2004
  2. Michael
    Replies:
    4
    Views:
    437
    Matt Hammond
    Jun 26, 2006
  3. afd
    Replies:
    1
    Views:
    8,418
    Colin Paul Gloster
    Mar 23, 2007
  4. dolphin
    Replies:
    4
    Views:
    330
    Jorgen Grahn
    Aug 25, 2007
  5. er
    Replies:
    2
    Views:
    520
Loading...

Share This Page