Help with PWM6 and PWM7 on 16F18857 ???


Results 1 to 9 of 9

Threaded View

  1. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,644


    Did you find this post helpful? Yes | No

    Default Re: Help with PWM6 and PWM7 on 16F18857 ???

    using the code configurator [mcc] for a 16f18875
    yields the following settings , not unsimilar to yours. it works perfectly.
    maybe your pps is locked , your code is incomplete so I can't tell.

    1.5khz @32mhz fosc
    PWM6CON = $80;
    // DC 42;
    PWM6DCH = $2A;
    // DC 3;
    PWM6DCL = $C0;
    // Select timer
    CCPTMRS1.2 = 1
    CCPTMRS1.3 = 0
    // T2CS FOSC/4;
    T2CLKCON = 1;
    // T2PSYNC Not Synchronized; T2MODE Software control; T2CKPOL Rising Edge; T2CKSYNC Not Synchronized;
    T2HLT = 0;
    // T2RSEL T2CKIPPS pin;
    T2RST = 0;
    // PR2 85;
    T2PR = $55;
    // TMR2 0;
    T2TMR = 0;
    // T2CKPS 1:64; T2OUTPS 1:1; TMR2ON on;
    T2CON = $E0;
    RA2PPS = $0E; //RA2->PWM6:PWM6OUT;
    TRISA.2 = 0
    ANSELA = 0;
    Attached Images Attached Images  
    Last edited by richard; - 22nd January 2018 at 00:21.
    Warning I'm not a teacher

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