Cassette Interface Circuit for Homebrew Computer
- Johnny Starr
- Posts: 58
- Joined: 30 May 2012
- Location: Dallas, TX
- Contact:
Cassette Interface Circuit for Homebrew Computer
Hi there all,
TL;DR I need a circuit for connecting a tape interface to a simple 8-bit computer...
I have aspirations to create my own hombrew CPU. I have a few ideas so far about what it will do. One of the things that I love
about 1980's micros (believe me or not) are cassette interfaces. I realize that many loathe using tapes to store data, but I personally
missed out on this era as my first PC was in 1991.
Anyhoo, I'm a professional developer but an amateur hobbyist when it comes to hardware. I am planning on developing a 6502 based
project, or possibly a Z80 if not both. I have found some very helpful simple circuits for both, one in particular is here:
https://web.archive.org/web/20180131140 ... leZ80.html
I had to reference web.archive because the author's site appears to be down at this time.
What I would love to see is as-simple of a circuit for including a tape cassette interface. I understand that a ROM of sorts will be required
that can send the proper interrupts to turn on / off the motor etc. Ideally, I just want to know what ICs can be used to control the interface,
and what sort of logic needs to happen to make this possible.
It seems all the original 8-bit micros had this capability, I would just like to not have to refer to their schematics. Instead, I'd like to focus in
on the circuit so I can fully grasp what is involved. Thanks for any support.
TL;DR I need a circuit for connecting a tape interface to a simple 8-bit computer...
I have aspirations to create my own hombrew CPU. I have a few ideas so far about what it will do. One of the things that I love
about 1980's micros (believe me or not) are cassette interfaces. I realize that many loathe using tapes to store data, but I personally
missed out on this era as my first PC was in 1991.
Anyhoo, I'm a professional developer but an amateur hobbyist when it comes to hardware. I am planning on developing a 6502 based
project, or possibly a Z80 if not both. I have found some very helpful simple circuits for both, one in particular is here:
https://web.archive.org/web/20180131140 ... leZ80.html
I had to reference web.archive because the author's site appears to be down at this time.
What I would love to see is as-simple of a circuit for including a tape cassette interface. I understand that a ROM of sorts will be required
that can send the proper interrupts to turn on / off the motor etc. Ideally, I just want to know what ICs can be used to control the interface,
and what sort of logic needs to happen to make this possible.
It seems all the original 8-bit micros had this capability, I would just like to not have to refer to their schematics. Instead, I'd like to focus in
on the circuit so I can fully grasp what is involved. Thanks for any support.
Re: Cassette Interface Circuit for Homebrew Computer
I think the very early machines, such as the PET and Apple 1, had very little circuitry indeed: they didn't try to follow any standards, and they went for low cost rather than high reliability. IIRC, in both cases a bit is stored as a pair of edges and the time between the edges tells you whether its a zero or one. All the work of converting from bits to bytes to a file-saving format is then done in the software.
If you have a parallel port then you need one bit of input and one bit of output - which can even be the same bit. A parallel port can be made from a few simple chips or a single complex chip such as the 6522.
Although a very few machines included on/off tape motor control, many didn't, and you don't need it.
But my first step would certainly be to get hold of the schematics for these machines: not to understand the whole thing, but just the little bit in the corner which does the tape interface.
Later machines such as Acorn's BBC Micro had quite complex and robust and standards-conforming approaches, which used more chips: a UART (or ACIA) to do the serialisation of bytes, and some monostables to detect timing. The BBC Micro also had a custom chip to interface with the UART - mainly a clock rate generator and some muxing. See
http://beebwiki.mdfs.net/Serial_ULA
If you have a parallel port then you need one bit of input and one bit of output - which can even be the same bit. A parallel port can be made from a few simple chips or a single complex chip such as the 6522.
Although a very few machines included on/off tape motor control, many didn't, and you don't need it.
But my first step would certainly be to get hold of the schematics for these machines: not to understand the whole thing, but just the little bit in the corner which does the tape interface.
Later machines such as Acorn's BBC Micro had quite complex and robust and standards-conforming approaches, which used more chips: a UART (or ACIA) to do the serialisation of bytes, and some monostables to detect timing. The BBC Micro also had a custom chip to interface with the UART - mainly a clock rate generator and some muxing. See
http://beebwiki.mdfs.net/Serial_ULA
Re: Cassette Interface Circuit for Homebrew Computer
This is the circuit used for the Acorn Atom cassette input:
This works well at 300 baud, and less well at 1200 baud.
The output (on the left hand side) is TTL-compatible, and on the Atom connects to an input of an 8255 PIA.
The complete Atom schematic is here:
https://acorn.huininga.nl/pub/docs/circ ... iagram.gif
Dave
The output (on the left hand side) is TTL-compatible, and on the Atom connects to an input of an 8255 PIA.
The complete Atom schematic is here:
https://acorn.huininga.nl/pub/docs/circ ... iagram.gif
Dave
- Johnny Starr
- Posts: 58
- Joined: 30 May 2012
- Location: Dallas, TX
- Contact:
Re: Cassette Interface Circuit for Homebrew Computer
So i researched a bit and found a schematic of the TRS-80 Model I. I see there's a "cassette in" and "cassette out" circuit. Doesn't look like any special ICs were used. I'm trying to extrapolate the principles to understand the context.
Here's the source of my pics http://www.1000bit.it/support/manuali/t ... pdf%29.pdf
Here's the source of my pics http://www.1000bit.it/support/manuali/t ... pdf%29.pdf
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Cassette Interface Circuit for Homebrew Computer
Our Tape modems topic should be of interest. I really need to find and post the diagrams for the simple, reliable tape modem I made many years ago for use with any UART.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- Johnny Starr
- Posts: 58
- Joined: 30 May 2012
- Location: Dallas, TX
- Contact:
Re: Cassette Interface Circuit for Homebrew Computer
@GarthWilson yes sir! That would be most helpful. If I go the Z80 route a UART is definitely in the plans.
Re: Cassette Interface Circuit for Homebrew Computer
Don't forget to dig through the KIM-1 schematics, the code to use them is available in the monitor listings as well.
There's also a book describing the Apple II circuit that has a small section on the cassette interface, and how it works.
Yea, I dunno about that. You may think you're missing it, but you probably aren't.
I used them on my KIM-1, the PET 2001, the TRS-80, Atari 800, and my Model 100.
They're better than nothing -- barely.
There's also a book describing the Apple II circuit that has a small section on the cassette interface, and how it works.
Johnny Starr wrote:
I realize that many loathe using tapes to store data, but I personally missed out on this era as my first PC was in 1991.
I used them on my KIM-1, the PET 2001, the TRS-80, Atari 800, and my Model 100.
They're better than nothing -- barely.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Cassette Interface Circuit for Homebrew Computer
You may have a cassette machine you're planning to use, which worked the last time you powered it up but it has been sitting. Note that the common problem is that the belts (and to a lesser extent, other rubber parts) rot. Before the internet was so developed and before so many businesses had a website, searching for replacement belts was very frustrating. A place I have bookmarked is http://www.marrscommunications.com/ . I recently got a set of belts for a semi-pro-quality portable Marantz Superscope CD-320 through eBay, but I think this website will have better quality. Here's a site for pinch rollers you might not be able to get elsewhere: http://www.terrysrubberrollers.com/ .
Can you tell I like tape recorders? I have little use for one at this point, but I like them anyway. One that would really feel nice to have is a portable (as in, with shoulder strap) Nagra open-reel machine. I had the opportunity to work on some in 1982 (for modification for a special purpose, not for repair), and they were like jewel inside, incredibly high quality of construction!
I also worked for TEAC/Tascam in 1982-83, and repaired over a thousand units while there.
For manufacturers that made their own proprietary cassette machines (like Commodore with its Datassette) though, I always wondered why they didn't run the tape faster so they could get faster data rates. If it doesn't need to be compatible with standard cassette machines that run at 1-7/8 IPS, you might as well run it 2, 4, or even 8 times the normal speed, and get anywhere up to 9600bps data rate!
Can you tell I like tape recorders? I have little use for one at this point, but I like them anyway. One that would really feel nice to have is a portable (as in, with shoulder strap) Nagra open-reel machine. I had the opportunity to work on some in 1982 (for modification for a special purpose, not for repair), and they were like jewel inside, incredibly high quality of construction!
I also worked for TEAC/Tascam in 1982-83, and repaired over a thousand units while there.
For manufacturers that made their own proprietary cassette machines (like Commodore with its Datassette) though, I always wondered why they didn't run the tape faster so they could get faster data rates. If it doesn't need to be compatible with standard cassette machines that run at 1-7/8 IPS, you might as well run it 2, 4, or even 8 times the normal speed, and get anywhere up to 9600bps data rate!
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: Cassette Interface Circuit for Homebrew Computer
GARTHWILSON wrote:
For manufacturers that made their own proprietary cassette machines (like Commodore with its Datassette) though, I always wondered why they didn't run the tape faster so they could get faster data rates. If it doesn't need to be compatible with standard cassette machines that run at 1-7/8 IPS, you might as well run it 2, 4, or even 8 times the normal speed, and get anywhere up to 9600bps data rate!
Re: Cassette Interface Circuit for Homebrew Computer
I don't know if anyone used to do this, but couldn't you connect one computer to another via the tape ports and use this for transferring programs or data? If you SAVEd a program on one side and LOADed on the other it should just work, unless the signal strength is different for writing and reading.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Cassette Interface Circuit for Homebrew Computer
jds, that should work fine.
Jeff, the cassette duplicators for high-quality recording (meaning music) mostly ran at normal speed, while ones focused on just speech, like for lectures and using the 50¢ tapes, often ran at 16x normal speed.
Jeff, the cassette duplicators for high-quality recording (meaning music) mostly ran at normal speed, while ones focused on just speech, like for lectures and using the 50¢ tapes, often ran at 16x normal speed.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: Cassette Interface Circuit for Homebrew Computer
jds wrote:
I don't know if anyone used to do this, but couldn't you connect one computer to another via the tape ports and use this for transferring programs or data? If you SAVEd a program on one side and LOADed on the other it should just work, unless the signal strength is different for writing and reading.
With the mono cassette tape decks (nicknamed shoe box recorders) the output was often from the ear socket (which was often designed with an 8 ohm earpiece in mind). But the mic input was designed to take the very low level signal from a moving coil / dynamic microphone. Hence the computer's tape ports had to match the signal levels to that of the tape deck.
However, an amplifier or attenuator could match the signal level and then you could connect two computers together.
Mark
Re: Cassette Interface Circuit for Homebrew Computer
Mike Willegal has a page about the cassette interfaces on Apple I and Apple II: http://www.willegal.net/appleii/aci.htm
(and I've even got the Panasonic RQ2102 cassette recorder that Apple recommended back then. I'm ready to go!)
(and I've even got the Panasonic RQ2102 cassette recorder that Apple recommended back then. I'm ready to go!)
Re: Cassette Interface Circuit for Homebrew Computer
Cassette interfaces will always have a place in my heart. I was (and still am) a huge fan of them. My first storage device was the official TI tape cassette recorder (can't remember model number) that I used on my TI99-4/a. I was nine years old. I remember when I was nine, or ten, typing a really long program from a magazine and saving it to tape. Then, later on, I wanted to add to that program. So I typed the new lines and saved over my original. Somehow thinking they would "magically" merge together. LOL Ah, those were the days.
In the Commodore 64/ZX Spectrum world, tapes have not died yet. Many new releases still come on tapes. In fact, there are hardware emulators (using Arduino's) to emulate a tape drive.
Part of the "tape drive experience" are the load screens and music. Almost like watching awesome previews to an awesome movie you're about to watch (before they were flooded with soda and insurance commercials).
So I am totally on-board when it comes to tape drives. I totally plan on designing one into my SBC computer as well.
In the Commodore 64/ZX Spectrum world, tapes have not died yet. Many new releases still come on tapes. In fact, there are hardware emulators (using Arduino's) to emulate a tape drive.
Part of the "tape drive experience" are the load screens and music. Almost like watching awesome previews to an awesome movie you're about to watch (before they were flooded with soda and insurance commercials).
So I am totally on-board when it comes to tape drives. I totally plan on designing one into my SBC computer as well.
Cat; the other white meat.
Re: Cassette Interface Circuit for Homebrew Computer
The Apple interface is about as simple and unreliable as you can get. I think it was the main reason they sold so many disk drives for the apple II series.
The KCS interface may be a bit more complicated, but it is quite reliable when used with a reasonable cassette deck and properly set up (at least in my experience). The nice thing about KCS is, that if the data is stored in encoded ASCII format, it becomes interchangeable between different systems.
Personally I despise cassette tape storage. For most of the home-built systems I deal with, loading and saving from PC is world's better. Cassette tape is one quirky nostalgia I can do without.
The KCS interface may be a bit more complicated, but it is quite reliable when used with a reasonable cassette deck and properly set up (at least in my experience). The nice thing about KCS is, that if the data is stored in encoded ASCII format, it becomes interchangeable between different systems.
Personally I despise cassette tape storage. For most of the home-built systems I deal with, loading and saving from PC is world's better. Cassette tape is one quirky nostalgia I can do without.
Bill