StarTech USBMBADAPT.jpg (20.66 KiB) Viewed 14337 times
StarTech GC46MF.jpg (25.48 KiB) Viewed 14337 times
The plan at the moment was to have USB and PS/2 connectors on the PCB (they should fit in the deepest past of the case OK). I realise that this would mean opening the case the plug in the keyboard, but if a jumper (or jumpers) are used, the case would need opened anyway to swap keyboard types.
However, given that it would make connection/disconnection easier, I am happy to go with the USB adapter cable. One of the reasons that I went away from having an adapter cable is that PS/2 adapter cables are like hens teeth these days, but USB adapters like the one you found seem to be much more readily available.
The open collector buffers were specifically recommended by Bill so that the MTX keyboard would work in parallel.
Bill, could you remind me what the reason was please?
Just for confirmation, the current prototype board connects via the 20 pin header, so there's direct access to:
KB9 to KB0
DR0 to DR7
a pulled up connection to Z80 reset
Ground
And that's it
The 5v is picked up from the Port 7 header. There is the posibility of accessing other port 7 signals, or the extra 0v as Dave does. But there's no help from the OS using extra signals. There are other places where 5v is accessible on the board, but none of them are "novice friendly"
Some of us are happy with diving in and modifying the PCB and have the tools to do that. Most owners don't, If Dave's going to make something available to other MTX users, it's got to be minimally invasive or there's no point doing it.
The MTXplus on the other hand anything goes. Since the I/O board's not finalised and there's only 3 system "in the wild" at the moment, that can have a version of the MTX solution whatever that turns out to be, included on the final draft.
As far as PS2 vs USB availability goes, I just did a quick search on Amazon, for PS2 Keyboard under £25 and had a single page with 19 options come up. Swapping PS2 to USB re-running the search, there were 9 pages of results (at 30 per page). So they are available but definitely in the minority.
The one I got for use on the the ReMemotech is a dual function USB keyboard, that uses a passive adaptor to connect to PS2. It was about 50% more expensve than the equivalent USB only option.
For me, the "perfect" option would be to have a dual use header on the interface board, then just run the chosen cable out the gap between the top part of the case and the plastic I/O shield. A small trailing lead, with a USB or PST socket on it, is to me easier to accomodate than drilling the end plate - beacuse of the positioning of the CFX/CFX-II on the external expansion port.
The plan at the moment was to have USB and PS/2 connectors on the PCB (they should fit in the deepest past of the case OK). I realise that this would mean opening the case the plug in the keyboard, but if a jumper (or jumpers) are used, the case would need opened anyway to swap keyboard types.
However, given that it would make connection/disconnection easier, I am happy to go with the USB adapter cable. One of the reasons that I went away from having an adapter cable is that PS/2 adapter cables are like hens teeth these days, but USB adapters like the one you found seem to be much more readily available.
The open collector buffers were specifically recommended by Bill so that the MTX keyboard would work in parallel.
Bill, could you remind me what the reason was please?
regards
Dave
Thanks, Dave. The 74LS06 and 74LS16 are open-collector inverters (last post edited to make that clear) with same pinout as 74LS17. The outputs would be identical but the inputs inverted and the Propeller would be protected as now. On your schematic, the drive signals could be /DR0-7, the sense signals /KB0-9 on J0 and KB0-9 elsewhere.
Forget I ever mentioned connecting OUT 5. All my previous posts that did so have been edited.
The Propeller output cog does a "waitpne" on nine pins, not eight. The ninth pin is toggled by the keyboard decode cog whenever the state of the keyboard matrix changes. This causes the output cog to update the sense lines, even if the drive lines don't change.
Bill.
Thanks for the clarification, Bill. Changing to open-collector inverters would allow more than one cog to output to the sense lines, reducing the workload by half. My feeling is the sense cogs could read key bits from the hub and output them continuously, with no need for an internal inter-cog pin, if the cogs always input from DRx just before the output to KBx, to check there has not been an OUT 5 and DRx and KBx no longer match. There should be plenty of time to do this with two sense cogs and the bonus would be fewer wait states on the MTXPlus+ for faster clocks.
The open collector / open drain buffers were mandated by your requirement of being able to connect the Propeller interface in parallel with the MTX keyboard. Without them you could have the situation of no keys on the add-on keyboard pressed, so the Propeller outputting a logic high on all the sense lines while a pressed key on the MTX keyboard, and an output on an MTX drive line is attempting to pull a sense line low. The buffers form a wired-or, so that either the Propeller or the MTX keyboard can safely pull a sense line low, and the sense line only goes high if nothing is pulling it down.
Tony is correct in that the buffers could be either inverting or non-inverting, it only changes the polarity of the signals the Propeller has to output.
Last edited by Bill B on 16 Feb 2018 23:30, edited 1 time in total.
I did consider whether it would be possible to do something like this.
I hadn't considered using a Propeller (or PIC or other micro-controller) based solution.
I was originally thinking of using a CPLD to hold the mapping from PS/2 protocol to MTX sense grid.
This is essentially the ps2_kbd.vhd and mtx_kbd.vhd VHDL in REMEMOTECH.
This has the advantage of no vulnerability to the quick OUT 5 followed by IN 5/6 problem.
But the logic is too big really for this, you'd need a small FPGA, and all the attendant support logic.
Maybe FPGAs from some of the smaller vendors, with built in configuration EPROM?
The approach like in my Colecovision Keyboard, with an ARM chip to convert PS/2 protocol to a grid on one side and a CPLD to bridge port accesses to it on the other would also fall foul of the quick OUT 5 followed by IN 5/6 problem. A small dual-port RAM between the MTX bus and the ARM would be an option, but I never looked at that.
So I look at this project and cross my fingers you'll be able to respond quickly enough to avoid mis-typing glitches.
Ok there's logic analyser clips all over it, and it's drawing power from the JTAG header on the CFX-II board, but Bill's latest version of the propeller code allows some USB keyboards to work on the MTX.
Looking amazingly similar, the PS2 version of the board can be seen to the right of the CFX-II. There's very little hardware difference between the two. The magic is all in Bill's code.