avatar_JonB

Serial / Parallel I/O via Z80 bus adapter

Started by JonB, 22:19, 22 February 17

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JonB

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.

[attach=2]

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

greatwolf1283

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.

JonB

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:


[attach=2]


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..

greatwolf1283

Quote from: JonBThat'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.

Bryce

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.

JonB

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

greatwolf1283

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, 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.

JonB

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?

greatwolf1283

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!)

JonB

@greatwolf1283 - links to files sent via PM.


Meanwhile, new board layout:


[attach=2]

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!

1024MAK

Looking forward to summer in Somerset :-)

JonB

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 :)

jamesots

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.

[attach=2]

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)

[attach=3]


jamesots


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

[attach=2]


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

schlika

Quote from: jamesots on 22:45, 20 April 17
The new version of the serial port PCB arrived today. Here it is attached to the back of my PCW:




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


Hi ! I was looking for the exact same thing ! Looks fine. Would you be kind enough to share your gerber files & BOM ? I'd like to build one.


Thanks a lot !!

yottatsa

@jamesots @JonB could you please share PCB files? I wanted to build it from the scan, then I found that you've both done this work already!

jamesots

Ok, I've dug out my KiCad project and re-exported the Gerbers. I haven't done this for a few years, so I'm not totally sure it's correct, but it looks about right in a Gerber viewer. Obviously, it'll only work if your parts are the same as the ones I used, and I can't find details of which parts I used right now.


I've also just make a public github repo with the source, though I'm not totally sure it'll load on anyone else's computer because of the way KiCad handle libraries: https://github.com/jamesots/pcw_serial_board


pelrun

The Kicad project works fine here. Kicad up to v5 copies library parts into the project-cache.lib library, so when the library goes missing all that happens is it complains a bit and gives you the option of automatically generating a *-rescue.lib with the parts. After that everything is fine (although it looks like one of the IC's in the schematic got bumped a bit and isn't lining up with the wires.)


In Kicad 6 parts will always be copied directly into the schematic file, libraries are only used as a source or when an update is requested.

JonB

Yes. It's a copy of the Amstrad CPS8256 serial / parallel box designed to connect to the Z80 bus (see my uIDE project for details) and uses a MAX222 for RS232 to TTL level line voltage changes.

Untested so you are probably better off with James's board, unless you need the parallel port as well, or you have a uIDE and want to connect it to the Z80 bus.

yottatsa

#19
Thanks, both of them are working great! Gotta make it working with MAX203 since I have a bunch of them stocked already.


PS: 74LS74 instead of 8253 is smart!

JonB

Sorry @yottatsa are you referring to my files or James's?

JonB

#21
Z80 shim schematic for @cpcoldie ..

[attach=1,msg208141]

cpcoldie

Yeah,
looking more precise on the shim silk art unveil the pinout.  ;D :doh:
CPC6128, PCW, PPC512, ...

Powered by SMFPacks Menu Editor Mod