HD64180RCP10X and Z8S18033VSG clock speeds

315 views
Skip to first unread message

Derek Cooper

unread,
May 6, 2024, 10:22:28 AM5/6/24
to RC2014-Z80
Hello,

Just looking for a pointer in the right direction. I have found some HD64180RCP10x chips, these a 10mhz predecessors of the zilog  Z8S18033VSG 33mhz versions of the z180 chips.

Since they can only run at 10mhz max i've got some 9.216mhz crystals tht i intend to try them with. So If i just use a version of RomWBW for the z180 at 18mhz but run it at 9mhz then i should get a serial rate of 57,600 - i think.

I need to know where in RomWBW you change the Clock rate so that I can run the chips at 9mhz and still get the 115200 serial rate?

Anyone know?

Derek

Tadeusz Pycio

unread,
May 6, 2024, 10:52:57 AM5/6/24
to RC2014-Z80
The HD64180 divides the input clock by 2, so you get 4.608MHz. Another thing, the HD64180 came in two versions, the one with the R(ockwell) prefix had a 6800-compatible bus and a Z(ilog) one. You need to keep this in mind if you want to connect any I/O devices specific to these buses.

Bill McMullen

unread,
May 6, 2024, 12:32:05 PM5/6/24
to RC2014-Z80
Just for clarification:
The Zilog Z80180, both PDIP and PLCC, show an E pin as does the Hitachi HD64180.  I haven't used this pin for a long time but are you implying that it doesn't work properly on the Zilog chips?  The Z8L180 & Z8S180 (PDIP, PLCC & QFP) also depict the E pin although I choose not to use it.  Same question: Is there an issue with the E pin on the Z8L180 and/or Z8S180?

Wayne Warthen

unread,
May 6, 2024, 12:47:18 PM5/6/24
to RC2014-Z80
As Tadeusz points out, the HD64180 will always divide the clock by 2.  So, you can use the normal 18.432 MHz clock chip and the CPU will run at 9.216, which should be fine.  RomWBW will detect the chip type and figure out that it is running at an actual CPU speed of 9.216 with no changes to the ROM.  However, when it tries to set the baud rate to 115200, it will fail because the CPU clock speed is too low to generate a baud divisor that will achieve 115200.  So, it will implement a failsafe speed of CPUCLK / 480.  So, in this case it would be 19,200.

Take a look at the file called "Z180 ASCI Baud Rate Options.pdf" in the Doc folder of the distribution for the possible baud rate options for various CPU speeds.  Once you make sure it works at the failsafe speed of 19,200 baud, I can help you adjust it to as much as 57,600.

Thanks,

Wayne

Tadeusz Pycio

unread,
May 6, 2024, 1:10:06 PM5/6/24
to RC2014-Z80
Hi, Bill
It's been a while since I've looked at Hitachi documentation, so you'd have to check the differences between the HD64180Rxxx and HD64180Zxxx versions. Zilog has added an OMCR register to their chips for compatibility with the HD64180.

Bill McMullen

unread,
May 6, 2024, 1:57:59 PM5/6/24
to RC2014-Z80

Tadeusz: Thanks.  I've only been working with the Zilog chips for a LONG time and after a QUICK read, it would appear that there may be a few issues with the HD64180R1 variant whereas the Z variant is the same as Zilog's.  As I remember, the OMCR register is actually for when using Z80 peripherals in a Z180 system.

Derek Cooper

unread,
May 16, 2024, 2:56:31 AM5/16/24
to RC2014-Z80
Hi people,

My HD64180ZCP10X just arrived I put it in an sc130 SBC to give it a try. It seems to work ok, but as mentioned further up it's default baud rate is 19200. So Wayne you mentioned it should be possible to get it up to 57600 ?Can you give me a hint at where to look please in RomWBW ?

Or anyone really that knows where to look.

Thanks

Derek

Wayne Warthen

unread,
May 16, 2024, 3:47:25 PM5/16/24
to RC2014-Z80
OK, so far, so good.  The fact that your system came up at 19,200 baud is actually good because it means that RomWBW did properly detect the older variant of the Z180.  To get 57600 baud, you just need to add the following lines to your config:

ASCI0CFG .EQU SER_57600_8N1 | SER_RTS ; ASCI 0: SERIAL LINE CONFIG
ASCI1CFG .EQU SER_57600_8N1 | SER_RTS ; ASCI 1: SERIAL LINE CONFIG

Since 57600 is a valid baud rate for your system and cpu speed, it should "take".

Thanks,

Wayne

Derek Cooper

unread,
May 17, 2024, 2:16:21 PM5/17/24
to RC2014-Z80
That did the trick thanks, Wayne.

May still have an issue with the SD-Card but investigating it at the moment.

Derek

Derek Cooper

unread,
May 20, 2024, 11:18:45 AM5/20/24
to RC2014-Z80
The sd card, seems to be resolved. My next question is - How would I try overclocking this chip?

I have tried the cpuspd util, it correctly says 18.432mhz clcok and the CPU is running at 9.216, this is inline with the CPU always dividing the clock by 2 . So would I have to increase the CLOCK ? for example 20mhz or 27mhz, but where do you change the divisor for the serial ports?

Derek

Wayne Warthen

unread,
May 20, 2024, 2:10:36 PM5/20/24
to RC2014-Z80
Hi Derek,

Yes, for the HD64180 chips, you will need to physically change the oscillator to change the CPU speed.

Under RomWBW, you do not change the serial port divisor.  Rather, the divisor is calculated by RomWBW.  For this to work, you just need to make sure that the CPU speed is correctly set in your RomWBW config file.

Now, here is the messy part.  For the HD64180 ASCI serial ports, the CPU clock is used to derive the final serial port speed.  The reason you normally see an oscillator of 18.432 MHz used is because it can be easily divided into common baud rates.  A 20 MHz oscillator cannot be nicely divided to create common baud rates.  Please see the Z180 ASCI Baud Rate Options.pdf document in RomWBW.  Note the specific list of possible divisors listed vertically on the left.  For the HD64180, these are the only possible divisors.  RomWBW takes the CPU speed of the system and attempts to pick the correct divisor from the list.  The CPU speeds listed along the top (horizontally) are the ones that work well for common baud rates.

You have a couple ways you can proceed.  One way is to pick the next possible oscillator value from the chart.  So, you could try 24.576 MHz.  This would run the CPU at ~12 MHz.  The possible baud rates do not include 57600, so you would need to use 38400 baud or one of the other possible baud rates from the table.  Alternatively, you could pick any oscillator value you want knowing that RomWBW will not be able to derive a proper divisor and will therefore pick the fallback divisor of 480 arbitrarily.  So, in this case if you used a 20 MHz osc, you would have a 10 MHz CPU speed and the baud rate will be 10,000,000 / 480 which is 20833.  If your serial port can do that baud rate, then it should work.  I would be inclined to use the recommended oscillator value from the chart.  There is a good chance that your CPU will run at ~12 MHz even though rated for 10 MHz.

Thanks,

Wayne

Derek Cooper

unread,
Mar 18, 2026, 11:13:02 AM (2 days ago) Mar 18
to RC2014-Z80

Hello,

Some time ago now I used one of these HD64180RCP10X and you helped me to get it running at 57600. But it just does not seem to do the same with v3.5.1 ?

The chip is clocked at 18.432mhz, this is divided by the chip to 9.216mhz. So in the config file I have set the CPUspeed to 9216000 and that should be devisable by  160 to get 57600
When it boots, it's still at 19200 and the top line of the boot reads:
Small Computer SC130 [SCZ180_sc130_hitachi] Z80180 @ 4.608MHz IO=0xC0

So thinking 4.608 not what I thought I set it to, looks like it divided my setting in half? I assume I must have mis-understood what I did before, Lets try back at 18432000.

But no different? I now get the CPU RomWBW (first line) saying 9.216mhz, but still stuck at 19200:
Small Computer SC130 [SCZ180_sc130_hitachi] Z80180 @ 9.216MHz IO=0xC0

Anyone any idea what I should set what to?

THANKS

DEREK

Derek Cooper

unread,
Mar 18, 2026, 11:19:15 AM (2 days ago) Mar 18
to RC2014-Z80
Further info, if I do:

B>mode                                                                       

   COM0: 115200,N,8,1

   COM1: 115200,N,8,1

B>mode com0:57600,n,8,1

Then it does change the speed to 57600 and works fine. Just can't get it to do that from the build/config file!

Derek



Wayne Warthen

unread,
Mar 18, 2026, 6:48:48 PM (2 days ago) Mar 18
to RC2014-Z80
Hi Derek,

The CPUSPD config variable is intended to mean the speed of the oscillator feeding the chip.  RomWBW will automatically detect that your chip can only to "half" and will take care of that.

I don't know why the baud rate is not taking.  Can you post your config file?

Thanks, Wayne

Derek Cooper

unread,
Mar 19, 2026, 4:49:25 AM (yesterday) Mar 19
to RC2014-Z80
thanks for taking a look. here is the config file:

;
;==================================================================================================
;   ROMWBW DEFAULT BUILD SETTINGS FOR SC130
;==================================================================================================
;
; THIS FILE DEFINES THE DEFAULT CONFIGURATION SETTINGS FOR THE PLATFORM
; INDICATED ABOVE.  THESE SETTINGS DEFINE THE OFFICIAL BUILD FOR THIS
; PLATFORM AS DISTRIBUTED IN ROMWBW RELEASES.
;
; ROMWBW USES CASCADING CONFIGURATION FILES AS INDICATED BELOW:
;
; cfg_MASTER.asm - MASTER: CONFIGURATION FILE DEFINES ALL POSSIBLE ROMWBW SETTINGS
; |
; +-> cfg_<platform>.asm - PLATFORM: DEFAULT SETTINGS FOR SPECIFIC PLATFORM
;     |
;     +-> Config/<plt>_std.asm - BUILD: SETTINGS FOR EACH OFFICIAL DIST BUILD
;         |
;         +-> Config/<plt>_<cust>.asm - USER: CUSTOM USER BUILD SETTINGS
;
; THE TOP (MASTER CONFIGURATION) FILE DEFINES ALL POSSIBLE ROMWBW
; CONFIGURATION SETTINGS. EACH FILE BELOW THE MASTER CONFIGURATION FILE
; INHERITS THE CUMULATIVE SETTINGS OF THE FILES ABOVE IT AND MAY
; OVERRIDE THESE SETTINGS AS DESIRED.
;
; OTHER THAN THE TOP MASTER FILE, EACH FILE MUST "#INCLUDE" ITS PARENT
; FILE (SEE #INCLUDE STATEMENT BELOW).  THE TOP TWO FILES SHOULD NOT BE
; MODIFIED.
;
; TO CUSTOMIZE YOUR BUILD SETTINGS YOU SHOULD MODIFY THIS FILE, THE
; DEFAULT BUILD SETTINGS (Config/<platform>_std.asm) OR PREFERABLY
; CREATE AN OPTIONAL CUSTOM USER SETTINGS FILE THAT INCLUDES THE DEFAULT
; BUILD SETTINGS FILE (SEE EXAMPLE Config/SBC_user.asm).
;
; BY CREATING A CUSTOM USER SETTINGS FILE, YOU ARE LESS LIKELY TO BE
; IMPACTED BY FUTURE CHANGES BECAUSE YOU WILL BE INHERITING MOST
; OF YOUR SETTINGS WHICH WILL BE UPDATED BY AUTHORS AS ROMWBW EVOLVES.
;
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE
; SOURCE DIRECTORY (TWO DIRECTORIES ABOVE THIS ONE).
;
; *** WARNING: ASIDE FROM THE MASTER CONFIGURATION FILE, YOU MUST USE
; ".SET" TO OVERRIDE SETTINGS.  THE ASSEMBLER WILL ERROR IF YOU ATTEMPT
; TO USE ".EQU" BECAUSE IT WON'T LET YOU REDEFINE A SETTING WITH ".EQU".
;
#DEFINE PLATFORM_NAME "Small Computer SC130", " [", CONFIG, "]"
;
#DEFINE AUTO_CMD "" ; AUTO CMD WHEN BOOT_TIMEOUT IS ENABLED
#DEFINE DEFSERCFG SER_115200_8N1 | SER_RTS ; DEFAULT SERIAL CONFIGURATION
;
#INCLUDE "cfg_SCZ180.asm"
;
BOOT_TIMEOUT .SET -1 ; AUTO BOOT TIMEOUT IN SECONDS, -1 TO DISABLE, 0 FOR IMMEDIATE
BOOT_PRETTY .SET FALSE ; BOOT WITH PRETTY PLATFORM NAME
AUTOCON .SET TRUE ; ENABLE CONSOLE TAKEOVER AT LOADER PROMPT
;
CPUOSC .SET 18432000 ; CPU OSC FREQ IN MHZ
;CPUOSC .SET 9216000 ; 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)
;
FPLED_ENABLE .SET TRUE ; FP: ENABLES FRONT PANEL LEDS
FPSW_ENABLE .SET TRUE ; FP: ENABLES FRONT PANEL SWITCHES
LCDENABLE .SET FALSE ; ENABLE LCD DISPLAY
LEDENABLE .SET TRUE ; ENABLE STATUS LED (SINGLE LED)
CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
VDAEMU_SERKBD .SET $FF ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD
;
DSRTCENABLE .SET TRUE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM)
INTRTCENABLE .SET TRUE ; ENABLE PERIODIC INTERRUPT CLOCK DRIVER (INTRTC.ASM)
;
DUARTENABLE .SET FALSE ; DUART: ENABLE 2681/2692 SERIAL DRIVER (DUART.ASM)
UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM)
ASCIENABLE .SET TRUE ; ASCI: ENABLE Z180 ASCI SERIAL DRIVER (ASCI.ASM)
ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM)
SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM)
;
TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM)
TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MSX|MSXKBD|MSXMKY|MBC|COLECO|DUO|NABU]
TMS80COLS .SET FALSE ; TMS: ENABLE 80 COLUMN SCREEN, REQUIRES V9958
VRCENABLE .SET FALSE ; VRC: ENABLE VGARC VIDEO/KBD DRIVER (VRC.ASM)
EFENABLE .SET FALSE ; EF: ENABLE EF9345 VIDEO DRIVER (EF.ASM)
;
FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM)
FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPFDC|MBC]
FD0TYPE .SET FDT_3HD ; FD 0: DRIVE TYPE: FDT_[3DD|3HD|5DD|5HD|8]
FD1TYPE .SET FDT_3HD ; FD 1: DRIVE TYPE: FDT_[3DD|3HD|5DD|5HD|8]
;
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
;
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
;
SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT ONLY
;
CHENABLE .SET TRUE ; CH: ENABLE CH375/376 USB SUPPORT
;
PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM)
;
LPTENABLE .SET FALSE ; LPT: ENABLE CENTRONICS PRINTER DRIVER (LPT.ASM)
;
PPAENABLE .SET FALSE ; PPA: ENABLE IOMEGA ZIP DRIVE (PPA) DISK DRIVER (PPA.ASM)
IMMENABLE .SET FALSE ; IMM: ENABLE IOMEGA ZIP PLUS DRIVE (IMM) DISK DRIVER (IMM.ASM)
SYQENABLE .SET FALSE ; SYQ: ENABLE SYQUEST SPARQ DISK DRIVER (SYQ.ASM)
;
SN76489ENABLE .SET FALSE ; SN: ENABLE SN76489 SOUND DRIVER
;
AY38910ENABLE .SET FALSE ; AY: ENABLE AY-3-8910 / YM2149 SOUND DRIVER
AYMODE .SET AYMODE_RCZ180 ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC|MBC|DUO|NABU]
AY_FORCE .SET FALSE ; AY: BYPASS AUTO-DETECT, FORCED PRESENT

Wayne Warthen

unread,
Mar 19, 2026, 11:32:01 AM (yesterday) Mar 19
to RC2014-Z80
No problem Derek.

Can you clarify the oscillator frequency you are using?  In previous conversations (2024), you indicated it is a 9.216 MHz oscillator.  In a recent post, you said the oscillator is 18.432MHz.  Please make sure that the CPUOSC setting is the speed of your oscillator.  Do not halve the value due to the chip.  RomWBW will automatically detect the chip and account for the chips halving of the value.

The serial port config needs to be set to 57,600 baud.  In the config you provided, you need to change

#DEFINE DEFSERCFG SER_115200_8N1 | SER_RTS ; DEFAULT SERIAL CONFIGURATION

to

#DEFINE DEFSERCFG SER_57600_8N1 | SER_RTS ; DEFAULT SERIAL CONFIGURATION

The above change in combination with ensuring that CPUOSC is set to the oscillator frequency should work.  Let me know.

Thanks, Wayne

Derek Cooper

unread,
Mar 19, 2026, 3:07:09 PM (yesterday) Mar 19
to RC2014-Z80

The Crystal is 18.432mhz, I may still have some of the 9mhz but since the chip always divides by 2 I was sticking to the 18.432 this time, in the past I switched from the 9mhz to the 18mhz and it did auto detect the highest baud rate ok, but not this tine. Anyway I'll try setting the boot console baud rate and give it a go.

Thanks for the help.

Derek

Derek Cooper

unread,
3:14 PM (1 hour ago) 3:14 PM
to RC2014-Z80
Hi,

Just to confirm with the set console speed suggested above it works fine at 57600. But it still does not autodetect above 19200.

Anyway i'm good. Thanks for the help

Derek
Reply all
Reply to author
Forward
0 new messages