Menu

Variable output Voltage. Use as vol control

Help
2011-01-04
2013-05-30
  • Nobody/Anonymous

    Need help trying to use any ouput pin to be controlled (0 to 5V) so as to use as a volume control which controls PGA2311 chip.
    I gather the Vref pin can be varied and then monitored. Any one have a simple solution?

     
  • Nobody/Anonymous

    Use a audio taper pot and read it into a variable with a command like:

    Volume = ReadAD(AN0)
    

    Kent

     
  • Nobody/Anonymous

    Hi Kent
    Thanks for the reply.  Opposite way around. Vary the voltage at an Output. I gather this can be done using the Comparator and
    Vref. I am currently programming 16F887. Managed to display Analog values on an LCD display and LED together using your method above. Searched the Forum but with no luck.
    P.S.   Graphical Cow Basic is Excellent. Many thanks to all the Developers.

     
  • Nobody/Anonymous

    Oh…..I was just thinking about the digital control part for the pga2311.

    The 16f887 has a hardware PWM module.  Check out GCBasic's HPWM command.  Putting the Volume control variable/register value, into the duty cycle variable/register, will result in a varying voltage on the CCPx pin.

    Not familiar with the comparator Vref method.  Is this about creating a Pic produced, sinusoidal waveform for the low level input? 

    Kent

     
  • Nobody/Anonymous

    Excellent. Your suggestion worked. Thanks.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.