works only on port a,b, c not d, e regards henrik ----- Original Message ----- From: "Mike Mansheim" To: Sent: Wednesday, March 22, 2000 11:54 PM Subject: Re: TRIS or NOT ? > Kev wrote: > I'm muddling thru the 16F84 and I understand MicroChip does not intend to > support the TRIS instruction in future products (is it usable in the > 16F877?). > > So in place of a TRIS command I would simply use a MOVWF TRIS(A,B,etc) > assuming that W is loaded with the desired mask. > > You also need to switch to bank 1 before doing the movwf command, where the > tris addresses then match the port addresses. That's why people still like > to use the tris command - no bank switch is required. > If the tris command exists for a chip, it will always exist for that chip - > Microchip cautions against using it in the case of using the same software > on a future product that will not have the tris command. I noticed in > my16F87x data sheet that they emphatically say DONOT USE the tris > instruction. However, it's there and will always work with the F877 - it > just may not work with a later pin compatible replacement for the F877 that > you may want to drop your software directly into (kind of like moving from > a C73 to an F873!) >