PWM - Dutycycle affecting frequency?


Results 1 to 15 of 15

Threaded View

  1. #5
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default Code & parameters

    So, here's the code:
    Code:
    ' Fuses
    @ DEVICE PIC12F683,FCMEN_OFF
    @ DEVICE PIC12F683,IESO_OFF
    @ DEVICE PIC12F683,BOD_OFF
    @ DEVICE PIC12F683,CPD_OFF
    @ DEVICE PIC12F683,PROTECT_OFF
    @ DEVICE PIC12F683,MCLR_OFF
    @ DEVICE PIC12F683,WDT_OFF
    @ DEVICE PIC12F683,INTRC_OSC_NOCLKOUT
    
    '-------------------------------------------------------------------------------
    ' Registers   76543210
    ANSEL      = %00000000  'Disable analog inputs
    ADCON0     = %00000000  'ADC is OFF
    CMCON0     = %00000111  'Comparator is OFF
    OPTION_REG = %10000000  'Pull-Ups disabled...
    TRISIO     = %00000000  'All PORTBs are Outputs
    GPIO       = %00000000  'All PORTBs are Low
    
    '-------------------------------------------------------------------------------
    ' Defines
    
    '-------------------------------------------------------------------------------
    ' Variables
    
    '-------------------------------------------------------------------------------
    ' Program
    MAIN:
        PWM GPIO.2,64,1000
        goto main
    end
    And here is how the oscillo is set:
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1649&stc=1&d=117941075 3">
    Attached Images Attached Images  
    Roger

Similar Threads

  1. SLA battery charging with PWM but which frequency
    By showtime in forum mel PIC BASIC Pro
    Replies: 31
    Last Post: - 13th June 2017, 11:41
  2. Low freq PWM problem
    By ultiblade in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 17th February 2010, 07:09
  3. Variable PWM PIC18F2431
    By trr1985 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 12th June 2009, 06:03
  4. PWM 'channels ...what's that all about then!
    By HankMcSpank in forum General
    Replies: 5
    Last Post: - 23rd April 2009, 16:49
  5. Adjusting PWM frequency
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 14th March 2008, 18:12

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