Parallel port connections. Update.
Hi Geoff,
Still no success with hand shaking using mode 1 on port A the port
used for the Einey printer port.
I have though established parallel port import with hand shaking from
the PC printer port by using port A for data and polling bit 2 busy
in the Einey auxiliary register and using port b Einey user port line
2 bit 0 to toggle acknowledge on the PC.
Both ports are used in mode 3; port A set for 8 bit import; port B
bit 0 for output. The data output pin from the user port was only
3.4v multi metre reading not enough to put acknowledge high on the
PC. To get it to higher voltage the data line was put through a
74ls244 (an 8 line buffer)taken off an old Einey mother board. VCC
for the IC came from the 5v pin 1 of the user port. After the IC the
voltage was still 3.4v so a 1k resister was used to pull up to the 5v
from pin 1 (I think a 2k should be used here). This brought the
output up to around 4v enough to set acknowledge on the PC. The
74ls244 might not be needed just the pull up resister but I'm
guessing the IC gives Einey some protection against to much power
back feeding.
I have programming on the PC and Einey to receive streams of data to
Einey without bytes missing or duplicating.
As a test for data output power levels from Einey's port A to the PC
I used some simple programming for Einey to send and the PC to
receive. Einey streamed data over to the PC ok (no hand shaking
established here yet) but it shows no additional hardware circuitry
is needed for data lines for the PC.
Regarding mode 1: A multi metre test on the printer port showed
strobe pin 1 of printer port connected to Aready of the z80 pio to
have a healthy 5v. Enough to hold acknowledge high for the PC. With a
connection to the PC there is no sign of strobe going low with a
negative pulse. This should happen when strobe from the PC to
acknowledge pin 19 (connected to ASTB of z80 PIO) goes from low to
high. Triggering on the rising edge.
A test I can try later (when I can disconnect my present improvised
connection) is to use strobe pin 1 to power a LED.
run the program
10 PUT &31,&4F
20 N=GET(&30)
30 PRINT N
40 GOTO 20
Then touch the line attached to acknowledge pin 19 to 5v an see if
the LED blinks off.
Given that this works unlike my present set up where I have
programming polling control over monitoring hand shaking inputs and
setting handshaking outputs-: mode 1 hand shaking is invisible to the
programmer. There is no control in mode 1 to read the state of
acknowledge or set a hand shake to the peripheral. The only way I can
see mode 1 handshaking to be effective is that the programming to
import a byte as above or its machine code equivalent is only run
when triggered by an interrupt.
I'm still mode 1 confused.
Regards Chris Coxall