This is an old revision of the document!
Table of Contents
ECB Cassette Interface
The ECB Cassette Interface is a board used to load and store data on cassette tapes. Vintage computers commonly use cassette tape for program and data storage. The ECB Cassette Interface board uses the Kansas City Standard for encoding data.
Features
- 300 & 600 baud operation through standard 16550 UART.
- Hardware encode and decode operation.
- ROMWBW CP/M BIOS support.
- 16550 UART may be used as a serial port with RS232 level voltages.
- Kansas City Standard audio encoding.
Acknowledgments
The ECB-Cassette was developed by Nik Brisevac and is based on a design published in August 1976 of Microtrek Magazine by Don Kinzer.
Hardware Documentation
Connector | Description | Serial Mode | Cassette Mode |
---|---|---|---|
SW1 | TX-RX Loopback | Off (Up) | Off (Up) |
SW2 | RTS-CTS Connect | Connect On (Up), Connect Off (Down) | N/A |
JP1 | AUX - High level cassette output | N/A | to cassette |
JP2 | MIKE - Low level cassette output. | N/A | to cassette |
JP3 | CASSETTE MONITOR OUT | N/A | from cassette |
K1 | Select DSR or CTS flow control | 1-2 DSR, 2-3 CTS | N/A |
K2 | Select DTR or RTS flow control | 1-2 DTR, 2-3 RTS | N/A |
K3 | Select CTS or DRS flow control | 1-2 CTS, 2-3 DSR | NA |
K4 | Select RTS or DTR flow control | 1-2 RTS, 2-3 DTR | NA |
K5 | LEGACY/N8VEM OR KONTRON reset mode | 1-2 KONTRON 2-3 LEGACY/N8VEM | 1-2 KONTRON 2-3 LEGACY/N8VEM |
P1 | Port Address Select | 80h= 1-2 OFF, 3-4:5-6:7-8:9-10 ON | 80h= 1-2 OFF, 3-4:5-6:7-8:9-10 ON |
P3 | Serial header connector | YES | NO |
P5 | Baud rate clock mode selector | 1-2 | 2-4, 1-3 |
LED D4 | Receive data indicator | ||
LED D1 | Transmit data indicator |
Cassette Mode
The ECB-Cassette card incorporates an RS-232 serial port that is connected to a cassette interface circuit . The RomWBW system will automatically discover the card when it is configured at the default port 0x80 and CP/M will automatically map it to one of the CP/M IObyte devices. By default RomWBW sets it to 300,8,N,1 but the MODE utility can also be used to set other baud rates for the cassette interface. ECB Cassette supports 300 and 600 baud but other rates can be set and used when the card is being used for serial communication.
Example boot output of ECB-Cassette discovery:
SBC Z80 @ 8.000MHz 0 MEM W/S, 1 I/O W/S 512KB ROM, 512KB RAM UART0: IO=0x68 16550A MODE=38400,8,N,1 UART1: IO=0x80 16550A MODE=300,8,N,1
CP/M console redirection is used to save and load files using the CP/M RDR: & PUN: device. The system appears as a punch card machine with which it sends and receives ASCII characters. As console redirection interprets some characters as special commands, binary files cannot be saved or loaded with this method. To overcome this limitation files must be converting to and from HEX format.
Depending on what character devices are connected to your system, the ECB-Cassette may be assigned to different IObyte devices. IObyte redirection status can be seen using the STAT command. The following example shows that the RDR: and PUN: devices are assigned to the PRT: and PTP: device respectively.
B>stat dev: CON: is TTY: RDR: is PTR: PUN: is PTP: LST: is LPT:
The available devices that can selected can also be seen using the STAT command:
B>stat val: Temp R/B>stat val: Temp R/O Disk: d:=R/O Set Indicator: d:filename.typ $R/O $R/W $SYS $DIR Disk Status : DSK: d:DSK: User Status : USR: Iobyte Assign: CON: = TTY: CRT: BAT: UC1: RDR: = TTY: PTR: UR1: UR2: PUN: = TTY: PTP: UP1: UP2: LST: = TTY: CRT: LPT: UL1:
For your system you will need to determine which IObyte device has been assigned to the Cassette Interface. Then you can reassign the RDR: and PUN: device to them.
Example of reassigning RDR: to UR1: and PUN: to UP1:
B>stat rdr:=ur1: B>stat pun:=up1: B>stat dev: CON: is TTY: RDR: is UR1: PUN: is UP1: LST: is LPT:
To change the baud rate to 300 or 600 baud use the MODE command i.e.
B>mode com1:600,n,8,1 COM1: 600,N,8,1
B>mode com1:300,n,8,1 COM1: 300,N,8,1
Board configuration
If switch SW1 is installed then it should be set so TX-RX loopback is off, switch should be in the down position. SW1 & SW2 do not need to be installed for cassette or serial operation.
Set the reset configuration to match the rest of your system. Typically new systems use Kontron so K5 should be jumpered 1-2. This setting must match all the other boards in your system.
Set the port address of the board to 80h, jumper P1 3-4:5-6:7-8:9-10.
Set the baudout-rclk selector mode jumpers P5 so 1-3 and 2-4 are jumpered.
Set C2 and R11 to match the desired baud rate:
- 300 baud C2=0.01uF, R11=10K
- 600 baud C2 =0.005uF, R11=5.1K
Note that the naming convention of the connectors can be a bit confusing.
- JP1 & JP2 are outputs from the board and an input on the cassette recorder. One of these lines is used for saving to tape.
- JP3 is an input to the board from the cassette player and is used for loading from tape.
Connect the saving/recording line:
If your cassette has a line in socket then normally you would connect JP1 (AUX) to the line in socket. If your cassette has a microphone input socket, typically you would connect JP2 (MIKE) to this socket. Either way, only JP1 or JP2 should be connected to your cassette recorder input.
If your cassette recorder only has a microphone input and you are finding that the recorded volume is too low or you have to turn up the cassette volume very high, then you may have to connect JP1 (AUX) which has the higher signal output to the microphone input.
Connect the loading/playing line:
Connect the Earphone line to the to JP3.
Usage Notes
File transfer;
To use CP/M PUN: & RDR:
convert COM files to HEX with UNLOAD.
example: UNLOAD TEST.COM <RETURN>
—–> creates TEST.HEX
convert HEX back to COM file use LOAD.
example: LOAD TEST.HEX <RETURN>
—–> creates TEST.COM
Load sequence:
1.key PIP command ie. PIP TEST.HEX=RDR:[E] <RETURN>
2.press play
3.Toggle load switch ON
Save sequence:
1. Toggle Save switch ON
2. Press Record on cassette player
3. Key PIP command ie. PIP PUN:=TEST.HEX[E] <RETURN>
Storing large files;
files over 25K split into smaller files with notepad.
for retrieval, concatenate files with PIP.
example: PIP WHOLEFILE.HEX=1STFILE.HEX[ I ],2NDFILE.HEX
Link to reference for above commands:
http://www.cpm.z80.de/randyfiles/DRI/Intro_to_CPM_Feat_and_Facilities.pdf
Serial Mode
The ECB-Cassette card can be configured to operate as a serial card. The default setting for the card is for 300 baud operation and the MODE command should be used to change the baud rate to a suitable speed.
Using MODE without any parameters will list the current com: port assignment settings:
B>mode COM0: 38400,N,8,1 COM1: 300,N,8,1
To change COM1: to 9600 baud use:
B>mode com1:9600,n,8,1 COM1: 9600,N,8,1
Hardware settings
K1, K2, K3 and K4 configure the flow control signals.
K3 & K4 select which signals are used from the the serial header P3.
K3 & K4 jumpers are designed to select either of two configurations - DSR & DTR signals are used or RTS & CTS signals are used for flow control.
K1 & K2 select which of the chosen DSR/DTR or RTS/CTS from K3/K4 get routed to which UART DSR, CTS, DTR and RTS pins.
Typical setting are for RTS/CTS flow control
- Jumper K1 2-3
- Jumper K2 2-3
- Jumper K3 1-2
- Jumper K4 1-2
If SW1 is installed then it can be used to override flow control settings by connecting RTS and CTS. Usually it is unused and should be set to the unconnected setting i.e. switch down.
Set the reset configuration to match the rest of your system. Typically new systems use Kontron so K5 should be jumpered 1-2. This setting must match all the other boards in your system.
Set the port address of the board to 80h, jumper P1 3-4:5-6:7-8:9-10.
If another port setting is required or the default serial speed needs to be changed then a custom build of ROMWBW is requires. Update the uart.asm source as shown below
#IF (UARTCAS) ; CASSETTE INTERFACE SERIAL PORT .DB 0 ; DEVICE NUMBER (UPDATED DURING INIT) .DB 0 ; UART TYPE .DB $80 ; IO PORT BASE (RBR, THR) <<<Change port here .DB $80 UART_LSR ; LINE STATUS PORT (LSR) <<<and here .DW SER_300_8N1 ; LINE CONFIGURATION <<<Change baud rate here. See std.asm for options i.e. SER_9600_8N1 .FILL 2,$FF ; FILLER #ENDIF
Set the baud rate selector mode jumpers P5 to 1-2. This reconfigures the UART transmit and receive clock to use the crystal derived source.
Board manufacturing and design files
Current Version: Rev 1a - includes a jumper for the Kontron\N8VEM reset configuration.
Board: :boards:ecb:cassette_intf:ecb-cassette-interface-001a-brd.pdf
Schematic: ecb-cassette-interface-001a-sch.pdf
Gerbers: :boards:ecb:cassette_intf:ecb-cassette-interface-001a-gerbers.zip
Kicad: :boards:ecb:cassette_intf:ecb-cassette-interface-001a-kicad.zip
Errata and modifications
Chip select correction
The M1 signal is currently not used to qualify the UART chip select. This is not currently know to cause any issues with this board but may be implemented on future designs.
Pin lift method - no modification to PCB
- Remove IC2 74LS682 from its socket. Lift pin 17 and 18 and reinstall in the socket.
- Connect pin 18 to pin 20 on IC2 the 74LS682 chip.
- Connect pin 7 U4 to pin 17 on the 74LS682 chip.
Cassette cable sockets
JP1, JP2, JP3 headers can be inconvenient for connecting to a cassette recorder. A variety of 3.5mm sockets are available and can be attached to the spare area of the pcb to enable connection and disconnection quick and easy. And example of this approach is shown below:
- PCB is drilled for contacts to penetrate to the solder side.
- Remove locating lugs from socket.
- Sockets are attached to PCB with glue.
- Sockets are connected by running wires to the jumpers on the solder side of the PCB.
Relay driver for cassette start and stop
Some cassette players support a remote start and stop controller. The following is a circuit suggestion for implementing a relay driven remote controller to suit these units. A spare user output OUT1 on the 16550 UART is used for this purpose. The output of this pin can be driven by software control using the UART Modem Control Register bit 2.
Save/Load selection switch
A front panel switch can be installed to select between save and load by connecting a DPDT switch to P5.
Additional Circuit Documentation
Microtrek Magazine Article on Simple Cassette Interface.
Byte Magazine article by Don Lancaster featuring Serial Interface designs
Troubleshooting
Initial recording and playback testing can be done by connecting the ECB-Cassette board to a computer's earphone and microphone socket and using standard PC applications to play and record sound. This will help eliminate sound quality issues coming from the cassette i.e. speed variation, tape quality or record issues. Also, it is easier to identify correct playback volume through a computer that can be repeated accurately.
Correct tape input operation can be confirmed by connecting a TTL serial to usb converter to the data output circuit.
- Connect pin 9 of U1 to RXD of the USB- TTL converter
- Connect ground from board to GND on USB-TTL converter.
- Set correct baud rate and flow control off in a terminal program and monitor.
Correct voltage conversion operation can be confirmed by bypassing Q5 and U6 the Max232.
- Remove U6
- Connect pin 9 of U1 to Pin 10 (SIN) of U5 UART.
- This connects the TTL level output to the TTL level input if the UART.
Video Demonstrations
Below are two videos demonstrating operation of the Cassette Interface:
kcs_300_baud.mov - 300 baud.
600_baud.mov - 600 baud.
Software
scream.bas - UART 'Scream' test program written in Microsoft BASIC
loader.com - CP/M program to load files from cassette??
stpkg.7z - package including MBASIC and Star Trek game in .hex format for testing Cassette Interface
Photo Gallery
File List
Filename | Filesize | Last modified |
---|---|---|
600_baud.mov | 5.2 MiB | 2016/07/06 14:49 |
byte_serial_interface_tvt.pdf | 324.1 KiB | 2019/06/10 00:11 |
caspic2.png | 234.0 KiB | 2020/01/25 07:28 |
caspic3.png | 140.0 KiB | 2020/01/25 09:08 |
cass-diag.png | 58.2 KiB | 2020/01/26 00:54 |
cassette.lst | 2.3 KiB | 2016/07/06 14:49 |
cassette001a.jpg | 1.1 MiB | 2019/05/31 17:16 |
cassette001a_labelled.jpg | 221.1 KiB | 2019/06/04 01:54 |
cassette_bom_001a.xls | 9.5 KiB | 2019/06/02 12:18 |
casspic1.jpg | 763.5 KiB | 2020/01/25 05:43 |
casspic3.jpg | 99.1 KiB | 2020/01/25 21:12 |
cassutil.zip | 3.7 KiB | 2020/01/31 06:33 |
ecb-cassette-interface-001-brd.pdf | 728.8 KiB | 2016/07/06 21:23 |
ecb-cassette-interface-001-kicad.zip | 51.1 KiB | 2016/07/06 21:23 |
ecb-cassette-interface-001-sch.pdf | 161.2 KiB | 2016/07/06 21:23 |
ecb-cassette-interface-001a-brd.pdf | 631.0 KiB | 2019/06/02 12:17 |
ecb-cassette-interface-001a-gerbers.zip | 429.9 KiB | 2019/05/25 08:59 |
ecb-cassette-interface-001a-kicad.zip | 244.9 KiB | 2019/06/02 12:19 |
ecb-cassette-interface-001a-sch.pdf | 178.7 KiB | 2019/06/02 12:16 |
kcs_300_baud.mov | 7.9 MiB | 2016/07/06 14:50 |
loader.com | 11.8 KiB | 2016/07/06 14:49 |
microtek_cassette_interface_portrait.pdf | 3.1 MiB | 2019/05/31 18:39 |
scream.bas | 399.0 B | 2016/07/06 14:49 |
stpkg.7z | 39.4 KiB | 2016/07/06 14:49 |