PDA

View Full Version : quick changing of ports for I/O use



longpole001
- 30th May 2015, 09:05
Hi guys , was wondering where i should look in the electrical specs for the chip where the ports settle time between changing port inputs to output and back

have need to do fast transition of direction over a group of port pins over several ports

cheers

Sheldon

tumbleweed
- 30th May 2015, 11:36
I don't know that there's a direct spec, but if you look in the AC (Timing) Characteristics section
you'll find a 'CLKO AND I/O TIMING REQUIREMENTS' table. Parameter TosH2ioV should give you a ballpark
idea as to the speed of the IO pins. The transitions into and out of tristate would probably be longer than this.

Since you have a group of port pins over several ports the time required to change the direction will
likely overshadow those numbers. Something like


TRISA = $55
TRISB = $AA
TRISC = $CC

will take a min of 6 instructions (2 per TRIS setting), so on a PIC18 that's 6 x 4 = 24 Tosc periods.

longpole001
- 30th May 2015, 21:34
ok thanks i am seeing longer times than i first thought ,