Barring implementation of 65SPI on a CPLD, is there a quick-n-dirty way
to wire up a SPI-based module to an Apple II/II+/IIe? I'm looking for a
temp solution, while I design a Apple II board with a correct
interface. Something that doesn't require any soldering would be grand
(bit banging the SPI via some IO pins, Using the DSR/DTR/RTS pins on the
RS232 (if that can be done...), etc.
Since you specify bit-banging., I am going to guess that speed is not too
important and that there's not that much data to transfer. I also assume
you want to talk to an SPI peripheral.
Now, IIRC, an PSI peripheral has 3 inputs (CS/, clock, data in) and one
output (data out). So you ened 3 outptus and 1 input an the Apple.
Older SPI devices used TTL levels. If it's one of thsoe you can interface
it ot the Apple ][ with no extra hardware at all (no add-on cards
needed). If it's a 3.3V device you'll need to make soem level shifters
since the Apple is all 5V TTL.
There;s a 'games port' on the Apple ][ motherboard. Amongst oether
facilites, oyu have 4 TTL 'annunicaitor outputs's and 3 TTL inputs.
The annuncaitor outputs are controed by accessing various locations in
memory. It foesn't matter if you read or write to them, the fact that
toy've accessed them will cotnrol the output. Here are the addresses
(from the Apple 1 Reference Manual Table 9):
Annuncaitor State Hex address
AB0 Off $C058
On $C059
AN1 Off $C05A
On $C05B
AN2 Off $C05C
On $C05D
AN3 Off $C05E
On $C05F
In binary that's 1100 0000 0101 1xxy where xx slects the output and y
gives the state it becomes.
The inputs are read as the high bit of locations $C061 to $C063 in the
obvious order.
The games port is a 16 pin DIL socket in the rear right corner of the
motherboad. The pinouts (from figure 16 in the manual) is :
1 : +5V (maximum current drain : 100mA)
2 : PB0 (Input 0)
3 : PB1 (Input 1)
4 : PB2 (Input 2)
5 : C040 Strobe/
6 : Games Controller 0 (Connext 150k variable resisotor to +5V for an
analogue input)
7 : Games controller 2
8 : Ground
9: N/C
10 : Games controller 1
11 : Games controller 3
12 : Annunciator 3
13 : Annunciator 2
14 : Annunciator 1
15 : Annunciator 0
16 N/C
So you'd want to conenct to pin 8 (ground), pins 15--12 (outputs) and
pins 2-4 (Inputs). Maybe also to pin 1 (+5V) if your circuit can be
powered from that..
I do wodner about the people who cuggesets using microcontrollers for
this. Are you incapable of designing without them? You already have a
programamble microprocessor -- the 6502 in the Apple. Use that!. As it
happens the I/O circuitry you need is built-in, if it wasn'tm it'sd only
be a few sinmple ICs to add it.
-tony