Help with this code, it compiles but doesn't work on my simulations


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Apr 2009
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    Help

  2. #2
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Try adding:

    ANSEL = 0 ' Analog select set to digital, pg 69 data sheet
    ADCON0 = 0 ' A/D turned OFF, pg 68 of data sheet

    Also, have you used a 10K resistor to pull down GPIO.1 so it reeds logic 0 until the switch is pressed and GPIO.1 is taken high

  3. #3
    Join Date
    Apr 2009
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    i'l try to add that and regarding the pull down yes i did placed a pulldown resistor

  4. #4
    Join Date
    Apr 2009
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    whoa! it worked! thankyou malc-c

  5. #5
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    I'm not going to hammer on about how you must read the data sheets for these devices, I'll leave that to some of the others

    Glad to of helped.

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