pic 18Fxx31 PWM module


Closed Thread
Results 1 to 4 of 4
  1. #1
    dirace's Avatar
    dirace Guest

    Default pic 18Fxx31 PWM module

    Is it possible to use the PWM modules of PIC 18Fxx31 uCs and how?

    Thanks in advance

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    Hi, dirace

    Your answer is YES, using the HPWM function ( simpler ) , as they are supported by the 2.45 release , or using assembler ...a bit trickier.

    Alain

  3. #3
    dirace's Avatar
    dirace Guest


    Did you find this post helpful? Yes | No

    Default

    I use the following code:

    Define OSC 4

    hpwm 0,127,2000
    hpwm 1,127,1500

    go:
    Pause 50
    goto go

    This outputs PWM on RC1 and RC2 where CCP1 and CCP2 is and not on RB0 and RB1 where PWM0 and PWM1 is.
    And both signal are 1.5KHz!!!

    What am i doing wrong?

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Talking

    Just read manual : HPWM1 AND HPWM2 use the same clock ( TIMER 1) ...
    so, it's the same PWM frequency .... with PBP or Assembler !!!

    Alain

Similar Threads

  1. Variable PWM PIC18F2431
    By trr1985 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 12th June 2009, 06:03
  2. how can i stop the pic from sending a PWM???
    By texas5 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th October 2008, 17:12
  3. PWM Module 18Fxx31
    By iphillipsca in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 11th April 2008, 08:06
  4. Using PWM built in Module 16F628
    By earltyso in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 9th October 2007, 06:40
  5. Output PIC module
    By freelancebee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th September 2005, 20:10

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