RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014
RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8147] Sun, 20 December 2020 17:53 Go to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Someone gave me half dozen Z80180 in DIP64 package and a request to build a cheap, RC2014-compatible and hobbyist-friendly SBC (i.e. through-hole, no CPLD). Z80180 is so well integrated I thought that should be a pretty easy project, I mean, what can possibly go wrong?

/forum/index.php?t=getfile&id=1947&private=0

Well, so I screwed up the layout of shrink DIP64 and have to try again to get it right. This is rev1 of RIZ180 (I named it after the person) and homepage is here:
https://www.retrobrewcomputers.org/doku.php?id=builderpages: plasmo:riz180:riz180r1
Bill

/forum/index.php?t=getfile&id=1948&private=0
Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8150 is a reply to message #8147] Tue, 22 December 2020 03:55 Go to previous messageGo to next message
b1ackmai1er is currently offline  b1ackmai1er
Messages: 396
Registered: November 2017
Senior Member
Don't be too harsh on yourself. Often when I insert normal dips into normal dip sockets they do that as well but not as pretty as yours ;)
Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8151 is a reply to message #8150] Tue, 22 December 2020 06:16 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
It was one of those "senior moments". I knew perfectly well the lead spacing is 0.07", had calculated the right pad and drill size, but when I sat down to do the footprint, I layout the spacing at 0.075"! Oh well, it was close enough to checkout the rest of the board.
Bill
Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8198 is a reply to message #8151] Fri, 15 January 2021 10:49 Go to previous messageGo to next message
gkaufman is currently offline  gkaufman
Messages: 186
Registered: October 2015
Senior Member
Collecting up parts, any idea if a HD64B180ROP would substitute (I have one lying around)?

Also, do you know of a source for the 64 pin socket?

Thanks as always for a fun looking design.

- Gary
Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8201 is a reply to message #8198] Fri, 15 January 2021 15:16 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Looking at the datasheet for HD64B180RO, it appears to be compatible with Z80180. The external clock oscillator should be 12.288MHz so phi clock is 6.144MHz resulting in serial baud rate of 38400.

for the shrunk 64 socket, you can search "1.778mm 64 socket" on eBay. I bought from this guy:
https://www.ebay.com/itm/QTY-20-NEW-FOR-1-778mm-pitch-IC-soc ket-DIP64-64P-64pin-chip-base-flat-feet/373263099417

I know, 20 of them for $9, free shipping! They came very well packaged. I don't know how they make any money.
Bill
Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8202 is a reply to message #8201] Fri, 15 January 2021 20:11 Go to previous messageGo to next message
gkaufman is currently offline  gkaufman
Messages: 186
Registered: October 2015
Senior Member
Thanks for the Socket source, It does look like Digikey has a machine pin version (ED90234-ND) but the cost of 1 socket is about the same as 20 shipped.

I'll give the HD68B180ROP a try once the socket arrives.

Thanks again

- Gary
Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8204 is a reply to message #8202] Sat, 16 January 2021 13:13 Go to previous messageGo to next message
norwestrzh is currently offline  norwestrzh
Messages: 196
Registered: November 2015
Senior Member
Take a look at Phoenix Enterprises (peconnectors.com). They have the shrink dip sockets, but I don't know how prices compare.

Roger
Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8205 is a reply to message #8204] Sun, 17 January 2021 23:34 Go to previous messageGo to next message
gkaufman is currently offline  gkaufman
Messages: 186
Registered: October 2015
Senior Member
norwestrzh wrote on Sat, 16 January 2021 13:13
Take a look at Phoenix Enterprises (peconnectors.com). They have the shrink dip sockets, but I don't know how prices compare.

Roger
Roger, thanks. Interesting vendor I was not aware of.

I ordered a single ED90234-ND from Digikey, which I hope is the correct socket so I can get started quickly. I also ordered a lot of 20 from the Ebay vendor that Bill referenced that will arrive much later.

- Gary
Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8206 is a reply to message #8205] Sun, 17 January 2021 23:50 Go to previous messageGo to next message
gkaufman is currently offline  gkaufman
Messages: 186
Registered: October 2015
Senior Member
BTW, although the 12.2727mhz oscillator is tough to source in a DIP14, it is easy to find in SMD types. I ran into a cute adapter which I had fabricated thru OSHPark and seems to work very nicely (at least on a test bed). https://github.com/reinauer/novOSC
Which can also be ordered thru OSH Park at https://oshpark.com/shared_projects/E401Ahjg

Another adapter I ran into was on a Slovak site, translated thru Google: https://translate.google.com/translate?sl=auto&tl=en&u=http ://archeocomp.blogspot.com/

Which can also be ordered thru OSH Park at https:// doaggbjlnoskli5yvf54iepwii--oshpark-com.translate.goog/share d_projects/OWHnkBRv
Just watch that it uses a /2 of the crystal frequency and that "R2" really needs to be 47pf for most uses. It also worked better once I mounted the IC the correct way Shocked

Both boards are very tiny, and very inexpensive thru OSH Park (under $3 for 3 boards).

- Gary

Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8207 is a reply to message #8206] Mon, 18 January 2021 05:36 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
The exact frequency is actually 12.288MHz. I didn't have 12.288MHz oscillator when the picture was taken, but I do have a few 12.2727MHz which is close enough.

Bill
Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8225 is a reply to message #8206] Sun, 24 January 2021 11:06 Go to previous messageGo to next message
gkaufman is currently offline  gkaufman
Messages: 186
Registered: October 2015
Senior Member
The archeocomp adapter worked out nicely, and I did use a 12.288mhz xtal.

Sadly the HD68B180ROP did not power up, not sure why and didn't do any trouble shooting as the Z180 from Ebay worked.

The ED90234-ND socket from Digikey, while rather expensive, worked perfectly - still waiting fro the ones from Ebay.

I was able to boot CP/M but as I don't have handshaking set up couldn't run xmodem. Do you remember where you purchased your CP2102 adapters? I'd like to get the same one if possible.

Thanks!


gkaufman wrote on Sun, 17 January 2021 23:50

Another adapter I ran into was on a Slovak site, translated thru Google: https://translate.google.com/translate?sl=auto&tl=en& ;u=http ://archeocomp.blogspot.com/

Which can also be ordered thru OSH Park at https:// doaggbjlnoskli5yvf54iepwii--oshpark-com.translate.goog/share d_projects/OWHnkBRv
Just watch that it uses a /2 of the crystal frequency and that "R2" really needs to be 47pf for most uses. It also worked better once I mounted the IC the correct way
Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8226 is a reply to message #8225] Sun, 24 January 2021 12:45 Go to previous messageGo to next message
norwestrzh is currently offline  norwestrzh
Messages: 196
Registered: November 2015
Senior Member
I'm taking a careful look at this. Seems that the CPU is an 8 MHz part? No problems running at 12.<something>?? I have several Zilog Z80180's (10 MHz) that I got a while ago, anticipating that they would be a nice step up from the Z80. They disappointed me in that they have less address capability than the PLCC version of the 180, AND the 180 is not really completely code compatible with Z80 (as advertised). Seems the in/out instructions, via (C), don't work the same way as they do on the Z80. I understand the reason for this, but lots of legacy Z80 code uses those instructions. I had a big discussion about this with Bill (wsm) in Canada, who is a big fan of the 180. It seemed to me that you'd have to add a discrete UART to work around the issue, so what's the point of the 180? BUT, maybe I ought to give the 180 another chance? Seems like a nice CPU, and the way Plasmo has done this is a very nice, compact, design! Where did you get your boards made, Plasmo? No problems with clearances around the shrink dip socket??

Roger
Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8227 is a reply to message #8225] Sun, 24 January 2021 13:40 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
gkaufman wrote on Sun, 24 January 2021 12:06


I was able to boot CP/M but as I don't have handshaking set up couldn't run xmodem. Do you remember where you purchased your CP2102 adapters? I'd like to get the same one if possible.

I bought my CP2102 from this guy:
https://www.ebay.com/itm/1-2-5-10PCS-6Pin-USB-2-0-to-TTL-UAR T-Serial-Converter-CP2102STC-Replace-Ft232M95/291907298386

You may have noticed that I have modified the standard CP2102 adapter, removing the 6-pin right angle connector and replace with 6-pin female connector plus a 2-pin female connector to match the footprint of the serial port.

You still can operate XMODEM without handshake, but you need to lower the baud rate to 9600. Somewhere I have a short program that'll do just that. I'll go look for it...
Bill
Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8228 is a reply to message #8226] Sun, 24 January 2021 13:44 Go to previous messageGo to next message
wsm is currently offline  wsm
Messages: 232
Registered: February 2017
Location: AB, Canada
Senior Member
Quote:
... the 180 is not really completely code compatible with Z80 (as advertised). Seems the in/out instructions, via (C), don't work the same way as they do on the Z80.
Lest anyone be confused, let me clarify: "IN r,(C)" works exactly the same way on the Z180 as it does on the Z80 and both processors present 16-bits on the address bus during I/O. Likewise for "IN A,(n)", IND, INDR, INI, INIR, "OUT (C),r", "OUT (n),A", OTDR, OTIR, OUTD and OUTI. The difference is that the Z180 has internal registers that require A15..A8 to be zero whereas many Z80 systems and some legacy software assumes that I/O ports only use 8-bit addressing on A7..A0. The Z180 introduced the "IN0 r,(n)" and "OUT0 (n),r" to aid in addressing internal registers.

Roger:
Although the oscillator is 12.288 MHz it's required to be 2*PHI on the HD64180 and Z80180. i.e. 12.288 MHz crystal or oscillator = 6.144 MHz PHI.

There's really no need for a discrete UART unless you want all the modem signals. While that might solve your addressing issues, most of the legacy CP/M code has source available and it's a simple matter to change the I/O code to be Z180 compatible which should also make it compatible with Z80 systems that use 16-bit I/O addressing.

Give me a PM if you want a Z180 PCB for a PLCC version or an assembled and tested Z8S180 system at 33 or 36.384 MHz.

Bill

As a follow up: I assume that much of the 8-bit only I/O addressing used on many Z80's is a holdover from the 8080 predecessor which only specified an 8-bit I/O address on A7..A0 plus it makes for simpler I/O decoders and software.

[Updated on: Sun, 24 January 2021 16:02]

Report message to a moderator

Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8229 is a reply to message #8227] Sun, 24 January 2021 13:52 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Roger,
The Z180 speed marking is confusing; the external clock is 2 times rated CPU clock, so 8MHz CPU works with 16MHz external clock. But because 16MHz does not divided down to reasonable baud, the clock for 8MHz CPU is quite often 18.432MHz! That's overclocked, but generally work just fine.

Z180 is not fully compatible with Z80, but the I/O block can be relocated to avoid conflicts with existing I/O. It is not a perfect solution so there are lots of dancing around the compatibility issues.

RIZ180 pc board was fabricated by JLCPCB. Design rules are 7 mil trace/spacing/annual ring. It was designed so the autorouter can route a trace between pads, but somehow my autorouter refused to run traces between pads. Stupid machine! Had I known that I'd used bigger pads and larger holes to make assembly easier. In the existing design, the shrink DIP socket need to be soldered down first because the pin alignment need to be perfectly straight, so do that first before rest of components get in the way.
Bill

Edit, I see Bill has already explained the compatibility issues and does a better job than I.

[Updated on: Sun, 24 January 2021 14:51]

Report message to a moderator

Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8230 is a reply to message #8229] Sun, 24 January 2021 14:53 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Gary, Now I remember what I did to do XMODEM without handshake. With 18.432MHz clock, RIZ180 operates at 57600 baud serial port. I have a version of CP/M that operates at 19200. It is loaded into memory, run from 0xF200, and boot into CP/M. At that point change the serial port to 19200 N81, no handshake. File transfer with XMODEM works fine without handshake at 19200. Once the required files are transferred, change baud to 57600, press reset then 'b2' to boot into normal CP/M. Attached is the modified CP/M BDOS/CCP/BIOS, but it assume your clock is 18.432MHz.
Bill
Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8233 is a reply to message #8230] Sun, 24 January 2021 18:38 Go to previous messageGo to next message
gkaufman is currently offline  gkaufman
Messages: 186
Registered: October 2015
Senior Member
Thanks Bill, that worked perfectly Smile
Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8234 is a reply to message #8228] Sun, 24 January 2021 19:11 Go to previous messageGo to next message
norwestrzh is currently offline  norwestrzh
Messages: 196
Registered: November 2015
Senior Member
We've had this discussion before, Bill (wsm not Plasmo). It all boils down to how you define "works exactly", and "code compatible". The attached snippet of code works on every Z80 I've ever encountered. Last time I tried it, it wouldn't work on my breadboard Z180 (PLCC). I've torn it down now, so I can't try it again. Whether you attribute it to sloppy coding or legacy 8080, or whatever -- it doesn't work. If you can get it to work (other than changing the IN/OUTs to IN0/OUT0s) then my apologies.

My interpretation of "code compatible" is that anything written for the Z80 will work on the Z180. If I were writing code, and trying to sell it (thank God I'm not), I'd be very upset to have to track down "glitches" like this and spend man hours modifying legacy code that ought to work on a "code compatible" CPU. Sorry, but that's the way I look at it.

Maybe there was something wrong with the breadboard Z180 that I built that would cause this code to fail?? Always possible.

; command is "I xx [yy]", where xx is hex port #
;                           and yy is hex count (0 if continuous)


        RES     0,(iflag)       ; not continuous 
        LD      A,xx            ; port addr
        LD      C,A             ; put in C
        LD      B,1
        LD      A,nargs         ; # of arguments
        CP      2
        JR      C,loop          ; lt 2? just do 1x
        LD      A,yy            ; # of iterations
        LD      B,A
        OR      A
        JR      NZ,loop         ; B is # of inputs
        SET     0,(iflag)       ; yy is 0, do continuous
loop:   LD      A,C
        CALL    phexsp          ; print port #, space
        IN      A,(C)
        CALL    phex            ; print input data
        CALL    ck4dot          ; stop if '.' pressed
        PUSH    BC
        CALL    crlf            ; print cr/lf
        POP     BC
        BIT     0,(iflag)       ; if continuous, just loop
        JR      NZ,loop
        DJNZ    loop            ; otherwise count

[Updated on: Sun, 24 January 2021 19:19]

Report message to a moderator

Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8235 is a reply to message #8234] Sun, 24 January 2021 23:01 Go to previous messageGo to next message
wsm is currently offline  wsm
Messages: 232
Registered: February 2017
Location: AB, Canada
Senior Member
I'm not going to argue semantics but will point out the following:

The above monitor code also has errors on a Z80 system with a 9 or more bit I/O address decoder built per the Zilog specifications. The Z180 simply enforces the Z80 architecture for it's internal I/O addresses. In other words, that code snippet is hardware dependant and relies upon a common configuration that only has 8-bit I/O address decoding, regardless of Z80 or Z180.

This issue does not affect Z180 external I/O ports with an 8-bit (or less) decoder so long as they don't overlap the 40h address range assigned to internal peripherals. Application program access to Z180 internal peripherals already requires unique code specific to the Z180 and needs to be 16-bit aware.

The Zilog Z80 Product Specification (PS017801-0602) can be somewhat misleading in that Page 26 Figure 7 only shows A0-A7 with the label "VALID PORT ADDRESS" while Page 20 clearly shows the effect on the full 16-bit address bus during I/O instructions. Likewise Page 23 under A0-A15 states "The Address Bus provides the address for memory data bus exchanges (up to 64K bytes) and for I/O device exchanges".
Re: RIZ180, a simple hobbyist-friendly Z80180 SBC for RC2014 [message #8243 is a reply to message #8234] Mon, 25 January 2021 14:33 Go to previous message
lowen is currently offline  lowen
Messages: 226
Registered: August 2016
Location: Western NC USA
Senior Member
norwestrzh wrote on Sun, 24 January 2021 22:11
We've had this discussion before, Bill (wsm not Plasmo). It all boils down to how you define "works exactly", and "code compatible". The attached snippet of code works on every Z80 I've ever encountered. Last time I tried it, it wouldn't work on my breadboard Z180 (PLCC). I've torn it down now, so I can't try it again. Whether you attribute it to sloppy coding or legacy 8080, or whatever -- it doesn't work. If you can get it to work (other than changing the IN/OUTs to IN0/OUT0s) then my apologies.

My interpretation of "code compatible" is that anything written for the Z80 will work on the Z180. ...
The Z80 places the contents of B on the upper 8 bits of the address lines (A8-A15) for an IN or OUT using the C indirect. The Z180 will do exactly the same thing, EXCEPT in the case of B=0. If A8-A15 is 0 (this can also happen with IN, A,(xx) and OUT (xx),A if A=0!) then the Z180 will include the internal peripheral addresses (wherever they're programmed to be) in the port map.

The B-> A8-A15 and C-> A0-A7 is fully documented Z80 behavior. The Z180 just has the internal peripherals respond if A8-A15 is 0. See "Programming the Z80, 3rd Edition" (available online by permission of the author, Rodnay Zaks) pages 260 (PDF page 261) for the IN r,(C) case and 262 (PDF page 263) for the IN A,(xx) case. All the other I/O instructions behave the same way, INI, INIR, IND, INDR, OUTI, OUTD, OTDR, OTIR, all.

In your code it looks like B will never be 0, thus the internal peripherals will never be accessed. If you want to access the internal peripherals, either B needs to be 0 or you need to use IN0 r,(C) instead.

No, it's not 100% compatible; Z180 doesn't do the undocumented opcodes of Z80 either, like the operations that address the lower-order or high-order individual bytes of IX and IY.

NOW, Z280 DOES support that, and further has 24-bit I/O port addressing with the upper 8 bits (A16-A23) being non-zero for internal peripherals, and an IOBASE register to manipulate those bits.

But the Z280 is alone in this regards; ALL of the other members of the Z80 family (Z380, eZ80) operate like Z180.


--
Bughlt: Sckmud
Shut her down Scotty, she's sucking mud again!

[Updated on: Mon, 25 January 2021 14:34]

Report message to a moderator

Previous Topic: ROMWBW v3.0.1 video support MOS8568
Next Topic: CP/M 2 disk problems or something else


Current Time: Mon Mar 24 22:02:44 PDT 2025

Total time taken to generate the page: 0.03826 seconds