Close
0%
0%

Z80 CP/M project

Z80 CP/M with CompactFlash card

Similar projects worth following
To explore CP/M with PCMCIA card, I built Tom Szolyga's existing project.
Corrected serial connectors to match FTDI serial-to-USB cable pinout.
Fixed a design flaw in the USB cable connections.
Now working with 3.684 MHz oscillator and 57600 baud communications.

I noticed that the CP/M projects using CompactFlash generally use an 8-bit interface.

I suspect it is because CompactFlash cards are obliged to support 8-bit operation, while IDE (PATA) drives seldom do these days. Also, IDE cables require decent driver chips, while CompactFlash cards plugged right into a host board do not. This gives designers an easy path for 8-bit micros, but limits them to PCMCIA cards that have been obsoleted by SD cards. Hence they are harder to obtain and more expensive per megabyte.

For new projects, I would advise implementing a full 16-bit interface, even though it is more complex and requires buffers. It will allow you to use PATA-to-SATA adapters and hence use modern SATA drives.

  • Project Log

    Keith04/26/2020 at 03:48 0 comments

    2019-11-10

    Ordered PCB (Z80 Single board runs Grant Searle Linc80 Toms SBC Rev C Cpm 2.2)

    2020-04-21

    Ordered components

    2020-04-23

    Components arrived

    2020-04-25

    Fitted:

    U10 Z80 CPU-P socketed
    U2 628128P socketed
    U3 27C256 socket
    U4 DS1233-5
    U5 74ALS138N
    U6 74AC00
    U7 74ALS259N
    U8,U9 74ALS32N

    2020-05-03

    Fitted:

    Fit 5V inlet and headers for FTDI USB cables.

    2020-05-06

    Two 3.6864 MHz oscillators arrive.
    Now need sockets.

    2020-06-07

    Remove U6, fit socket and oscillator module
    Modify board for 32K EEPROM (cut tracks and rewire)
    Program EEPROM
    Fit socket and SIO-2 
    No sign-on message. Dry joint on U9 VCC fixed.

    2020-06-11

    This board is similar but not identical to the Searle or LiNC designs, so firmware will not run without modification.
    I used diff to compare the Searle and LiNC source code, and was pleased to see the differences were small and understandable. This bodes well for my own alterations.

    2020-06-13

    Contacted PCB vendor and got link to some firmware. It has pre-assembled hex files for the monitor, but it is not clear how to create CP/M boot ROMs. Looks like one starts with the monitor, which then allows it to load CP/M from the CF card.

    Ready-made monitor firmware loaded, fails to run.  Found and fixed dry joint at A8 of CPU. Still not working.
    My board uses DTR instead of RTS as per latest circuit diagram (version C and later). Modified to use RTS.

    2020-06-27

    Contacted vendor, who showed me pics of his non-FTDI interface board connections.
    Saw that the Z80 board designer had got CTS and RTS crossed over!
    Corrected wiring to match FTDI cable pinout, now works at 57600 baud  with the 3.684 MHz oscillator.
    Glad this was someone else's silly mistake, not mine.

    2020-07-01

    Wiring correct for both channels now, but not getting traffic on the second channel.  Changed SIO, second channel still silent. Not very reliable starting up.  Keeps working when started.

    Noticeable electrical tingle is felt when holding 5V power plug and the USB cable. Most people think transformers provide full isolation. For DC, yes, but there is a small but finite capacitance between the coils. Enough to produce that high-voltage low-current tingle.  And enough to damage silicon chips. You can easily verify this with a voltmeter. I have measured up to 80 volts.

    Ideally the two grounds need to connect before any other signals, and well-designed connectors do this. That is what the shield is for. RS232 cable drivers also include protection against static discharges, which as a side effect protects against the brief power-supply ground mismatch.

    The 6-way connectors used by FTDI cables have no such protection. If you are lucky, the ground pin mates first but if not then the ground mismatch voltage goes straight through the unprotected UART chip pins and the FTDI chip's logic-level serial interface pins. Do not plug the 6-pin end of the FTDI cable into a mains-powered device!

    The right way is to mate the board and the cable first, ensuring their will never be a ground mismatch between them. Then plug in the USB end of the cable into the PC, and the power supply into the board. Preferably in that order if you are powering it from a mains PSU. You don't want the powered USB cable trying to drive the non-powered UART pins.

    Other options are from battery or the USB cable itself. I measured the current flowing from the cable through link P4.

    180 mA with NMOS CPU and NMOS SIO
    120 mA with NMOS CPU and CMOS SIO
     87 mA with CMOS CPU and NMOS SIO
     28 mA with CMOS CPU and CMOS SIO

    The CMOS CPU saves more power then a CMOS SIO, and gets current consumption under the 100 mA USB limit. 

    If a CMOS SIO is used, then it is even more important to avoid the mismatched ground problem, as CMOS is much more vulnerable to damage than NMOS.

    The power LED takes a significant amount of current in a CMOS populated board. It might be useful to use very small low-power LEDs, or disable them completely unless...

    Read more »

View project log

Enjoy this project?

Share

Discussions

Peabody1929 wrote 09/18/2022 at 18:35 point

It is possible to replace U6 with a  standard 14 pin oscillator.  Just don't load all the components connected to U6.  This yields a more stable clock.

Tom 

  Are you sure? yes | no

Keith wrote 09/18/2022 at 19:34 point

Yep, I did that. Thanks for using pin 8 as the output.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates