Multiple HPWM's 16F877


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Posts
    35


    Did you find this post helpful? Yes | No

    Default

    But does it mean that the chips with three pwm's need to be the same frequency? I'll try it in the simulator then run it on the chip Thanks much for your time! Emmett

  2. #2
    Join Date
    Jun 2006
    Posts
    35


    Did you find this post helpful? Yes | No

    Default

    Hi group, The PBP manual says that the highest frequency at the HPWM's at any oscillator speed is 32767Hz. Is this correct? I'm looking for 48Khz. Also It says that if two are used they have to be the same frequency. The same frequency if I use three? Don't understand the limitations. Thanks again all! Emmett

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


    Did you find this post helpful? Yes | No

    Default

    It could depend of the PIC too.

    BTW @48MHZ, the highest frequency possible by using the calc should be 'round 5 MHZ (even if i have some doubt), 32.xxxKHZ is really low.

    HPWM is certainelay limited. To avoid this limitation, you have to write to the CCP register.
    Here's a short code snip for 2.5MHZ @ 50% duty cycle on a 16F877.
    Code:
    DEFINE OSC 20
    TRISC=0
    DUTY VAR WORD
    
    T2CON=%00000100
    PR2=1
    DUTY=4
    CCP1CON=%00001100 ' PWM MODE
    CCP1CON.5=DUTY.1
    CCP1CON.4=DUTY.0
    CCPR1L=DUTY>>2
    
    START:
          PAUSE 1
          GOTO START
    <IMG SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1113&stc=1&d=116044582 1">
    Attached Images Attached Images  
    Last edited by mister_e; - 10th October 2006 at 03:03.
    Steve

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

Similar Threads

  1. Multiple PICS from Same Crystal?
    By WOZZY-2010 in forum General
    Replies: 2
    Last Post: - 6th February 2010, 15:18
  2. 16f877 and ps/2 keyboard error???
    By boraciner in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th July 2009, 08:14
  3. serial communication between CMUcam and PIC 16F877
    By gengkeys in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 30th March 2007, 06:43
  4. Multiple PIC's with 1 crystal
    By puma in forum Schematics
    Replies: 11
    Last Post: - 20th March 2007, 17:02
  5. 4 Quadrant dc drive with 16F877
    By mns45 in forum mel PIC BASIC
    Replies: 2
    Last Post: - 23rd February 2006, 13: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