Searching \ for '[PIC:] high-frequency pin toggling and the read-mo' 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/devices.htm?key=pic
Search entire site for: 'high-frequency pin toggling and the read-mo'.

Exact match. Not showing close matches.
PICList Thread
'[PIC:] high-frequency pin toggling and the read-mo'
2005\01\26@053911 by Wouter van Ooijen

face picon face
Just a thought that popped up druring some boring solder work. If you
want to do quick changes of I/O pins on 14-bit core PICs forget about
the PORT registers, use the TRIS registers. Write 0 to the relevant PORT
bits, and use pull-ups (as stiff as the PIC can handle, for instance
1k). Now write a 0 to the TRIS bit to make the pin low, write a 1 to
make it input and hence high (due to the pull up). Just watch out: the
TRIS registers are not in bank 0! You might use the indirection register
to get access to a TRIS register while staying in bank 0. I'm sure I
have read about this trick somewhere, but I can't remember where.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2005\01\26@070024 by Howard Winter

face
flavicon
picon face
Wouter,

On Wed, 26 Jan 2005 11:39:10 +0100, Wouter van Ooijen wrote:

> Just a thought that popped up druring some boring solder work. If you
> want to do quick changes of I/O pins on 14-bit core PICs forget about
> the PORT registers, use the TRIS registers. Write 0 to the relevant PORT
> bits, and use pull-ups (as stiff as the PIC can handle, for instance
> 1k). Now write a 0 to the TRIS bit to make the pin low, write a 1 to
> make it input and hence high (due to the pull up).

I was going to ask why you'd want to do this, then looked at the Subject and realised - it gets over the R-M-W
problem!  :-)  

The only downside I can see is that using 1k it draws 5mA for each pin that's being pulled high but driven
low, and if you have a whole 8-bit port like this it's getting to be quite a drain on power, so not a Good
Thing for a battery-operated device.

Cheers,





Howard Winter
St.Albans, England


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