PWM with 16F72


Results 1 to 3 of 3

Thread: PWM with 16F72

Threaded View

  1. #2
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Sure about TMR2IF ?

    Hi,

    I do not understand the relation of TMR2IF being set with the CCP1 going high in the PWM Mode. Honestly speaking I am less experienced with the 16 series. However the PWM modules should work in the same way

    As far as I understand:
    TMR2IF is only set when TMR2 rollsover. In PWM that cannot happen if PR (period register is less than 255) or the duty cycle is less than 100%. Cause the PR match resets TMR2 -- CCP-PWM output = high, CCPR register match (concatenated with 2 bit internal Q clock of the prescaler) clears it.

    What you say is true when compare mode is used, not PWM mode.
    Correct me if I am wrong.

    Now coming to your problem.

    It seems you would be driving a half bridge using the PWM

    You can always use the compare mode to generate upto 16 bits of PWM and steer the outputs in the ISR as per your own requirement.

    Your nickname gives me a hunch that you are from Kolkata India and your full name is Sudip Mukherjee . If that is true then welcome to this great place which actually helped me gain confidence and little expertise in PIC.
    Last edited by sougata; - 29th July 2008 at 19:13.
    Regards

    Sougata

Similar Threads

  1. Half-bridge PWM with a 16F684 ?
    By Byte_Butcher in forum General
    Replies: 7
    Last Post: - 17th January 2010, 22:18
  2. Variable PWM PIC18F2431
    By trr1985 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 12th June 2009, 06:03
  3. PWM: Vernacular/Function (Newbee)
    By TerryN in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd July 2008, 16:58
  4. PWM setting PIC16F887
    By Gevo in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 12th June 2008, 07:24
  5. Tidying Up PWM Routine
    By Tissy in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st February 2005, 00:26

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