HPWM10 Frequency Updating


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Duncan,

    Now that you are using PBPL, things get very easy.

    PBPL does not have the 32767 upper limit like PBPW.
    The resolution is only 8-bit max. But you don't need resolution, just frequency @~50% duty.
    And, it's not glitch free, but if you only change the frequency when you need to, it shouldn't be a problem.
    Code:
    Freq  VAR LONG
    
    Freq = 500000
    
    HPWM 1, 127, Freq
    Should do it. I think.
    <br>
    DT

  2. #2
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    Thanks Darrel for directing me back away from HWPM10.

    Unfortunately using PBP’s HWPM even with LONG has noticeable inconsistencies across the range I am interested in,exactly as you suggested, so I have gone back to calculating PR2 myself, which is so much easier without DIV32.
    I have also chosen to make use of the listing file which I have set to create at compile time, from which I hope to learn more how PBP creates assembly, as it is made so much easier by the explanation comments.



    I would like to add some personal observations concerning another post today elsewhere on the forum.

    Earlier in this thread I asked permission to alter code created by others for my own use. I personally do not feel comfortable cutting and pasting other peoples routines into code, I always know it is there, especially if I know I could never have written it myself.

    This is a complex forum with diverse users and some big contributors are understandably feeling that they are being taken advantage of. I do not doubt for one minute that this is not true, as I believe that there are strong commercial undercurrents in the mix.

    A little while ago this forum was down for a day or so, I can remember staring at the screen like a frightened rabbit……………perhaps if I had actually joined in…………….so I have started to post.

    Anyway guys and gals please don’t stop helping, in whatever frame of mind. I have actually found some of the recent interchanges very funny, and on behalf of those a bit timid to post...
    thank you all collectively again.

    Perhaps I can help out a little by referring to our old friend the DATASHEET and in particular Section 26.0 Emotional Characteristics, paying special attention to page 232 ABSOLUTE MAXIMUM RATINGS.

    HTH

    Duncan

Similar Threads

  1. Advice on frequency measurement to 30MHz
    By Andy Wood in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th March 2009, 04:23
  2. HPWM command and oscillator frequency
    By RussMartin in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th March 2009, 22:41
  3. inaccurate frequency using TMR1 PI18F452
    By nkarpovich in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 14th October 2006, 16:22
  4. frequency measurement
    By big-x in forum General
    Replies: 2
    Last Post: - 25th November 2005, 00:53
  5. Low frequency output
    By barkerben in forum General
    Replies: 5
    Last Post: - 16th November 2004, 15:25

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