Another question RE port line indexing


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216

    Default Another question RE port line indexing

    Hello again everyone.
    Some weeks ago I was put on the right track to indexing port lines as far as outputting HIs and LOs was concerned.
    It was all about the standard setting of the PORTH = ??? and PORTL = ??? referring these to ports and then being able to simply say "HIGH 1" for instance to set PORB.1 HI
    Todays brain teaser is: Is there a similar method to read the pins for indexing input data. There is a "INPUT 1" in the book, and I thought "Hmm that's pretty obvious" but on RTFM it seems that that is for setting the TRIS for a particular line to be an input. So the question remains: is there a way to read an input line with "BLAHBLAH 1" for instance (or something similar), or am I stuck with "IF PORTB.0 = ?? THEN .... " type of thing?
    Thanks, as always.
    Peter Moritz.
    Peter Moritz.
    Up the bush, Western Plains,
    New South Wales,
    Australia.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    See this thread http://www.picbasic.co.uk/forum/showthread.php?t=4074

    It shows a number of ways to access port pins.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. Question Regarding Port A on 16F876A
    By jevert in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 26th February 2009, 14:00
  2. Using input from Switch to control a loop
    By MrRoboto in forum mel PIC BASIC
    Replies: 9
    Last Post: - 2nd February 2009, 05:02
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  5. having problems with Hantronix 20x4 lcd
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 22nd December 2005, 12:22

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