[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Parallell port timing



What delay can be expected when reading from the general I/O port?

When I connect an output pin on the general port to an input pin, I need a
delay of a few instructions before the result is visible for reading. Is
this maybe a pipelining effect?

What I'm about to do is to enable one of a few external devices, and then
read the result back, like this:

    *R_PORT_G_DATA = IRB_SELECT2;
    // How many nop's needed for data to be visible?
    for (i = 0 ; i < 10 ; i++) { asm ("nop"); }
    data = *R_PORT_G_DATA;

Regards

Anders Blomdell

------------------------------------------------------------------------------
 Anders Blomdell
 Department of Automatic Control        Email: anders.blomdell@xxxxxxx.se
 Lund Institute of Technology           Phone: +46 46 222 4625
 Box 118, S-221 00 Lund, Sweden         Fax:   +46 46 138118