PIC16/PIC18 with >10bit DAC

Discussion in 'The Projects Forum' started by sasek, May 3, 2010.

  1. sasek

    Thread Starter Member

    Jan 3, 2010
    64
    0
    hai all......

    i want control input of optocoupler (LED) using pwm/DAC 10bit. Reason i want to used it because i want control the LED smoothly that is around <4mV for each variable......so i need PIC that have >10bit pwm/DAC. Because right now i use 8bit DAC n the result is bad....the optocoupler become so sensitive
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You do know that LEDs need to be controlled via current and not voltage, right?

    Use a resistor to limit the maximum current through the emitter when the DAC output is full scale. Depending on your optocoupler, the Vf @ 10mA current might be 1.4v, and your DAC output might be 5v at full scale. You might be using a 5v supply to power your PIC.

    So for the above example, you will need a current limiting resistor that is (5v-1.4v)/10mA = 3.6/0.01 = 360 Ohms.
     
  3. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    I like the 12F683 if you want 8 pins and 16F819 if you want 18 pins. They both have 10 bit ADC and PWM.

    oops, missed the >10 bit part of the post.
     
Loading...