Reading Inputs


Results 1 to 4 of 4

Thread: Reading Inputs

Threaded View

  1. #2
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    Welcome

    What you want is to mask the top three bits

    Code:
    MyVar=PORTB & %00011111 
    
    IF MyVar = %00000100 THEN
    EDIT: See section 4.17.4 of the manual
    Last edited by paul borgmeier; - 29th May 2007 at 14:42. Reason: added manual reference
    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

Similar Threads

  1. Erratic analog inputs .
    By timseven in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 10th October 2009, 23:34
  2. Unable to get 2 inputs to work
    By rangerdoc in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 1st June 2008, 04:16
  3. inputs on 12F675 (or for that matter any PIC)
    By muddy0409 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th April 2007, 20:43
  4. Pot reading jumping like crazy!!!
    By champion in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 20th November 2006, 22:24
  5. Using portb as inputs PIC goes crazy
    By peterdeco1 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 14th November 2005, 15:15

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