A question regarding PIC16F684 to LCD.


Closed Thread
Results 1 to 7 of 7

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    It was you well commented code that allowed the mistake to be found.
    Keep up the good work!

    And be sure to read the section of the data sheet I pointed to to see why the analog settings did not cause the problem... This time
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    May 2010
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    ...be sure to read the section of the data sheet I pointed to to see why the analog settings did not cause the problem...
    Thanks for that.
    Okay by you if I pick your brains one more time, pse?.....
    Just for the sheer sake of learning/curiosity, I'm reading the value of a standard 1mS~2mS R/C pulse, then writing that value to the LCD (Input mode). One of the ADCs is used to create another 1mS~2mS pulse, then displaying that value and at the same time sending the pulse to a separate pin (Output mode)... which works fine on ports A.1 and A.2, but not on ports A.3 ~ A.5.
    I'm not sure that I'm fully understanding the ANSEL/TRISA thing because neither does the mode selection work when A.2 is HIGH - the program jumps straight to output mode and stays there.

    Thanks again for your previous help. Appreciate you coming back.
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Default

    Looks like the problem is using an analog configured pin as an input. You can use analog set pins as outputs as the data sheet says but not as digital inputs. The data sheet says something like if a pin is set for analog then all digital reads will be 0(low).
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    May 2010
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    I've cracked it.
    Top thanks once again for the heads-up.

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