Pwm


Closed Thread
Results 1 to 4 of 4

Thread: Pwm

  1. #1
    Md.Shah's Avatar
    Md.Shah Guest

    Default Pwm

    what is the code to get 2 PWM output for PIC16F877A. The second output is inverted from the first output.

  2. #2
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    You could look into the pbp book at HPWM.
    And then invert the hpwm output to another pin.
    The invert command is also in the pbp book.

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Or use a PIC who provide this with a special register setup. ECCP module comes much popular now.

    PIC16F684 could be a smart choice.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4


    Did you find this post helpful? Yes | No

    Default HPWM on the 16f690

    Sorry if this has appeared before....I'm trying to use the HPWM command on a 16F690, in half-bridge mode.
    The relevant bits to set that mode from the standard mode are in the CCP1CON register.

    If I only use the HPWM command the default mode is standard single output PWM
    If I insert a line immediately after the HPW comand to set the relevant CCP1CON bits for half bridge then everything works fine.

    The problem is that I am looking to make something which could eventually become safety critical and at all times the second PWM output must oppose the first, as it does for proper half bridge operation.

    The trouble is that having to add a line to set CCP1CON bits means that the PWM mode works 'properly' in single output mode for a small period of time before I can add the extra CCP1CON instruction.

    WHat I would like to know is if there is a simple way to rename the command macro file, change the setting of the CCP1CON bits in that command macro to do what I want and then recompile it, whcih is something I have had difficulty doing in the past.

    Chris

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