parallel port question

hi all

im teaching parallel port driver
im looking at baker’s old book
chapter 9

is this correct?

here is his XxTransmitBytes

XxTransmitBytes( )
{
//…
// Send as many bytes to the device as it
// can handle. Each byte must be strobed
// out.
//
while( XferSize > 0 ) {

//
// Make sure the STROBE line is off
//
XxWriteControl( pDE, Control & ~XX_CTL_STROBE );

//
// Send a byte and hold it for at least
// 500 nano-seconds
//
XxWriteData( pDE, *pDE->pBuffer );// where is a fifo pointer being advanced???
KeStallExecutionProcessor( 1 );

//
// Turn on the STROBE line and hold it
// for at least 500 nano-seconds
//
XxWriteControl( pDE, Control | XX_CTL_STROBE );
KeStallExecutionProcessor( 1 );

//
// Turn off the STROBE line
//
XxWriteControl( pDE, Control & ~XX_CTL_STROBE );
KeStallExecutionProcessor( 1 );

//
// Update pointer and counters
//
pDE->pBuffer++;
XferSize–;
pDE->BytesRemaining–;
}
}

1… now, according to baker, you must strobe each byte.
is this not the job of the interupt mechanism?
i mean, if we have to strobe each byte, then when will
we ever recieve an interrupt???
2… if the hw can handle 2 bytes (fifoSize==2)
where is a fifo pointer being advanced?
3… from his XxStartIo he called XxTransferBytes wrapped in KeSynchronizeExecution
why would you ever need to do this?
i mean, if you are now initiating an io, you are not expecting interrupts.
???unless you expect an error interrupt…???
could it be that he was getting interrupts from the strobe?
and had to mask them out???
please, please help me
this is very important

thanks
assaf


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

baker mentions the use of a fifo
is his code correct, or not?
even if we use the fifo
shouldn’t you stobe at the end of filling up the fifo?
couse baker strobes each byte
which is not very logical to me

is there a parallel port discussion forum of some sort?

assaf
----- Original Message -----
From: “Manfred Keul”
To: “Assaf Wodeslavsky”
Sent: Friday, December 14, 2001 4:16 PM
Subject: parallel port question

Assaf,

> 1… now, according to baker, you must strobe each byte.
> is this not the job of the interupt mechanism?

No. The basic lpt protocol to send a byte is: Write the byte to the data
port, pulse strobe once so that the printer can latch the byte. And so on.
Interrupts are not used at all.

Better than in the NT related ntdev list you’ll find information about LPT
basics at http://www.lvr.com/parport.htm.

Manfred

PS: Please don’t post HTML into the ntdev list. Please use plain text
instead.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com