I want to control the volume of the output using Sound command.


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: I want to control the volume of the output using Sound command.

    You can use
    http://darreltaylor.com/DT_INTS-14/intro.html
    This is the easy way.

    Or you can read in the manual for an explanation on how to write your own.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: I want to control the volume of the output using Sound command.

    I don't see the need for an interrupt for what you're doing there.
    Code:
    X = 5
    Start:
       HPWM 3, X, 20000
       SOUND PortC.3, [255, 5]   ' Make sound for ~60ms
       X = X + 5
    Goto Start
    Though I'd probably setup the CCP module manually and write to the dutycycle register instead of using the HPWM command since I Believe you'll get some discontinuties in the output when constantly changing the dutycycle using HPWM - may be wrong on that and/or it may not matter in your case, try it.

    /Henrik.

  3. #3
    Join Date
    Nov 2013
    Posts
    17


    Did you find this post helpful? Yes | No

    Default Re: I want to control the volume of the output using Sound command.

    Totaly, i have tried all the methods you have suggested me, unfortunately the results wasn't so good.
    In every case, there was a small interrupt on the sound.

    I decided to produce the white noise by an external small circuit, and then to process it with PWM.

    Thank you all.

Similar Threads

  1. pt2258+16f877 how can i use for 5.1 volume control ?
    By whyliving in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 26th January 2008, 17:51
  2. Volume Control On Piezo
    By Peter1960 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 13th August 2007, 04:34
  3. sound command
    By micro in forum General
    Replies: 0
    Last Post: - 1st April 2006, 18:09
  4. Volume Control IC's
    By HarryK in forum General
    Replies: 0
    Last Post: - 8th March 2005, 08:46
  5. Sound and sound control with minimal parts
    By bartman in forum General
    Replies: 23
    Last Post: - 18th January 2005, 14:08

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts