Code check -- button not working


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    What's Up DOC?

    The SD button is on portb.7, but at the very top TRISB is set to all outputs.

    The button command never sees the pin.

    HTH,
      Darrel
    DT

  2. #2
    Join Date
    Jan 2005
    Location
    Sweden
    Posts
    2


    Did you find this post helpful? Yes | No

    Default

    Isn't the Button command supposed to take care of TRIS settings?

    The manual says "Pin is automatically made an input."


    http://www.melabs.com/resources/pbpm...5_4-5_6.htm#56

  3. #3
    Join Date
    Jan 2006
    Posts
    76


    Did you find this post helpful? Yes | No

    Default

    Ill give it a shot. It sounds logical. It may be overriding the button commands ability to make it an input.

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Yes, someone keeping me in check. Good.

    You're right RRacer, it does say that.

    And now I'm back to gee, I don't know. Unless ...

    Since there isn't a LOADER_USED define, can I assume you are using ICSP?   And, is the programmer always connected?   Is the programmer conflicting with the RB7 input? Just another thought.
    <br>
    Darrel

    P.S. What chip are you using? 16F737? The ADCON1 seems odd. That won't affect PORTB.7, I'm just trying to figure out what chip it is.

  5. #5
    Join Date
    Jan 2006
    Posts
    76


    Did you find this post helpful? Yes | No

    Default

    Yes, I am using ICSP. I only have a pin header connected, I disconnect the programmer after each burn.
    Like I said, I tried the same button on a pin on the porta side and still the same issue. The button registers voltage when pressed, so its not a hardware fault.

    check out the photos of the LED up and in action! Damn, Lamina makes some really bright stuff.

    http://share.shutterfly.com/action/w...=2CcN3DhozYuOg
    Last edited by docwisdom; - 16th February 2006 at 22:21.

  6. #6
    Join Date
    Jan 2006
    Posts
    76


    Did you find this post helpful? Yes | No

    Default

    I am back, trying to get this problem solved again. Anyone have any new ideas on why this single button wont work?

  7. #7
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Please post the schematic

    Hi,

    I would like to see the schematic and know which PIC you are using.

    Regards

    Sougata

Similar Threads

  1. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 9th December 2008, 00:40
  2. My LCD code is not working...
    By kvrajasekar in forum mel PIC BASIC
    Replies: 2
    Last Post: - 7th December 2008, 06:41
  3. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 09:26
  4. Can some one please check my code out thanks
    By Jhdgkss in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 10th February 2006, 09:19
  5. button ,eeprom,read
    By mike12 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 31st December 2005, 12:19

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