Swiching Mode Charger / PWM questions


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Sep 2013
    Posts
    4


    Did you find this post helpful? Yes | No

    Default Re: Swiching Mode Charger / PWM questions

    I figgured it out!!! Or at least I think I did.... none the less it is working now.

    I was taking a stab at different things to see what may be causing the PLL not to run.

    If you notice, my OSCCON register is set to 11110010.

    I changed the OSCCON to = 11110000 and the output on pin 13 is now 125k (actually 124.8k according to the scope)

    And thank you for pointing out my lack of defining the oscillator and my lack of any program.

    Like I mentioned, I was taking stabs at things I thought might be inhibiting my progress, so I was stripping back everything I could. I guess I went a little too far.

    Thank you once again for your assistance. Higher PWM frequencies were a major hurdle in my next design stage and I had to figgure it out. It will allow my project to use much smaller components and be more efficient.

    -Albert

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,627


    Did you find this post helpful? Yes | No

    Default Re: Swiching Mode Charger / PWM questions

    Great, I'm glad that it works!
    I can't say I understand WHY though.... Setting the lower two bits of OSCCON to 00 selects the primary oscillator as the source while setting it to 10 selects the INTOSC, I thought the PIC should be run by the internal oscillator.... Oh, wait, NOW I think I see what's going on...

    Look at the figure 2.8 in the datasheet. When we select INTOSC by setting the lower two bits in OSCCON to 10 we're driving the chip directly from the internal oscillator with whatever frequency we set it to. The signal comming out of the "OSCCON MUX" in the diagram is selected to drive the PIC via "Clock Control MUX".

    But when we enable the PLL we have the switch the clock source from INTOSC to the Main Oscillator block (even though that's what we use with EXTERNAL crystal) so that we get the signal from the PLL (which is now driven by the internal oscillator). The "real" primary oscillator is disabled though because we've selected the INTIO67 mode via the CONFIG bits.

    Anyway, I'm glad you figured it out, good luck with the rest of the project!

    /Henrik.

Similar Threads

  1. 18F4431 - Complementary mode PWM
    By AndrewC in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 15th December 2011, 11:23
  2. 18F2331 Advanced PWM Questions
    By JDM160 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th July 2010, 23:04
  3. 9V NiMH charger
    By bogdan in forum Schematics
    Replies: 0
    Last Post: - 10th September 2009, 03:43
  4. switch mode power supply with PWM
    By iw2fvo in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 14th July 2009, 20:51
  5. Adcin charger
    By mitchf14 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th November 2008, 21: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