Using a pic processor to control the pulse width of a Monostable 555 timer

Discussion in 'The Projects Forum' started by a351must2, Jan 29, 2013.

  1. a351must2

    Thread Starter New Member

    Jan 13, 2013
    2
    0
    I am current working on a project controlling 2 RC servos with a pic16f88. I am at a point where I would like to free up the timer0 interrupt for a different use. It is currently generating my 20ms pwm signal for the servos.

    I'm thinking of having a single astable 555 generate a 50Hz clock and use monostable 555 timers to generate the servo controlling pulse (between .7ms and 2.3ms).

    Is it possible to control the length of a monostable pulse using an ADC output of the PIC processor? If so, what would the circuit look like?

    If I had to guess I'd probably be using the ADC output as the threshold on the 555, but of course I'm more of a programmer than an electrical engineer so if I can't find it on Google, I don't know how to do it.

    I know there are probably other ways that I could do this, and should be open to other suggestions...but for parts on hand I have plenty of 555 timers to work with.
     
  2. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,006
    3,762
    ADC (Analog to digital converter) is an input, not an output on the PIC. You seem to be looking for a digital to analog converter. There are plenty of chips that can do that (digital output from PIC, analog converstion done by external chip). You might be able to do this with the PWM output but you will have to set up a capacitor network based on desired PWM frequency then calibrate duty cycle to voltage.

    You have a million or more instructions per second, and three timers. What else do you need to do with your PIC that keeps it so busy? You only need 100 updates per second (on + off at 50 hz) with a bit-banged system. If you use an external 555 monostable, you will only need an off (50 interupts) after each trigger.
     
  3. a351must2

    Thread Starter New Member

    Jan 13, 2013
    2
    0
    yep, typo'ed (in my head) the ADC vs DAC ...

    and, yeah, probably could handle everything in code just fine, but was curious about controlling a 555 this way and thought I'd ask. You could call it a learning project.
     
Loading...