RC2014 with Z180 or SC126 with 9.216 MHz oscillator

389 views
Skip to first unread message

Jan Vacek

unread,
Apr 5, 2021, 6:46:36 AM4/5/21
to RC2014-Z80
Hello to everybody,
I would like to build an RC2014 (probably SC126) with a Z180 CPU, but I have a problem that I can't buy a 33MHz variant.
I have a 10MHZ version and maybe I'll get 20MHZ.
Please can I use Z180 20MHz? The oscillator is 18,432 MHz so it should go, right?
Or
Can I use  Z180 10MHz and 9.216 MHz  oscillator and SIO / UART etc. to run at 56Kbit?
Thanks a lot
Honza

Jeff Greer

unread,
Apr 5, 2021, 7:05:57 AM4/5/21
to rc201...@googlegroups.com
I have several versions of the RC2014. IMHO, the SC126 is the best value. It includes many options such as a battery backed RTC and the onboard option to boot into a monitor or CP/M. I have the SC126 connected and running daily. The kit comes with the oscillator crystal. The kit is much cheaper than sourcing the parts individually. I built a couple of RCA 1802 Cosmac Elf kits from bare boards. It is very expensive to buy the parts individually. The SC126 kit on Tindie is very inexpensive. Once built you could then experiment with alternative setups.

--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/54c5760c-db7b-4f29-9749-5402790edaf2n%40googlegroups.com.

karlab

unread,
Apr 5, 2021, 7:07:26 AM4/5/21
to RC2014-Z80
Hi
The 33Mhz variant of the Z180 is available from several sources like mouser.com.
The reason for most Z180 systems clocked at 18.432 mhz are the serial port communication, hitting the 115200 baud rate (18.432mhz/160).
I have used 33mhz on my systems without any issues, but with an external serial module for serial communication at 115200 baud rate.
Bill Shen has used a 36,864mhz clock in his systems, so the serial speed is twice as fast. I might try that because most 33mhz specked Z180 can be overclocked easily.
Karl

Bill Shen

unread,
Apr 5, 2021, 8:08:08 PM4/5/21
to RC2014-Z80
Karl,
I don't have a Z180 design operating at 36.864MHz but I do have RIZ180 operating at 18.432MHz.  You must be thinking of Bill McMullen who has an excellent Z180 design, MinZ, running at 36.864MHz.
  Bill

Phillip Stevens

unread,
Apr 5, 2021, 8:17:10 PM4/5/21
to rc201...@googlegroups.com
Bill wrote:
Karl,
I don't have a Z180 design operating at 36.864MHz but I do have RIZ180 operating at 18.432MHz.  You must be thinking of Bill McMullen who has an excellent Z180 design, MinZ, running at 36.864MHz.
  Bill

karlab wrote:
Bill Shen has used a 36,864mhz clock in his systems, so the serial speed is twice as fast. I might try that because most 33mhz specked Z180 can be overclocked easily.

As another example, the YAZ180 also runs at 36.864MHz. With one memory wait state and 82C55 I/O, I’m using one additional I/O wait state.
--
Sent from a Mobile Device. Replies may appear terse.

Jan Vacek

unread,
Apr 6, 2021, 2:06:50 AM4/6/21
to RC2014-Z80
Hi,
thank you very much for the information. Yes, the price for the SC126 kit on Tindie is very good :-). But I don't know how it is with transport to the Czech Republic. I have to look.
But anyway I ask again, Is it possible SC126 or SC130 at speeds less than 10MHz? Of course I count on a slower UART interface. 
Are there any other time routines?
I grew up on CP / M with SHARP MZ800 with a speed of 3.5MHZ and was happy :-).
Thank you
Honza

Dne úterý 6. dubna 2021 v 2:17:10 UTC+2 uživatel Phillip Stevens napsal:

Wesley Isacks

unread,
Apr 6, 2021, 2:43:07 AM4/6/21
to RC2014-Z80
By my understanding of the RomWBW build process, it'll figure out the corrected UART dividers if you tell it the frequency of your Z180. For one, if I set the divider on my SC126 to divide-by-two, it comes up at 9.216MHz with the UART still at 115200, and I can then still set it to any rate I want. In any case, use any frequency you want, it should be fine.
I would expect all of these to work:
10MHz Z180, 9.216MHz oscillator, no divide
20MHz Z180, 18.432MHz oscillator, no divide
10MHz Z180, 18.432MHz oscillator, divide-by-two
Oh, and creating custom configs and builds with RomWBW is really easy.
-Wesley

Jan Vacek

unread,
Apr 6, 2021, 3:04:07 AM4/6/21
to RC2014-Z80
Hi,
yes i can see it now, you are right.
It is a file SCZ180_126.asm

#DEFINE PLATFORM_NAME "SC126"
#include "cfg_scz180.asm"
CPUOSC .SET 18432000; CPU OSC FREQ IN MHZ
Z180_CLKDIV .SET 1; Z180: CHK DIV: 0 = OSC / 2, 1 = OSC, 2 = OSC * 2
Z180_MEMWAIT .SET 0; Z180: MEMORY WAIT STATES (0-3)
Z180_IOWAIT .SET 1; Z180: I / O WAIT STATES TO ADD ABOVE 1 W / S BUILT-IN (0-3)

Thanks for the idea
Honza

Dne úterý 6. dubna 2021 v 8:43:07 UTC+2 uživatel Wesley Isacks napsal:

Wayne Warthen

unread,
Apr 6, 2021, 1:34:05 PM4/6/21
to RC2014-Z80
On Monday, April 5, 2021 at 11:43:07 PM UTC-7 Wesley Isacks wrote:
By my understanding of the RomWBW build process, it'll figure out the corrected UART dividers if you tell it the frequency of your Z180. For one, if I set the divider on my SC126 to divide-by-two, it comes up at 9.216MHz with the UART still at 115200, and I can then still set it to any rate I want. In any case, use any frequency you want, it should be fine.
I would expect all of these to work:
10MHz Z180, 9.216MHz oscillator, no divide
20MHz Z180, 18.432MHz oscillator, no divide
10MHz Z180, 18.432MHz oscillator, divide-by-two
Oh, and creating custom configs and builds with RomWBW is really easy.

Nice to see you figured this out Wesley.  You are absolutely right that RomWBW tries very hard to adjust for different CPU speeds, but there is an unfortunate "gothca".  The Z180 has a limited set of baud rate divisors.  When the CPU is running at 9.216 MHz, there is no divisor possible that will result in 115200 baud.  Anytime RomWBW determines there is no possible divisor for the requested baud rate, it utilizes a failsafe divisor which is fixed at 480 for the ASCI driver.  So, if the CPU is running at 9.216 MHz, the failsafe baudrate will turn out to be 19200 baud (9216000 / 480).

Alternatively, you could just set a more preferable baudrate in the config file for the ASCI ports (it has to be a baudrate that is possible for the net CPU speed of course).  For example, 57,600 baud would work fine at 9.216 MHz.  The config file entries would be:

ASCI0CFG .SET SER_57600_8N1 ; ASCI 0: SERIAL LINE CONFIG
ASCI1CFG .SET SER_57600_8N1 ; ASCI 1: SERIAL LINE CONFIG

If you look in the Doc directory of the RomWBW distribution, you will see a file called "Z180 ASCI Baud Rate Options.pdf".  This is a nice table of the possible baud rates for any likely CPU speed.  If you look at the column for 9.216 MHz, you will see all possible baud rates.

Thanks,

Wayne

karlab

unread,
Apr 6, 2021, 2:02:36 PM4/6/21
to RC2014-Z80
Hi Bill 
It must be my covid brain mixing up things, and I also forgot Phillip's brilliant YAZ180 sbc.
But didn't you overclock something, was it the z80?

@jan 
Your serial communication problems could be attributed to using the older z80180 chip which may not perform as well as the newer z8s180.

Karl

Bill Shen

unread,
Apr 6, 2021, 9:01:37 PM4/6/21
to RC2014-Z80
On Tuesday, April 6, 2021 at 12:02:36 PM UTC-6 karlab wrote:

But didn't you overclock something, was it the z80?

Yep, that's me.  Guilty as charged  :-)

20MHz CMOS Z80 can be reliably overclocked to 29.5MHz.  Even more amazing is the CMOS W65C02 with nominal max frequency of 14MHz can be overclocked to 29.5MHz!
  Bill
Reply all
Reply to author
Forward
0 new messages