FREQOUT command for continuous operation


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,670


    Did you find this post helpful? Yes | No

    Default Re: FREQOUT command for continuous operation

    should be easy with a PIC12F1822 @32mhz or reduce the samples to suit,

    my idea would be something like this


    simple halfwave sin lu table [50 points per cycle]


    15,47,77,106,134,160,183,204,221,235,246,252,255,2 54,250,241,229,213,194,172,147,121,92,62,31


    set ccp to say 32khz carrier or whatever [make sure 10 bit resolution is viable]

    cycle through the table every 400uS
    set pulse width(10 bit) to 512+ lu value
    next half
    cycle through the table every 400uS
    set pulse width(10 bit) to 512 - lu value

    rinse repeat


    for 60 hz cycle every 330 uS


    at the o/p filter out carrier
    Warning I'm not a teacher

  2. #2
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: FREQOUT command for continuous operation

    Thanks Richard.

    Your sine lu table appears non-symmetrical. Have you done this for a reason?

    Cheers
    Barry
    VK2XBP

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,670


    Did you find this post helpful? Yes | No

    Default Re: FREQOUT command for continuous operation

    its a half wave samples are sin(pi*(I+10)/256 )*256 where I=1 to 25
    Attached Images Attached Images   
    Last edited by richard; - 6th September 2016 at 03:44.
    Warning I'm not a teacher

  4. #4
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: FREQOUT command for continuous operation

    Hi All,

    I am pleased to advise that I now have a very nice sine wave output from my PIC12F1822.
    I dropped the FREQOUT approach and went with the lookup table method instead.

    Thanks to all who assisted me with this project.

    Cheers
    Barry
    VK2XBP

  5. #5
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: FREQOUT command for continuous operation

    That totally went over my head So you open and close a PWM signal to produce a sine?
    On a scope you see the 50Hz at one scale, and then zoomed, you start to see square edges from the pic? because after all, the output is binary.
    Do you then filter the output and get it round?

  6. #6
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: FREQOUT command for continuous operation

    Hi Art,

    Yes, the PWM output is passed through a second order low pass filter. In my case I used a Sallen-Key LPF.

    Cheers
    Barry
    VK2XBP

Similar Threads

  1. FREQOUT command
    By Art in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 8th February 2015, 06:21
  2. Freqout ? ? ?
    By azmax100 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th March 2009, 00:39
  3. bootloader Freqout problems
    By handgio in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th December 2007, 13:38
  4. RPM Counting Continuous
    By CluckShot in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 25th May 2007, 12:37
  5. FREQOUT delays
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 6th December 2003, 23:49

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