PWM on PIC16F1937


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2007
    Posts
    33

    Default PWM on PIC16F1937

    Hi guys,

    i need to run 3 PWM using the PIC16F1937, all at the same frequency.
    I am trying at the first stage to use CCP1 and it is not working.
    Below the registers i wrote:
    APFCON = %01100000
    PORTA = %00000000
    PORTB = %00000000
    PORTC = %00000000
    PORTD = %00000000
    PORTE = %00000000
    TRISA = %00110101
    TRISB = %00000001
    TRISC = %00110001
    TRISD = %00000000
    TRISE = %00000000
    ADCON0 = %00000000
    ADCON1 = %00000000
    ANSELA = %00000001
    ANSELB = %00000000
    ANSELD = %00000000
    INTCON = %00100000
    PIR1 = %00000000
    PIR2 = %00000000
    PIR3 = %00000000
    PIE1 = %00000010
    PIE2 = %00000000
    OPTION_REG = %00000001
    WPUB = %00000011
    T1CON = %00000000
    T2CON = %00000110
    PR2 = %11111111
    CCP1CON = %00001100
    CCPTMRS0 = %00000000
    CCPTMRS1 = %00000000
    PSTR1CON = %00000001
    PWM1CON = %00000000
    ECCP1AS = %00000000
    CCPR1L = 100

    anyone can help ?

    Thanks
    Rony

  2. #2
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: PWM on PIC16F1937

    Have you tried getting PBP to start it?
    You could then read back the values of the registers that can be read which is probably most of them.

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,803


    Did you find this post helpful? Yes | No

    Default Re: PWM on PIC16F1937

    The idea to have PBP setup the registers is good if you need 8 bit PWM. But is a start anyway...

    Ioannis

Similar Threads

  1. Replies: 1
    Last Post: - 4th March 2013, 21:57
  2. MPASM errors with PIC16F1937
    By acjacques in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 1st January 2011, 22:31
  3. PWM to 0-5V
    By tallen in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th April 2010, 08:03
  4. help with pwm
    By babatundeawe in forum Schematics
    Replies: 6
    Last Post: - 30th October 2008, 12:35
  5. Pwm
    By xobx in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 11th February 2008, 06:33

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