HPWM fails...


Closed Thread
Results 1 to 4 of 4

Thread: HPWM fails...

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    I'm trying to figure out what you mean by -

    "18f2550, at 4mhz, pll div 1 OSC 48 etc."

    Is your device running at 4Mhz, 16Mhz, 48Mhz or some other speed?


    Whatever speed it is running, that is what the

    DEFINE OSC xx line should state.

    The code has no idea of what speed oscillator you are using, so you have to tell it in order for PBP to set things up correctly.
    Charles Linquist

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Charles Linquis View Post
    I'm trying to figure out what you mean by -

    "18f2550, at 4mhz, pll div 1 OSC 48 etc."

    Is your device running at 4Mhz, 16Mhz, 48Mhz or some other speed?


    Whatever speed it is running, that is what the

    DEFINE OSC xx line should state.

    The code has no idea of what speed oscillator you are using, so you have to tell it in order for PBP to set things up correctly.
    The crystal is 4mhz, the pll div /cpu div is set to 1, which cloccks the pic at 48mhz, the define osc is set to 48, which is all correct, the error was in the limitations of the minmum freq of the pwm at that clock speed, i had forgot to check, never imagined that the slowest i could run it was 3k at that clock, hence the three levels of brightness for 0-255, not a simple one level

    I didnt rtm......

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Try it using word variables or lower the 255 by 1 0r 2, I have had problems with bytes and 255, I usually will just use words and make sure there is an error handler if they go over 255, something like if yourvar > 255 then yourvar = 255.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

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