There is an inderirection register that you can use to set the port, upon which you can perform port accesses. As far as specifying the bit to access, there are methods contained in the faq. There isn't an easy way to do it, but it is possible. First read the information in the data sheet about the indirection register (register 0 on most parts, INDC if I remember correctly) -Adam "What? I couldn't very well say 'INDC, IIRC'..." Gonzalo Jimenez Yamasaki wrote: > > Hi all: > > What I want to do exactly is to have to variables, one with the port I > want to use (let4s call it "port") and another one with the bit I want to > read (let4s call it "bit") then use the instruccion btfss. > > Something like this: > > porta --> port > 3 --> bit > > btfss port, bit > > What should mean btfss porta, 3 > > Is it possible? > > As far as I know, when you use btfss what is read is the address of > port, not what this address contains. > > I guess I can use somenthin like this: > > port equ h'0005' ;port = porta > > and when I want portb, I should use (port + 1) the same for "bit", but, > is there any other way? > > Any help will be apreciate, > > Thanks in advance, > > Gonzalo > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.