Multiple HPWM's 16F877


Results 1 to 5 of 5

Threaded View

  1. #5
    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