Hi Chris,
I think I was was wildly wrong earlier (depending on how things were
implemented in the Einstein). Mode 1 should handle the handshaking. I
did, however notice a discrepancy between your control code and the
one listed in the docs.
The PIO doc mentions that to set the mode the control code must use
the two most significant bits for the mode number (ie 01 for mode 1),
then two unused bits (set to 00), followed by the last nibble all 1
(to indicate you want to set the Mode and not issue a different
command) making 01001111 or &4F not &47 as you had in your message. If
the last 4 bits were set to 0111 (&7) then the PIO will think the
control code is for setting interrupts (or ignore it as it would have
been sent at the wrong time)
So to use Parallel Port A (the printer port) in Mode 1;
OUT (&4F,&31) - To send &4F to the printer control register at &31
IN (&30) - To read from the printer data register at &30
(that's for Basic, in assembler the op codes are OUT and IN but the
syntax is obviously different depending on the assembler)
To do the same for Parallel Port B (the User Port) you'd send the
control code to &33 and read data from &32.
Let me know if this helps. I have assumed that the PIO is wired up in
the Einstein in a standard format. I don't have a schematic for the
main board so can't check without opening one up. I have also assumed
that there is nothing stopping input from the printer port.
Regards,
Geoff
> In my Einey Mag back numbers lots of info on using mode
> 3-control mode. Nothing on mode 2. For mode 0-only mentions
> to set mode 0 by an OUT to the control of &0F. For mode
> 1-only mentions to set mode 1 by an OUT to the control of
> &47. There isn't any programming examples for mode 0 or 1.
>
> Any help appreciated.
>
> Regards Chris Coxall
>