Using Sound cmd on 16F88


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by sayzer
    But, sometimes when you know for sure that you are not even close to g-spot, you still get a loud sound. How about that?
    I could disgress and talk about using the right i/o but...

    Gator, use HPWM and a loop like that
    Code:
    Freq var Word
    
    Start:
        For Freq=1500 to 3000 step 100
            HPWM 1,Freq, 127
            Pause 200
            next
        Goto Start
    You'll notice some 'volume' change on every different frequency, choose the louder one. Using the Sayzer driver circuit will add to your pleasure.

    OR use your function generator, measure the frequency once you hit the louder frequency, and apply it on the HPWM command.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Gator_sound's Avatar
    Gator_sound Guest


    Did you find this post helpful? Yes | No

    Default

    Hi mister_e,

    Are you talking about using the HPWM on the 16f88 or a PIC with a physical PWM pin?

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Both.. THE PIC16F88 have a built-in PWM module... also named CCP.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Gator_sound's Avatar
    Gator_sound Guest


    Did you find this post helpful? Yes | No

    Default

    mister_e,

    Thank you and sayzer for the information. If its not too much of a hassle is it possible to provide an example for the PWM using the CCP register. I'm still trying to get used to programming in basic. Programming in assembly has thrown me off when I'm thinking about programming in basic. Thanks in advance.

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    HPWM will handle it for you. if 8 bit resolution is enough, it's the easiest way.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Default

    I've tried a lot with piezo-summers... (without any circuit in them!)!

    Forget it !

    Buy readymade Piezo-beepers for intrusion-detection !

    Piezo-beepers are allowed to have 24 Volt accross them. So I have used a circuit to double the power (5V -> 10V) with one pin of the PIC and loaded a 1000uF condensator. Then I use a MOSFET-driver ICL7667 to drive the beeper from this 10V. It is loader, but using some cheap magnetic beepers from digisound is much more easy....

    ;-)
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

  7. #7
    Gator_sound's Avatar
    Gator_sound Guest


    Did you find this post helpful? Yes | No

    Default

    BigWumpus,

    Do you have a part number or a particular place where I can purchase a ready made piezo-beeper? thanks.

Similar Threads

  1. Delayed output 10 secs
    By lilimike in forum mel PIC BASIC Pro
    Replies: 37
    Last Post: - 14th October 2011, 06:28
  2. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  3. Alfat Sd/mmc
    By eoasap in forum mel PIC BASIC Pro
    Replies: 31
    Last Post: - 24th July 2006, 06:10
  4. Sound and sound control with minimal parts
    By bartman in forum General
    Replies: 23
    Last Post: - 18th January 2005, 14:08
  5. Re: quick fix for sound command?
    By Melanie in forum Code Examples
    Replies: 0
    Last Post: - 9th July 2004, 01:44

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