FREQOUT 4mhz


Closed Thread
Results 1 to 21 of 21

Thread: FREQOUT 4mhz

Hybrid View

  1. #1

    Default FREQOUT 4mhz

    I want to drive a piezo buzzer which I haven't done before. Read where FREQOUT may have issues with a 4mhz oscillator?

    Goal is to drive one of those button piezos at 6500 hz. Just thought I'd ask before attempting whether there will be problems.

    Will I need a driver circuit as well or can the pic drive a piezo directly ? -- THANKS

  2. #2
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: FREQOUT 4mhz

    If its one of those small 3v - 15v type piezo buzzers then this can be driven directly from the PIC



    Some further examples and reading http://www.picbasic.co.uk/forum/showthread.php?t=3076

    Can't really help with the frequency part, the buzzer I use as an alarm just runs at whatever its internal frequency is when DC voltage is applied

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: FREQOUT 4mhz

    It's not a buzzer, it's just a transducer. And like I say, FREQOUT (according to manual) is limited at 4mhz and would like to know more.

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: FREQOUT 4mhz

    Ok -- good link -- I'll try the PWM command instead.

  5. #5
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: FREQOUT 4mhz

    I seem to recall the FREQOUT command is only accurate at 4 MHz. If you're clocking at 8 MHz, divide the value by 2 (and so forth). The command itself should work at any clock speed. Just take into account any divisor needed to achieve your 6500 Hz.

    If you have Mister E PIC Multi-Calc, you can use the Timer Helper to create any frequency the processor is capable of, and at any chosen Fosc.

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517


    Did you find this post helpful? Yes | No

    Default Re: FREQOUT 4mhz

    From the manual:
    FREQOUT works best with a 20MHz or 40MHz oscillator. It can also work with a
    10MHz or 8MHz oscillator and even at 4MHz, although it will start to get very hard
    to filter and be of fairly low amplitude. Any other frequency will cause FREQOUT to
    generate a frequency that is a ratio of the actual oscillator used and 20MHz.
    For simple beep type of tone from a piezo buzzer just use PWM, HPWM or "manually" run the (E)CCP module.

    /Henrik.

Similar Threads

  1. FREQOUT command
    By Art in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 8th February 2015, 07:21
  2. Freqout ? ? ?
    By azmax100 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th March 2009, 01:39
  3. bootloader Freqout problems
    By handgio in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th December 2007, 14:38
  4. FREQOUT - PWM question
    By Etcho in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 26th February 2007, 00:51
  5. FREQOUT delays
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 7th December 2003, 00:49

Members who have read this thread : 1

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