Searching \ for 'Tristating Ports On 16C58' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/ios.htm?key=port
Search entire site for: 'Tristating Ports On 16C58'.

Truncated match.
PICList Thread
'Tristating Ports On 16C58'
1999\04\15@174507 by GregH

flavicon
face
Does anyone know how to change the direction of a single port bit while
leaving the rest unchanged?  You don't know the configuration (input/output)
of the rest of the port bits.  If anyone can tell me how to determine the
configuration of a port this is all I really need.

I see that the special function registers trisa and trisb in MPLAB seem to
be holding the required information, but they do not appear to be physical
registers.

I'm trying to write a multi-backplane (4 commons and 6 segments) driver and
need to either turn a segment ON, OFF, or INPUT (this enables a resistor
pull-up to Vcc/2).

Thanks for any help.

1999\04\15@190857 by Dmitry Kiryashov

flavicon
face
GregH wrote:
>
> Does anyone know how to change the direction of a single port bit while
> leaving the rest unchanged?  You don't know the configuration (input/output)
> of the rest of the port bits.  If anyone can tell me how to determine the
> configuration of a port this is all I really need.
>
> I see that the special function registers trisa and trisb in MPLAB seem to
> be holding the required information, but they do not appear to be physical
> registers.

Try to use "shadow" copy of TRIS register somewhere in the memory.
Every time you need to change TRIS you'll change the "shadow" and
then copy it to TRIS register.

WBR Dmitry.

1999\04\15@194049 by paulb

flavicon
face
Dmitry Kiryashov wrote:

> Try to use "shadow" copy of TRIS register somewhere in the memory.
> Every time you need to change TRIS you'll change the "shadow" and
> then copy it to TRIS register.

 Some would argue this to be the most reliable approach even in those
devices which have TRIS registers mapped to Bank 1.  And just as fast!
--
 Cheers,
       Paul B.

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...