Searching \ for 'Setting Port_D on PIC16C662' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=port
Search entire site for: 'Setting Port_D on PIC16C662'.

Truncated match.
PICList Thread
'Setting Port_D on PIC16C662'
2000\02\13@065150 by myryama

flavicon
face
I'm trying to use Port_D on a PIC16C662 as an input register to receive
switch pulses but I'm having difficulty sending tris commands to Port_D to
set it as inputs.

This is the first time I've used the 662 and I'd like a little advice on
this particular aspect.

Thanks, James Evans

2000\02\13@161601 by paulb

flavicon
face
James Evans wrote:

> I'm trying to use Port_D on a PIC16C662 as an input register to
> receive switch pulses but I'm having difficulty sending tris commands
> to Port_D to set it as inputs.

 Doesn't it default to inputs?

 This appears to be the (only) gotcha to the bizarre "don't use TRIS"
campaign by MicroChip.  IIRC, TRIS doesn't work on port D - you have to
set up the TRIS *register* the hard way (using register "banking").

 Viewed from another perspective, if you want to manipulate TRIS as
part of normal program operation, you do so for ports A, B, and C.
Ports D & E are intended as "set and forget" as far as TRIS goes; that's
the design philosophy.
--
 Cheers,
       Paul B.

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