Ztoid SBC @25.175MHz eaZily running RomWBW

236 views
Skip to first unread message

PauldB

unread,
Dec 3, 2025, 7:15:14 PMDec 3
to retro-comp
Thought I would show my build of Bill Shen's Ztoid Rev0 SBC(*), a shrunken EaZy80-512 SBC, sitting in it's shelter. The outside edge of the plastic case is just 11.5 x 7 cm, but the board fits nicely with some space to spare. Note that this is a through-hole only design.

The SD card module was modified by replacing the original right-angle header (which was tilted too far down anyway) with a straight 6-pin male header and placed it on the opposite side of the board so it lays right-side up.

I tried running the Ztoid with a 29.5MHz oscillator, but some characters didn't print correctly on the terminal. With a 25MHz oscillator, the board was solid.

(*) https://groups.google.com/g/retro-comp/c/x1MZ_9yerHE/m/i2GulNNiCAAJ
Ztoid_Rev0_v360-d42_boot.jpg
Ztoid_Rev0_in_shelter.jpg

Bill Shen

unread,
Dec 3, 2025, 9:46:09 PMDec 3
to retro-comp
Oh that's very nice!  I like that enclosure; it is plastic and translucent so you can look in.  Plastic is also easy to modify for the reset hole and USB-serial adapter.  Is this a production plastic case?  
I designed for the Altoids tin case only because it is commonly available and there are several retro designs for Altoids.  The tin case is opaque, conductive and hard to machine, so it needs to be opened to operate.  It is a pain; its only positive attribute is "cute".
The hardware should run 29.5MHz, but need faster RAM.  25MHz should work for AS6C4008 RAM.  I like SD card facing up, but that needs rework of the standard SD adapter unless you have a source with SD card connector not soldered?
Great work, any suggestions?  KIO has timers, spare portA that are not used in this design, seems such a waste.  I'm constraint by space, but blinky lights, I2C would be nice to have.
Bill

PauldB

unread,
Dec 4, 2025, 5:01:30 PM (14 days ago) Dec 4
to retro-comp
Hi Bill,
First off, thanks (as always) for making your well-designed creations available. I've probably built a dozen of them by now and (as far as I remember) they all worked the first time (barring 'operator' error =)).

The computer 'shelters' are just cheap food containers turned up-side-down. I usually keep an eye open for the square(ish)-sided types like the ones I got at IKEA. They usually come in a set of a dozen or so in mixed sizes.

The IKEA set, that I bought a few of quite some time back, is called 'PRUTA'. I don't know if they still carry it, but it's easy to check online for the name. Otherwise Lidl (if they have a store in your area) has a very similar set of 12 mixed-sized containers. I just bought a set to have in reserve; put me back about $5!

The PP plastic is easy to work, but I have managed to crack it if you cut the plastic with e.g. a side-cutter. The plastic likes a 'gradual' cut instead of the sudden 'snap' of the side-cutter. Nowadays I use a hole punch like the kind used for adding holes to a belt. Just punch holes around the shape you want then use a knife to even out the edges of the hole. When a hole punch doesn't reach, I use a drill, but the holes aren't as clean as punched ones.

Regarding the SD card modules, I recently got a batch of 10 modules from aliexpress. The shipment came as two panels: 3x2 modules and 2x2 modules still attached to each other. The 6-pin right-angle headers were badly soldered on the boards and tilted quite far over.

I don't like sloppy work, so I got out the hot air solder station and went to work. On half of the modules I corrected the headers; on the the other half I just removed them. On some occasions in the past I had wanted the header on the reverse side, so this was a perfect opportunity to prepare a few.

Yes, blinky lights are missing. I had the same thought. And, as you say, there are plenty of ports free on the KIO. Hmm, off hand, how much drive current can the ports handle?

Paul

PS Attached are images of the IKEA PRUTA label, and one of my SC126 'shelter'.
IKEA_PRUTA_17PCS-SET.jpg
SC126_23x16x8cm_container.jpg

PauldB

unread,
Dec 4, 2025, 6:43:21 PM (13 days ago) Dec 4
to retro-comp
Er, I wrote that there are plenty of ports free... I meant to say that there are plenty of free *pins* on the KIO. 

PortA has all 8 pins free, portB has 4 pins free. Then there are other free signal pins. Have to see if I can come up with something ;)
Paul

Bill Shen

unread,
Dec 5, 2025, 11:14:41 AM (13 days ago) Dec 5
to retro-comp
25Mhz is fast enough to bit-bang WS2812 RGB LED.  The gap between RAM and KIO may be enough for a leaded WS2812.   I2C interface is also possible.  If the oscillator is always 1/2 size, then the room can accommodate a 4-pin header (VCC, GND, SCL, SDA).  There are enough pins for RTC, but RTC needs quite a bit of space.  Just thinking out loud…

PauldB

unread,
Dec 5, 2025, 1:04:32 PM (13 days ago) Dec 5
to retro-comp
Perhaps it would be easiest to sacrifice the second console. Cut three tracks and you have 5 pin sockets free plus ground?

PauldB

unread,
Dec 6, 2025, 12:52:56 PM (12 days ago) Dec 6
to retro-comp
Bill, I've been playing around moving components on the Ztoid PCB. I'll attach an image of the modified PCB. Don't take it too seriously, I just wanted to see what might be possible. Capacitors C2 and C4 can be placed on the bottom; perhaps axial caps could be used. C5 can be placed under U2 if U7 is moved a bit to the right.

As you will notice, I've added a number of female headers. Again, just drawing out load ;)

I have a 6-pin I2C RTC DS3231M module. This is much better than the DS1302 RTC (I'll attach the data sheet). This module will
fit in the 2nd console's 6-pin header and lay over the KIO with the battery-holder side up (image attached). 

These are just some things I quickly put together to offer some ideas. An extra header for I2C would be nice for e.g. blinky lights, etc.
Paul
DS3231M.PDF
Ztoid_possible_mods.jpg
RTC_module_detail.jpg
RTC_module_on_Ztoid.jpg

PauldB

unread,
Dec 6, 2025, 5:47:28 PM (12 days ago) Dec 6
to retro-comp
I've reworked the board layout, just making room for an SD card module and a header for I2C.
Ztoid_possible_mods_take2.jpg

Bill Shen

unread,
Dec 6, 2025, 9:49:12 PM (11 days ago) Dec 6
to retro-comp
I’ll need to re-layout the board because the larger radius for the 4 corners will take away board space.  Most likely I’ll need to move Z80 toward the center and some components at the corners toward the center.  I can gain a bit of space using 0.1” center bypass caps.  The 2nd serial port only needs 4 pins so it can be smaller.


It may be a good idea to prototype the I2C and RTC to make sure they have the right pin assignments.

Bill

PauldB

unread,
Dec 7, 2025, 4:16:42 AM (11 days ago) Dec 7
to retro-comp
Bill, good idea about the 2nd serial port needing only four pins. The 2.5 pitch caps should save some space, or some cheap axial bypass caps can join the resistors already mounted on the bottom. On my board, I've mounted all the resistors there. Just need to remember to mount them first!

Can either the 1Hz or the 32kHz square wave from the RTC be used as a system timer? I think I read in the data sheet that both signals are present even while the RTC is on battery power.

That little board is getting packed! It's a challenge. Do you think you can pull it off? ;-)
Paul

PauldB

unread,
Dec 7, 2025, 5:36:13 AM (11 days ago) Dec 7
to retro-comp
Oh yes, I was going to ask you, if you're going to modify the Ztoid schematic anyway, can you check the values of R10 and R14?
You've got 1K and 2K4 for them respectively. I just used 4K7 for both of them. Also, if an electrolytic cap is used for C6, it would be good to mark its polarity on the board.
Thanks,
Paul

Bill Shen

unread,
Dec 7, 2025, 11:33:45 PM (10 days ago) Dec 7
to retro-comp

I have doubts whether PIO can emulate open-collector characteristics of I2C protocol as well as the bidirectional data pin of RTC without external tri-state buffers.  I’ve convinced myself that can be done in software, so I’m building a prototype to check out I2C and RTC.

1K for R10 is a mistake, 4.7K is OK.  R14 is pull-down, so it should be lower value like 2.4K for better noise margin.  4.7k works because the components are all CMOS.  

Bill

Alan Cox

unread,
Dec 8, 2025, 5:04:17 AM (10 days ago) Dec 8
to Bill Shen, retro-comp
A diode is the way I have always seen it done, and if need be a pull up depending who owns that part of the circuit.

In practice IMHO though for most use cases you need buffers to protect it and get enough drive once you start putting i2c toys on lengths of cable. Can still be unidirectional buffers as you can take the clock and data to two input and two output pins to avoid the direction switching.

Alan

--
You received this message because you are subscribed to the Google Groups "retro-comp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to retro-comp+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/retro-comp/9b439594-94c9-4c31-a312-3dace8eec1cfn%40googlegroups.com.

Bill Shen

unread,
Dec 8, 2025, 10:36:30 AM (10 days ago) Dec 8
to retro-comp
As I2C master I can always drive the SCL line, but I do need open collector function to read SDA as input.  Diode, resistor, dedicated output and input are the normal way, but that needs more components than I have space, so I’m trying switching output to input and back in software without contention.  I think I am successful with I2C interface.
Next is the RTC interface which I prefer to be compatible with RomWBW drivers, but most (all?) RomWBW drivers have dedicated input and output for interface to RTC data bit.  I may have to write a custom RTC driver.
Sigh, this Eazy80 design has created so many custom drivers; it is easy hardware wise, but a real pain for software.
Bill
IMG_5819.jpeg

Bill Shen

unread,
Dec 8, 2025, 11:05:58 AM (10 days ago) Dec 8
to retro-comp
The picture is a bit cryptic so let me explain:
The board is Eazy80-512 which electrically is the same as Ztoid except it has prototype area for experimentations.  The OLED display uses I2C interface where I2C’s SCK is kludged to KIO portA0 and SDA to portA1 with 2.4K pull up resistor.  I’m able to run a test program to display ASCII table on the OLED display over the I2C lines.  PortA1 is output or input under software control.
The connector to the right of I2C is for DS1302-based RTC module.  PortA7 is kludged to DS1302’s DAT, portA6 to CLK, and portA4 to EN.  I think I’ll need to write a custom drivers so RomWBW can recognize the RTC.
Bill

PauldB

unread,
Dec 8, 2025, 1:06:37 PM (10 days ago) Dec 8
to retro-comp
Bill, just a thought: there is still space under the RAM or CPU for, as Alan suggested, a unidirectional buffer (instead of e.g. discreet components) ?

Paul

Mark T

unread,
Dec 8, 2025, 3:16:48 PM (10 days ago) Dec 8
to retro-comp

Ram on the opposite side of the board and overlapping the z80 footprint might also save quite a bit of space. Some pins might even line up correctly if you don’t care about address line swapping on ram.

Bill Shen

unread,
Dec 8, 2025, 9:26:54 PM (9 days ago) Dec 8
to retro-comp
I don't think buffer is really necessary since the I2C and RTC connectors are for local resources.  I2C may be cabled to drive multiple devices, but the data rate is pretty low ~400Kbit/sec and KIO has decent CMOS drivers for port A/B/C so half dozen I2C devices should not be a problem.  As a reference, Z80 in RC2014 is not buffered and it can successfully drive at 7.37MHz a dozen or more boards spread over several backplanes.

There may be advantages mounting components in the soldered side because the plastic body act as standoff insulation from the tin can.  On the other hand, Altoids can is not very tall and I'm adding RTC, SD, I2C modules on top of the board, so vertical dimension is rather limited.
Bill

T Gerbic

unread,
Dec 8, 2025, 9:29:33 PM (9 days ago) Dec 8
to retro-comp
Z80s also come in J-leg packages that are probably 25% the size of a DIP-40. I have also seen the Z80 in a PLCC format with the leads sticking down like a DIP but I am not sure what the package type is. I have about a dozen of these on daughter boards.  It is about 33% the size of a DIP-40. The PLCC-44 type can also be soldered directly to the PCB without a socket like SMB.  So quite a bit of PCB space could be saved with different Z80 packaging. 
Reply all
Reply to author
Forward
0 new messages