Author Topic: Serial / Parallel I/O via Z80 bus adapter  (Read 1505 times)

0 Members and 1 Guest are viewing this topic.

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 555
  • Country: 00
  • Liked: 124
Serial / Parallel I/O via Z80 bus adapter
« on: 23:19, 22 February 17 »
Hello again,


Here's some more news.

One of the problems with having and using a PCW is the difficulty with transferring stuff onto it. Amstrad made an adapter called a CPS 8256 which incorporated an RS-232 and Centronics printer port, so I decided that because these are fairly hard to come by and generally expensive as a result, I'd design my own.

So here's the thing. It attaches to the Z-80 bus I introduced with uDE-8 and uses a modern MAX222 charge pump to generate the 12v required for true RS-232, but also has TTL level RS-232 for direct connection to a USB serial adapter.

Other than those points, it should be compatible with the SIO and parallel drivers that are built into CP/M Plus. You can hook it into your uIDE Z80 bus and be away immediately.

To transfer files, just use KERMIT.COM, which will be on the uIDE image I plan to share (you can use this to get the uIDE driver onto your PCW too, but more about that later). And, of course, the Centronics port lets you plug a standard parallel printer into the 8256 - step up to bubblejet!


For now, let's take a look at the new board.

 [ Invalid Attachment ]

The 40 way connector on the left is the Z-80 bus adapter. On the right is a block connector for RS-232 and Centronics plugs, and behind the Centronics connector is the TTL RS-232 header with GND and +5v. There's a power light bottom left.

I may add TX/RX lights too because there's probably space (below the RS-232 header).

These boards will go into production if there is enough interest. I do not propose to offer them built though, because they are much more complex than the uIDE and the key components, the Z80-DART and i8253, are a bit expensive. And please note, you need one of the Z-80 bus adapters to use it (Z-80 shim or PCW Expansion Port adapter), but if you have a uIDE you can daisy chain it to the Z-80 bus connector on there.

Oh, by the way, it's not "universal" like uIDE. PCW only, because there is no space on the board for the additional jumpers and circuitry, as you can see. I don't think it will work with the 9512 either; I have a genuine CPS8256 and that isn't compatible with my 9512. I need to find out why, though I suspect a clash with its inbuilt Centronics port. Research is needed...

Still, what do you think of it? Interested?

Your PCW Pal
JonB
« Last Edit: 23:29, 22 February 17 by JonB »

Offline greatwolf1283

  • CPC464
  • **
  • Posts: 29
  • Country: gb
  • Liked: 25
Re: Serial / Parallel I/O via Z80 bus adapter
« Reply #1 on: 00:07, 23 February 17 »
Well, I'm currently working on my own CPS8256 clone, although I've plumped for the MAX241, due to the fact that the circuit requires 4 receiver circuits and 3 transmission circuits for the rs232 transceiver.  Also, I've also discovered that there's also a couple of errors on the published schematics that I'm waiting to check before announcing them.  Of course that involves taking some of my CPS8256 apart and as I've got it working again I need to be carful about it.

One thing I've also done with mine is include the DE9M and DB25S connnectors which are the standard these days.  I'm also looking at replacing the 8253 chip which is no longer in production with an 82C54, which is still being produced by Intersil.  Again, whilst everything suggests this should be a drop in replacement, I still want to test it first.  Once I've also got the boards back for the 8256 version I'm going to be building one and looking and seeing if I can make a version that works with the 9512 and also has the connectors in a far more sensible orientation.

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 555
  • Country: 00
  • Liked: 124
Re: Serial / Parallel I/O via Z80 bus adapter
« Reply #2 on: 00:53, 23 February 17 »
That'll plug into the expansion port, I expect. Nice to have some options..


Mine uses the Z80 bus (per uIDE) and there is a new backplane to carry it and other boards:


 [ Invalid Attachment ]


The backplane is a really rough render and I expect it will be altered (needs mounting holes and the gap between connectors may need widening) but that's basically it..

Offline greatwolf1283

  • CPC464
  • **
  • Posts: 29
  • Country: gb
  • Liked: 25
Re: Serial / Parallel I/O via Z80 bus adapter
« Reply #3 on: 07:49, 23 February 17 »
Quote from: JonB
That'll plug into the expansion port, I expect. Nice to have some options..

Indubitably, although at times using the backplane Expansion Connector is the most annoying thing to use.  Almost all the pinouts for it are for the drilled holes just inside the case rather than the actual card edge poking out the back.  I'd already laid it out once and had all of the signal lines done when I realised that the bloddy thing was mirrored!  Having to double check the different signal lines to make sure there all correct was not fun!

One thing I did find on mine was an extra 1K resistor between +5V and pins 1 & 4 of the 74LS74.  Now it could be that mines a earlier spin of the board, but my guess is there was a problem with that particular part of it and they potentially added it to limit the current going through those 2 pins for some reason.  I'll take a photo of mine today at some point.

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.077
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3396
Re: Serial / Parallel I/O via Z80 bus adapter
« Reply #4 on: 10:36, 23 February 17 »
Pins 1 and 4 of the 74LS74 just need to be held high. Technically you could connect them directly to the 5V rail, but it's better practice to use a pullup resistor to limit the current and it will reduce the overall current the device requires. Anything up to about 10K should be fine.

Bryce.

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 555
  • Country: 00
  • Liked: 124
Re: Serial / Parallel I/O via Z80 bus adapter
« Reply #5 on: 21:39, 23 February 17 »
On my respin, all pins formerly being held high by connecting direct to 5v are going through a 1k resistor. The wiring net is labelled Logic-1 on my schematic, appropriately enough..


I'm a bit concerned about your comments about errors, wolf. The schematic was corrected (pin 9 of the CTC IIRC), but have you spotted any more? I'm home now so can do a bit of tracing on mine.


I set my SIO up as a PC style DB9 with just CTS/RTS and TXD/RXD. I think the other lines (DCD/DTR?) just add confusion.


Which schematic capture tool are you using? If KiCAD / eeschema, I can share my project files with you.


Cheers
JonB

Offline greatwolf1283

  • CPC464
  • **
  • Posts: 29
  • Country: gb
  • Liked: 25
Re: Serial / Parallel I/O via Z80 bus adapter
« Reply #6 on: 10:22, 24 February 17 »
It's mainly that resistor and a few extra capacitors.  I think a couple are to do with the +-12V inverter board, as they're placed on the outputs to that.  There's also an addition Electrolytic not listed on the schematic which I'm assuming is a high value bypass cap for the whole board, which looking at your design would appear you've got.  I'm also planning on double checking pin 24 of the DART as the markings on the schematic I have access to I can't quite work out (looks like a Y instead of an X!) and I just want to double check.

One thing I will suggest is that with using the RTS/CTS lines, I believe that the PCW CP/M doesn't support this handshaking scheme out of the box (although I could be wrong).  Luckily, on John Elliot's webpage
John Elliot's webpage, there's a patch for the CP/M to make it compatible with that handshaking.  This would make it compatible with the hardware handshaking that your board would still support.  All the other handshaking schema are I believe just using the Tx and Rx lines.  Just something to be aware of.

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 555
  • Country: 00
  • Liked: 124
Re: Serial / Parallel I/O via Z80 bus adapter
« Reply #7 on: 14:15, 24 February 17 »
No, I took the bypass cap out on the grounds that it was taking up too much space. Might have to rethink it now. And add the "programmable" I/O addressing that uIDE has. And redo the serial / parallel connectors, becasue they are wrong, and add the serial activity lights.


I don't think mine will be ready any time soon!


Besides, I have a lot of uIDE work outstanding. I'm getting ahead of myself. Do you want my schema file?

Offline greatwolf1283

  • CPC464
  • **
  • Posts: 29
  • Country: gb
  • Liked: 25
Re: Serial / Parallel I/O via Z80 bus adapter
« Reply #8 on: 13:07, 26 February 17 »
Trust me, I  know the feeling, sometimes it's like taking two steps back for every one forward.  Course then, when it's finally all finished and you can sit back, relax, and enjoy having made something that brings joy not just to yourself but also other people, well, that's why we do it!

If you send me your files I'm more than happy to have a look at them.  Same way if you'd like my schema files you're more than welome to them (I'm going to be releasing all my files anyway when I'm all done so it'd be good to have someone to check them over in case I've missed something!)

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 555
  • Country: 00
  • Liked: 124
Re: Serial / Parallel I/O via Z80 bus adapter
« Reply #9 on: 09:52, 10 March 17 »
@greatwolf1283 - links to files sent via PM.


Meanwhile, new board layout:


 [ Invalid Attachment ]

Activity lights are in there (bit of an assumption on my part as to whether they will work or not). There's not much space for a MAX241, but I will see if I can fit it in, because I'd like some compatibility and the PC DB9 pinout has DTR/DCD, I believe.


At some point I will have to build a prototype and test it all. Not looking forward to that!

Offline 1024MAK

  • Supporter
  • 464 Plus
  • *
  • Posts: 320
  • Country: gb
  • Touching the hot end of an iron will hurt!
  • Liked: 137
Looking forward to summer in Somerset :-)

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 555
  • Country: 00
  • Liked: 124
Re: Serial / Parallel I/O via Z80 bus adapter
« Reply #11 on: 12:54, 11 March 17 »
So it does have ring indicator? OK Mark... but I won't be fitting a MAX241 on the board as it is. Looks like I'll have to lengthen it a bit (must stay at ~60mm wide for compatibility with uIDE and the (proposed) z80 bus board).


Cheers :)

Offline jamesots

  • CPC464
  • **
  • Posts: 22
  • Country: gb
  • Liked: 31
Re: Serial / Parallel I/O via Z80 bus adapter
« Reply #12 on: 19:35, 04 April 17 »
Hi, I've made myself a serial port which was based on the CPS8256, but without the parallel port and only TX, RX, CTS and RTS are connected. It uses a new MAX3232 and an 82C54 - the other chips are ones I pulled out of old computers years ago when I ran out of space to keep them. The first version required some bodge wires, but it works, up to 9600 baud. It has pin headers and an edge connector (not attached yet), mainly because edge connectors are more expensive, so I wanted a cheaper option to use until I had a working board, and I already had a ribbon cable which I used to connect to the original stripboard prototype.


* serial port 2.jpg
(241.57 kB, 1154x727 - viewed 43 times)


I think I've fixed the design, and also added some LEDs and labels to the next version, which I've just sent off to Seeed Studio. It'll look something like this (if I've got the attachments right)

 [ Invalid Attachment ]


Offline jamesots

  • CPC464
  • **
  • Posts: 22
  • Country: gb
  • Liked: 31
Re: Serial / Parallel I/O via Z80 bus adapter
« Reply #13 on: 00:45, 21 April 17 »

The new version of the serial port PCB arrived today. Here it is attached to the back of my PCW:

 [ Invalid Attachment ]


As I suspected, the transmit and receive LEDs aren't much use, but the RTS and CTS LEDs are useful.