PDA

View Full Version : Another question RE port line indexing



muddy0409
- 7th August 2007, 12:31
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.

Bruce
- 7th August 2007, 15:23
See this thread http://www.picbasic.co.uk/forum/showthread.php?t=4074

It shows a number of ways to access port pins.