HPWM disrupts LOW/HIGH statement operation on the same pin.


+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2013
    Posts
    1,122

    Default HPWM disrupts LOW/HIGH statement operation on the same pin.

    Hello.
    I have PIC16F722

    I have connected led to PORTC.2 via 1K resistor.

    HIGH PORTC.2/LOW PORTC.2 works OK
    HPWM 1,100,10000 also works OK
    However, after the HPWM statement, HIGH/LOW on same port no longer works - PWM output remains always active.
    Even if I set PWM duty cycle to 0 and disable it, pin still can't be controlled by HIGH/LOW statements.

    I tried to re-initialize TRISC register after using HPWM statement by setting TRISC=0, but it does not help.

    Any ideas how to fix this?

  2. #2
    Join Date
    Feb 2013
    Posts
    1,122


    Did you find this post helpful? Yes | No

    Default Re: HPWM disrupts LOW/HIGH statement operation on the same pin.

    OK, fixed it by myself, I'll just leave answer here, if anyone else will have same issue.
    To return to normal use of that PWM pin, it is necessary to perform CCP1CON=0.

Similar Threads

  1. IOC on pin going HIGH and LOW
    By Demon in forum Code Examples
    Replies: 7
    Last Post: - 30th August 2024, 20:30
  2. Replies: 10
    Last Post: - 14th April 2014, 20:47
  3. Replies: 8
    Last Post: - 31st March 2014, 20:16
  4. Use of HIGH and LOW for pin outputs
    By rnuke77 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 27th January 2011, 18:40
  5. Reading if Pin is High or Low?
    By Spindle in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 1st August 2005, 17:39

Members who have read this thread : 11

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