18F46K22 HPWM blips and errors


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: 18F46K22 HPWM blips and errors

    I always thought it was best to keep the coding within an interrupt to a minimum. I set flags and then check for them in my main logic.

    If code absolutely has to execute within the interrupt, I'd place it in-line. I would think calling an other subroutine chews cycles needlessly.

    Robert

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: 18F46K22 HPWM blips and errors

    Henrik,
    I agree with you that it must be the HPWM command that is causing the blips since the 46K22 has a buffered PWM.
    However, as you can see from the source code, i do most things by setting the register directly like the ADC scanning. However, i have not yet been able to get the PWMs to work by setting them manually.
    The PLL bug is because certain elements of PBP do not account for the 4 times increase of the clock speed due to enabling of the on-board PLL. It's those elements that ignore "Define OSC" and try to determine clock speed on their own.

    Demon and Dave,
    I agree the code is not optimal, it's the resultant mess of trying to debug the problem and sticking stuff in subroutines so that i can call it anywhere and not have to worry about it coming back correctly.


    I'll go take a look for manual setting of the PWM and see if that sorts it...

    Thanks guys.

Similar Threads

  1. 18F46K22 being dyslexic
    By comwarrior in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 7th August 2012, 19:00
  2. SDFS on 18F46K22
    By comwarrior in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 14th July 2012, 16:27
  3. Possible PicBasic Pro ADC bug with 18F46k22
    By JimAvanti in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 23rd February 2012, 20:20
  4. Replies: 3
    Last Post: - 23rd October 2011, 12:53
  5. Replies: 2
    Last Post: - 10th July 2006, 01:05

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