MicroZ, another Z80 SBC for Arduino Mega enclosure

82 views
Skip to first unread message

Bill Shen

unread,
Nov 9, 2019, 10:46:55 PM11/9/19
to retro-comp
I don't recall where I've mentioned MicroZ but here is an updated.  MicroZ is based on Z84C15 which has integrated PIO, SIO, CTC and programmable chip selects.  A full-feature CP/M-ready SBC can be build with ROM/RAM/disk and a couple TTL logic.  It is small enough to fit in an Arduino Mega enclosure.  The first version was designed with AT49F040 flash and whatever SMT RAM I had laying around.  Z84C1516 is rated at 16MHz; at that frequency it does not need particularly fast flash or RAM.  The first version had a couple layout bugs but with bugs fixed, it ran fine at 14.7MHz.  Later on I realized Z84C1516, like so many Zilog products of the day, can be overclocked recklessly.  So it may actually be possible to double the clock frequency of Z84C1516 to 32MHz, assuming I have independent serial clock, fast disk, fast decode, and fast memories.  Winbond 27C512 is 45 nS PROM, but the pinout is not compatible with AT49F040, so I redesigned MicroZ to fix the layout mistakes and use Winbond27C512, separate serial clock, 74ACT logic and disk-on-module mass storage.

Received the pc board this week but I forgot to order faster (45ns) AS6C1008, but knowing RAM makers are pretty conservative, I went ahead and build up the board with the 85nS RAM and 45nS 27C512.  It worked fine at 29.5MHz!  Passed memory diagnostic, loaded up CP/M and ran zexdoc.com in 26.5 minutes without errors; at 32MHz, it passed memory test, but there were two errors with zexdoc.com; at 33MHz it failed memory diagnostic so there is pretty good chance it can go even furthur with 45nS AS6C1008.

Power consumption at 29.5MHz is 120mA@5V.

If the CPU clock can be reliably pushed to 30MHz and beyond, it may not make sense to have RC2014 bus out on the connector.  It is too fast for unbuffered processor bus.  Instead I can bring  the PIO/CTC/SIO signals out, very similar to the idea of Arduino Shield.

  Bill

b>zexdoc (at 32MHz)
Z80 instruction exerciser
<adc,sbc> hl,<bc,de,hl,sp>....  OK
add hl
,<bc,de,hl,sp>..........  OK
add ix
,<bc,de,ix,sp>..........  OK
add iy
,<bc,de,iy,sp>..........  OK
aluop a
,nn....................  OK
aluop a
,<b,c,d,e,h,l,(hl),a>..  ERROR **** crc expected:fe43b016 found:6f30dcf7
aluop a
,<ixh,ixl,iyh,iyl>.....  ERROR **** crc expected:a4026d5a found:f454ff08
aluop a
,(<ix,iy>+1)...........  OK
bit n
,(<ix,iy>+1).............  OK
bit n
,<b,c,d,e,h,l,(hl),a>....  OK
cpd
<r>........................  OK
cpi
<r>........................  OK
<daa,cpl,scf,ccf>.............  OK
<inc,dec> a...................  OK
<inc,dec> b...................  OK
<inc,dec> bc..................  OK
<inc,dec> c...................  OK
<inc,dec> d...................  OK
<inc,dec> de..................  OK
<inc,dec> e...................  OK
<inc,dec> h...................  OK
<inc,dec> hl..................  OK
<inc,dec> ix..................  OK
<inc,dec> iy..................  OK
<inc,dec> l...................  OK
<inc,dec> (hl)................  OK
<inc,dec> sp..................  OK
<inc,dec> (<ix,iy>+1).........  OK
<inc,dec> ixh.................  OK
<inc,dec> ixl.................  OK
<inc,dec> iyh.................  OK
<inc,dec> iyl.................  OK
ld
<bc,de>,(nnnn).............  OK
ld hl
,(nnnn)..................  OK
ld sp
,(nnnn)..................  OK
ld
<ix,iy>,(nnnn).............  OK
ld
(nnnn),<bc,de>.............  OK
ld
(nnnn),hl..................  OK
ld
(nnnn),sp..................  OK
ld
(nnnn),<ix,iy>.............  OK
ld
<bc,de,hl,sp>,nnnn.........  OK
ld
<ix,iy>,nnnn...............  OK
ld a
,<(bc),(de)>..............  OK
ld
<b,c,d,e,h,l,(hl),a>,nn....  OK
ld
(<ix,iy>+1),nn.............  OK
ld
<b,c,d,e>,(<ix,iy>+1)......  OK
ld
<h,l>,(<ix,iy>+1)..........  OK
ld a
,(<ix,iy>+1)..............  OK
ld
<ixh,ixl,iyh,iyl>,nn.......  OK
ld
<bcdehla>,<bcdehla>........  OK
ld
<bcdexya>,<bcdexya>........  OK
ld a
,(nnnn) / ld (nnnn),a.....  OK
ldd
<r> (1)....................  OK
ldd
<r> (2)....................  OK
ldi
<r> (1)....................  OK
ldi
<r> (2)....................  OK
neg
...........................  OK
<rrd,rld>.....................  OK
<rlca,rrca,rla,rra>...........  OK
shf
/rot (<ix,iy>+1)...........  OK
shf
/rot <b,c,d,e,h,l,(hl),a>..  OK
<set,res> n,<bcdehl(hl)a>.....  OK
<set,res> n,(<ix,iy>+1).......  OK
ld
(<ix,iy>+1),<b,c,d,e>......  OK
ld
(<ix,iy>+1),<h,l>..........  OK
ld
(<ix,iy>+1),a..............  OK
ld
(<bc,de>),a................  OK
Tests complete



DSC_50971109.jpg
MicroZr1_scm.pdf

Bill Shen

unread,
Nov 10, 2019, 7:39:58 AM11/10/19
to retro-comp
Annotated picture of MicroZ
  Bill
microZ_annotated copy.jpg

Alan Cox

unread,
Nov 10, 2019, 10:14:35 AM11/10/19
to retro-comp

If the CPU clock can be reliably pushed to 30MHz and beyond, it may not make sense to have RC2014 bus out on the connector.  It is too fast for unbuffered processor bus.  Instead I can bring  the PIO/CTC/SIO signals out, very similar to the idea of Arduino Shield.

You can possibly copy the Arduino shield interface too. The pin arrangement includes RX/TX for an SIO channel to talk to SIO devices, gpio pins that match up to the PIO, plus two spare which with buffers gives you the i2c bit bang. The CTC I suppose could be jumpered as a choice onto 4 of the GPIO pins that can be used for PWM. My Gluino board has an actual I2C chip and no CTC so I did the i2c to the i2c chip and don't have any provision for PWM beyond bitbanging.

Nice thing about that is you can then just plug Arduino SD card, RTC, Ethernet etc shields onto it. Providing you line up the GPIO pin used for the MISO line with bit 7 or bit 0 of a PIO port you can do SPI quite fast too -  18Kbytes/sec at 7.3Mhz so presumably about 80Kbytes/second on your board.


There are diagrams of the mechanical layout around. The only weirdness is that one of the connectors is not on the same 0.1" grid as the others - an accident that wasn't caught in the original Arduino board and now lives on by necessity!

Alan

Bill Shen

unread,
Nov 10, 2019, 11:19:03 PM11/10/19
to retro-comp
Yes, I struggled with Arduino mounting holes and connector locations.  It took me several tries to get it right.  The link you provided was for ATMega328, mine is for ATMega2560 but there are many documents available online.

It'll be cool to have a Z80 running CP/M but also able to interface to selected Arduino shield boards.  That'll probably takes a lot of testings, so I better start now!
  Bill
Reply all
Reply to author
Forward
0 new messages