Changes

Jump to: navigation, search

Z80 STI RS232 interface

671 bytes removed, 22:18, 29 April 2010
- Schematic and source code.
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.
WARRANTY: There is no warranty of any defects of your CPC!!! On my CPC every-========= thing everything works fine and I hope that you won't have any problems with this RS232-Interface.
Second part: How to program the interface. (The assembler code is saved in============ RS232.ASM)
Z80-STI: 50 to 19200 bps (5,6,7 or 8 bit, 1, 1 1/2, 2 stopb., all parity flags) 24 registers, use 16 registers (direct) with F8E0-F8EF, the last 8 registers can be used indirect with a special register
The meaning and the adresses of the registers:
use V24 you can request handshake signals from this port. In this interface
the following bits have this meaning:
  Bit 0: DTR (Data Terminal Ready) Bit 1: RTS (Ready to Send) Bit 2: CTS (Clear to Send) Bit 3: DSR (Data Set Ready) Bit 4-7: not used
register 2-7, port adress F8E2-F8E7:
Bit 0: Receiver-Enable, set to 1 if receiving is possible.
Bit 1: Memory full "1" or not "0". (If 8 Bits are received then the interface send memory full).
register 14, port adress F8EE:
Bit 0: Sending-Enable, must set to "1" if sending is allowed.
Bit 7: Memory full "1" or not "0". This bit can be used to ask if a word is send or not.
register 15, port adress F8EF:
Indirect registers (Choose them with register 8):
=================================================
register 0: Not used.
Here you can read the description about this new commands:
|FORMAT, number of bps, number of stop-bits, data bits, parity on/off, parity even/odd
Number of bps: 0 = 50 bps
Number of stop bits: 1 = 1 stop bit
0 = 2 stop bit
Data bits: 0 = 7 data bits
1 = 8 data bits
Parity: 1 = even
0 = odd
Parity: 1 = on
0 = off
Normally, you use 8N1 for connection with BBS's you can initialise this with
19
edits