PWM problem with PIC16F777


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: PWM problem with PIC16F777

    Rule #1: Always check the pinout.

    What's on PORTB.5?
    Yeah right AN13... Now check the datasheet page 155 (ADCON1 register) to see how to disable the ADC on this pin.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Join Date
    Mar 2011
    Location
    cape town, south africa
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: PWM problem with PIC16F777

    Hi Steve,

    Thank you for the prompt reply.

    I've been looking through the datasheet in the A/D section, but it's quite over my head! I have done some searches and see that setting the ADCON1 to %00000001 for instance would set AN0 to A/D. But see not reference to AN13 (portb.5) in the table...

    Another clue ... please?!

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: PWM problem with PIC16F777

    ADCON1 = 15 ' All I/O pins digital
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Mar 2011
    Location
    cape town, south africa
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: PWM problem with PIC16F777

    Thanks!

    Phew - that wasn't fun...

    It is possible to set them individually?

    Thank you both very much - you have just completed the spectrum for me!

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: PWM problem with PIC16F777

    Yes, goto the table Steve mentioned and take a look.
    1111 = 15
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Mar 2011
    Location
    cape town, south africa
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: PWM problem with PIC16F777

    Ahhh... Sorry guys - I was looking at Page 155 (as per page number at bottom) and beyond - not Page 155 of the PDF! So I started (struggling) to read through missing the two pages before!

    ....This table looks much more understandable than Table 12-2 which I eventually go to on page 160 (162 of pdf)

    Thanks again.

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