HPWM and variable 10-12khz outputs with a 48mhz osc possible?


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2011
    Posts
    19

    Default HPWM and variable 10-12khz outputs with a 48mhz osc possible?

    Is this possible? I'm taking a changing 0-5v input signal and converting it to either a 10 to 3000hz variable or a 2 to 12khz variable output with a lookup table. I believe I need to use HPWM because I need the output to be run and updated continously while the rest of the code in the MCU is ran. I can also put the output I want from the lookup table into the "frequency" variable of the HPWM command and have it updated each time the loop is performed. From what I've read I can not output a frequency that low with my 48MHZ osc. I believe i need to use this speed for USB because I'm using a PIC18f14K50.

    Any ideas?

  2. #2
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: HPWM and variable 10-12khz outputs with a 48mhz osc possible?

    Hi awdgsx!
    Have you considered running at a higher frequency and then take the HPWM output and run it through a "decade counter" such as an SN7490A? This is a divide by 10 device so you can do an HPWM at say 300,000hz, run it through 2 divide by 10's and now you are at 3,000hz. Best, Ed

  3. #3
    Join Date
    Jun 2011
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: HPWM and variable 10-12khz outputs with a 48mhz osc possible?

    I could but when I used my circuit for applications needing the 2 to 12khz scale I would run into the 16000hz celing of the hpwm command. Space on my circuit is very limited so I would like to find a solution that doesn't require and more componebts

  4. #4
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: HPWM and variable 10-12khz outputs with a 48mhz osc possible?

    I understand and I am running a 20mhz resonator on an 18F1320 with a HPWM of 32.768khz. (hpwm 1, 127, 32768) I am not familar with the PIC you are using or it's limitations. It just seems strange that the ceiling would be 16000hz?

  5. #5
    Join Date
    Jun 2011
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: HPWM and variable 10-12khz outputs with a 48mhz osc possible?

    I believe the hpwm max on any pic is 32,000 hz?

  6. #6
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: HPWM and variable 10-12khz outputs with a 48mhz osc possible?

    No sure about this limit, I only know that mine is running at 32,768. You may wish to call MicroEngineering Labs 1-719-520-5323 they are great people and very helpful.

  7. #7
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: HPWM and variable 10-12khz outputs with a 48mhz osc possible?

    Hi Awdgsx!
    Take a look at http://www.picbasic.co.uk/forum/showthread.php?t=7831 . If you read down thru the post PBPL does NOT have a 32767 limit.

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