Changes

Z80 STI RS232 interface

1,270 bytes added, 10:35, 26 August 2014
== Intro ==
This interface was originally described in the book "[[Maschinenspracheprogramme und Hardware-Erweiterungen für Schneider CPC's]]" written by [[Paul Bauriedl]], released by IDEA Verlag in 1987. Around mid-nineties, Tim Riemann has it was turned into a single package and circulated the schematic as GIG in the internet.
The circuit is very similar (or possibly nearly indentical) to the [[Schneider RS232 Interface]]from 1985, both circuits are using a [[Media:Mostek_3801_Data.pdf|Z80 STI]], both mapped to the same I/O port addresses. Whether or not the Both circuits are fully compatible with each other is '''unknown''driven by the 4MHz signal on the CPC's expansion port, and connect CTS/RTS/DSR/DTR to the same pins, so they are (almost) 100% compatible. Some small details might differdifferences:* The Schneider circuit additionally implements CHRDET. For example, the clock source being passed * The Schneider circuit contains 2 diodes and 2 capacitors for converting ~8V AC to the Z80 STI chip could be different+8V/-8V DC.* The Schneider circuit uses only 2 chips for port decoding (the overcomplicated DIY uses 5 chips for exactly the same purpose)
<gallery>
Image:SchneiderSioManualPage2.jpg|Schneider's Schematic (1985)Image:NoPicture.png|Paul Bauriedl's Schematic (1987)Image:Tim Riemann RS232.gif|Z80 STI Schematic(1996)
</gallery>
First about the connection plan: You need a power supply that supports +9V,-9V and 5V. Connect all pins. You have to connect D0..D7 from the adressbus with the Z80 STI. You have to connect D0 with pin 21, D1 with pin 22, ..., D7 with pin 28. That's all.
Now you can plug in the interface in the CPC. Switch the power on. If the CPC doesn't work normal please switch the power off and you have to watch for faults in the connection of your interface :-(. If everything is ok then you have to copy the assembler code and do the next test.
 
'''Bugs and Confusing things in the GIF schematic:'''
* Confusing: Signals 0..15 on the left side of the schematic refer to address lines A0..A15
* Bug: Z80-STI Pin 3 (TCO) should be wired to Pin 39 (RC), not to Pin 34 (A1).
Second part: How to program the interface. (The assembler code is saved in RS232.ASM)
'''|FORMAT''', number of bps, number of stop-bits, data bits, parity on/off, parity even/odd
Number of bps: 0 = 50 bps 1 = 75 bps 2 = 110 bps 3 = 150 bps 4 = 300 bps 5 = 600 bps 6 = 1200 bps 7 = 2400 bps Number of stop bits: 1 = 1 stop bit 0 = 2 stop bit Data bits: 0 = 7 data bits 1 = 8 data bits Parity even/odd: 1 = even 0 = odd Parity on/off: 1 = on 0 = off
0 = 50 Normally, you use 8N1 for connection with BBS's you can initialise this with |FORMAT, number of bps , 1 = 75 bps 2 = 110 bps 3 = 150 bps 4 = 300 bps 5 = 600 bps 6 = 1200 bps 7 = 2400 bps, 1, 0, 1.
Number of stop bits: 1 = 1 stop bit0 = 2 stop bit Data bits: 0 = 7 data bits1 = 8 data bits Parity: 1 = even0 = odd Parity: 1 = on0 = off Normally, you use 8N1 for connection with BBS's you can initialise this with|FORMAT, number of bps, 1, 1, 0, 1.  '''|RECORD''', @a$''' - The incoming chars will be read in a string. Control codes will be send to thestring, too, because sometimes you need it for binary transmissions.  '''|SEND''', @a$The string is send until it ends, except you press ESC. The program will notsend CR or LF, so you can use this for binary transmission.
'''|SEND, @a$''' - The string is send until it ends, except you press ESC. The program will not send CR or LF, so you can use this for binary transmission.
== Used components: ==
* 1x [[Media:Mostek_3801_Data.pdf|Z80-STI]] (MK3801-4)]]* 1x [[SN75189]]- RS232 to TTL level shifter* 1x [[SN75188]]- TTL to RS232 level shifter* 1x [[74LS30]]- Single 8-input NAND gate* 1x [[74LS138]]- 1-of-8 inverting decoder/demultiplexer* 1x [[74LS20]]- Dual 4-input NAND gates* 1x [[74LS04]]- Hex Inverters* 1x [[74LS32]]- Quad 2-input OR gates
* 1x 25pin SUB-D connector (male)
* 1x connector for the [[Connector:Expansion_port|expansion port]]
Note: The 74LS20, 74LS04, 74LS32 are the smaller logic symbols in the schematic.
 
Note 2: The 74LS138 splits the address space to four regions (which is total nonsense), the 74LS20 is then merging them back to a single region (which is undoing that nonsense). Although the 74LS138 is rather useless in this case, the book from Paul Bauriedl contains further schematics, in which the 74LS138 does have some purpose.
== Downloads ==
[[File:Rs232cpc.lzh]] - All info and files on topic
 
[[Category:Peripherals]]