
I've completed building two Ktoid SBCs. Both booted up directly after applying power. The first one has vertical serial headers so it fits an Altoids tin. I used right-angle serial headers on the second Ktoid instead. Also, on the second one, I replaced the voltage supervisor with a standard resistor & capacitor reset circuit (more details on that in a later post).
Just to add to Bill's description, Ktoid is his K80W computer crammed into a size that fits an Altoids tin. And it is hardware and software compatible with the K80W, excluding the CF-card interface, so no new RomWBW version is necessary.
In spite of its small size, Ztoid runs an overclocked Z80 at 22MHz, has 512KB RAM, 512KB EPROM, 2 serial ports (with RTS/CTS handshaking), SD-card storage, an I2C interface, a Real Time Clock, a voltage supervisor and can run RomWBW. Another nice feature is being able to change the Z80 CPU oscillator frequency without affecting the serial baud rate (I'm running one of the Ztoids at 25.175 MHz).
Bill has conveniently marked unused KIO port pins on the PCB with test points should one want to experiment with expansion. E.g. Parallel port PA0-PA7 pins are unused.
Building the board is fairly straight-forward, keeping in mind to place the components on the right side of the board; some of the resistors need to be put on the solder-side. When mounting the PLCC sockets, they should all be plugged into the board before soldering as they are a tight fit.
Two chips need to be programmed. Ztoid uses the same binary files as the K80W Rev1 (and Rev2.1) boards:
* The CPLD (an EPM7032S BTW) is flashed with the 'top.pof' file contained in the K80W Rev1 'k80w_r1pcb_cpld_epm7032s.zip'.
* The EPROM is flashed with the RomWBW binary 'RCZ80_k80w.rom'
Both boards pass the zexall and pip with verify tests. Serial transfer by xm at 115200 baud works nicely, thanks to serial ports with handshaking.
Onto the SD-card and RTC modules
After carefully straightening the SD-card module's pins so that they were at a right-angle with the PCB, it plugged right in to Ztoid's SD-card header. I flashed a 32GB SD-card with RomWBW's 'hd1k_combo.img' file and inserted it into the module. Hardware discovery found it at next boot.
The DS1302 RTC module was more of a problem. If you look at the module from the side you'll see that the male pin header extends from the board to the same height as the battery holder, making it impossible to plug the module into the Ztoid's RTC header.
I found two possible solutions: (1) improvise a short pin extension out of a stacker header or (2) unsolder the module pin header and re-use the holes to solder a new pin header on the reverse side of the board. This was more difficult, but the module then fits well up-side-down, laying over the KIO chip.
Then came a recurring problem with the DS1302 RTC - keeping time. The RTC crystal oscillator's pins are very sensitive to nearby signals and effectively act as an antenna (Ref 'Dallas Application Note 58'). If they are of a higher frequency, they will most likely cause the RTC to run fast.
RomWBW makes this fairly easy to troubleshoot since, upon booting, the second line of the boot message shows a good approximation of the Z80 oscillator frequency. This can also be used in reverse to show if the RTC is running slow or fast (within reason).
In this case, I had previously tried a third solution to mounting the RTC module by lengthening the pins just enough to make the module lay flat on Ktoid (with the IC and battery holder downward). Booting afterwards showed 'Z80 @ 18.468MHz'! And this was with a 22MHz CPU oscillator.
First I thought I had somehow broken the RTC crystal, but then I noticed that when I lifted the module slightly and rebooted, the Z80 speed message showed the Z80 running faster. On a closer look, I saw that the crystal's legs (and PCB traces to the crystal) were laying directly over the inside edge of the Z80 PLCC socket (where the contacts are).
Mounting the module with the pin extension (solution #1) raised it enough to bring the Z80 speed much closer to 22MHz. But that brought the whole module up into a wobbly position.
I settled for solution #2: moving the module pin header to the reverse side of the board where it lays flat over the KIO chip (even there I could still get a slightly better CPU speed reading by sticking a small silicone bumper on the KIO to raise the module a bit from the chip). With the it placed there, I got a value of 'Z80 @ 21.968MHz'. Good enough. Conclusion: There are much better RTC chips than the DS1302.
I should add that the RTC module is really optional for normal use of the retrocomputer. IIRC, It is only used by some later CP/M derivative for time/date stamping.
All in all, I think Bill has done a great job making this tiny through-hole computer. Many thanks to him,
Paul