1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

How to genearate a pulse with Variable ON-Time and OFF-Time using 8253(4) ?

Discussion in 'Embedded' started by lamb, Jan 12, 2005.

  1. lamb

    lamb Guest

    Dear all,

    The requirement details -
    On Time - 1 us ~ 9999 us.
    off Time - 1us ~ 9999 us.
    After user enter the on-time and off-time value, the pulse-training
    will be generated according to the setting.

    The timing need to relative precise, +/- 0.5us. No jitter is allowed
    if possible. Does it possible to implement with 8253 ? or using9513 ?
    Does it easy to obtain ?
    thanks all.
    regards,
    lamb.
     
    lamb, Jan 12, 2005
    #1
    1. Advertisements

  2. lamb

    Robert Scott Guest

    It is easy to do with a 9513. Use a 1 MHz clock. The pre-load
    registers are 16-bits. So 1 - 9999 is covered well.


    -Robert Scott
    Ypsilanti, Michigan
    (Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)
     
    Robert Scott, Jan 12, 2005
    #2
    1. Advertisements

  3. lamb

    CBarn24050 Guest

    Subject: How to genearate a pulse with Variable ON-Time and OFF-Time using
    Hi, what you need is a micro with an 16bit capture compare module. You just
    setup the module and it produces the waveform without any processor
    intervention. There are plenty of suitable processors with this periferal,
    chosse the one you like.
     
    CBarn24050, Jan 12, 2005
    #3
  4. lamb

    Robert Scott Guest

    Most capture/compare units that I am familiar with (i.e. PICs) cannot
    handle the OP's problem. He want two separate widths - one for on and
    one for off. The processor could alternate between these two, but not
    for extremely small pulse widths. There is no time to set up the next
    compare event if the pulse is only 1 usec. long. But the 9513 can do
    this.


    -Robert Scott
    Ypsilanti, Michigan
    (Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)
     
    Robert Scott, Jan 12, 2005
    #4
  5. Lots of others do (H8xxx series for a start) in some cases it is a
    matter of changing two values even if it has been set to PWM mode and
    effectively change the frequency as well if you like. That's how I setup
    simple panel dimming controls, a PWM that the on/off ratios are changed
    from software from 'switchs', external commands or reading of pot.

    The H8 series tend to have several of them as well, so you could probably
    check your jitter if that worried :-^

    I am sure the AVR, Z8 and others have one or more that can do this as well.
     
    Paul Carpenter, Jan 12, 2005
    #5
  6. I think the timer on the MSP430 can handle that chore. You set up
    one of the PWM modes and use the CCR0 register to set the total
    interval (time on + time off). Then CCR1 is set to the time on. I
    used that method to generate a 500Hz clock with a variable duty cycle.


    The PWM modes are set up so that everything is done in the
    processor--- you would have to have the processor monitor
    the output to stop the time if you wanted only one pulse,
    and not a continouous pulse train. I think it would meet the specs with
    a 8MHz clock, though.

    Mark Borgerson
     
    Mark Borgerson, Jan 13, 2005
    #6
  7. Those are very old devices - what you need is a 16 bit PWM module,
    that allows 16 bit define of timebase, and 16 bit define of duty
    cycle.
    Not all uC think like that, but the z8 encore is one that does,
    it calls the timebase reload value. I think it can run to the
    CLK freq, of 20MHz on the PWM, or us a prescaler.
    You will need HW, as SW will not easily cope with
    the 1us ON 1us OFF times.

    Just choose the smallest z8Fxx that has the PWM - some
    come in DIP8, so you may be able to make a tiny Serial-PWM
    block. If you include the Prescale setting, you can create
    one that does 100ns-419ms with 1 part in 2^16 resolve.

    -jg
     
    Jim Granville, Jan 16, 2005
    #7
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.