What sort of information do you need on the ASIC? I've done
a fair bit of tinkering with external keyboard interfaces and
might be able to help if you let me know what you're after.

Here's one useful thing which is useful in the case of an
external keyboard interface, but I guess you know this already.
If the z80 is reading one of the input ports provided by the
ASIC (e.g. the keyboard port) then it is possible for a
device attached to the expansion port to override the
value provided by the ASIC. This is because the ASIC
data lines are linked to the z80 signals via a resistor
but the expansion port pins are connected directly to
the z80. So, if the ASIC's d7 output is at 5v but the expansion
port pin is at 0v, then the z80 reads a logic 0 on d7.

This is all well and good if you want the external keyboard
to completely replace the SAM's keyboard. If, however, you
want a key press on either the external *or* original
SAM keyboard to be registered, then you can use open-collector
devices to drive the expansion port pins. The possibilities
then are:

ASIC output     Expansion port pin          Result @ z80
=========================================================
logic 0: 0v        logic 0: 0v               logic 0
logic 0: 0v        logic 1: high impedance   logic 0
logic 1: +5v       logic 0 : 0v              logic 0 (expansion
                                                      port voltage 
                                                      dominates)
logic 1: +5        logic 1 : high impedance  logic 1 (ASIC voltage
                                                      is seen by z80)
                                                      


Since a key press is indicated by a logic 0, a key press
on either keyboard is observed by the z80. We're just doing
a wire-and really, with the ASIC-to-z80 resistor acting as
the pull-up resistor (with the ASIC providing the +5v,
to which we pull-up, on it's logic output)

Right, that's quite enough! I think you probably
know this all already, anyway.... 

Andy                                                   

Reply via email to