delay between output pin changes?
Archiver
Posts: 46,084
When setting the OUTS register to a value, are all the pins set to the
value specified at the same time? Or is there a slight delay between
all/any of the pins?
ie.. If I set OUTS to 0xFFFF, will all 16 pins be set at the same time? Or
will there be a delay between say, pin 7 and 8 while the interpreter
switches the PICs ports?
value specified at the same time? Or is there a slight delay between
all/any of the pins?
ie.. If I set OUTS to 0xFFFF, will all 16 pins be set at the same time? Or
will there be a delay between say, pin 7 and 8 while the interpreter
switches the PICs ports?
Comments
pins of the underlying PIC16C57. The port b pins are implemented as
PBASIC I/O pins 0-7, and the port c pins as 8-15.
All eight pins of a single port may be updated at once with a single
PIC instruction. However, there is no PIC instruction capable of
updating more than 1 port simultaneously, hence some delay is
inevitable between the two sets of pins.
Each PIC instruction takes 200 nsec on a BS2, so that's the absolute
minimum delay between updates to respective ports. More likely, the
sequence of instructions that update the two ports ("OUTS = xxxx")
would involve several PIC instructions, so the delay between
updating OUTL and OUTH would likely be on the order of 10 usec at
least. Someone with a fancy o'scope could provide a more
quantitative answer.
Regards,
Steve
Pepsi wrote:
When setting the OUTS register to a value, are all the pins set to the
value specified at the same time? Or is there a slight delay between
all/any of the pins?