Two different frequencies with HPWM question


Closed Thread
Results 1 to 3 of 3
  1. #1

    Default Two different frequencies with HPWM question

    Using an 18F6722

    It has three ECCP's

    In the help file it states "Some devices have 1, 2 or 3 PWM channels. On devices with 2 channels, the Frequency must be the same on both channels. "

    Does this mean with the current chip I can do two different frequencies? If so, I haven't been able to figure it out yet. Any ideas?

    DEFINE HPWM2_TIMER 1 'Hpwm 2 timer select
    DEFINE HPWM3_TIMER 2 'Hpwm 3 timer select

    HPWM 2,127,20000
    HPWM 3,127,30000


    I can get individual HPWM's to work. When I fire both up though I get random flat lining. I have tried HPWM1 and HPWM2, then HPWM1 and HPWM3 plus HPWM2 and HPWM3 combinations.

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,599


    Did you find this post helpful? Yes | No

    Default Re: Two different frequencies with HPWM question

    Section 1.2 says you can have up to 4 different time bases.

    I can only think that you are forgetting to set a register.

    Robert

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Two different frequencies with HPWM question

    Thank you that helped. I found the right register and I think I have it sorted out.

    T3CON.6=0
    T3CON.3=1

    Took care of it.

Similar Threads

  1. HPWM Frequencies for Motor Control
    By RossWaddell in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd May 2012, 23:35
  2. HPWM question
    By sjmusic2 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 20th May 2009, 19:50
  3. HPWM Question
    By manwolf in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 22nd July 2008, 08:12
  4. Multiple HPWM question
    By Johan in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th October 2007, 13:00
  5. HPWM question
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th June 2004, 23:27

Members who have read this thread : 1

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