Zilog Z80 End Of Life Notification

By The original uploader was Damicatz at English Wikipedia. - Transferred from en.wikipedia to Commons., CC BY 2.5, https://commons.wikimedia.org/w/index.php?curid=1830432
Z80 CPU 1976 – 2024

For those of you that haven’t heard, on 15th April 2024, Littlefuse, the parent company to Zilog, announced the End Of Life of the Z80 and associated peripherals https://www.mouser.com/PCN/Littelfuse_PCN_Z84C00.pdf and it is fair to say that this has sent shockwaves through the retro computing community. In the wider electronics community there has been shock too, although some of it was that the Z80 was still in production 48 years after it launched.

There have been a lot of hot takes on this news, some of which seem to jump to bizarre conclusions or unrealistic solutions. A few people have been in touch either privately or publicly asking me what is going to happen and what can be done about it. I don’t have the answers, although I do have my own hot takes.

What the announcement means

Firstly, reading the announcement properly, the Z80 has not ceased production yet. However, it is the last chance for suppliers to get their orders in. The likes of Digikey, Mouser, RS, Farnell etc have until June 14th to place their orders, then sometime over the following 24 weeks the final batch will be manufactured. I don’t know how many chips will be ordered, but I suspect it will be quite a lot, and hopefully enough to sustain the hobby for many years to come. Sadly, this seems to be in the hands of the buying departments of the aforementioned companies. I don’t have any contacts there, or any influence over them, but if anybody reading this does, please get in touch.

Also, the particular announcement linked to above lists the Z80 chips associated with this EOL, however, there are several other announcements that cover the Z180 as well as the peripheral chips like the SIO/2, PIO, CTC etc. This covers the 40 pin DIP variants we are all familiar with, as well as the LQFP-44 and PLCC-44 variants. Throughout this post I will refer to the Z80 as shorthand for the family of Z80, Z180, and support chips.

What the announcement does not cover is the eZ80, which is likely to continue to be manufactured for quite some time to come. Whilst the eZ80 is somewhat backwards compatible with the Z80 and Z180, it is by no means a drop-in replacement. Making changes to existing hardware and software to take this 100 pin LQFP package is non-trivial, but it isn’t out of the question.

Hobbyist Predictions

As a hobbyist with a love of the Z80, I find this news very sad, although it is not as devastating as some of the hot takes will make you believe. I think that new Z80 chips will be in stock with the retailers for several more years, although there will inevitably be a price rise as supply runs down. Even after then, the market in reclaimed chips, “new” stock from china, FPGA based clones, and other solutions will come up and keep computers and hobby projects going for many years. It will undoubtedly cost a few dollars more for each chip, and reclaimed chips will always be a bit of a gamble, but it is an affordable price for a great hobby.

Z80Kits Predictions

As a business owner of z80kits.com, a site that as the name suggests, is dedicated to the sale of kits based around the Z80, I find this news quite devastating. Over the past 8 years I have sold almost 5000 kits with a Z80 in them, plus a lot of extra modules that make use of the Z80. The EOL of the Z80 is signalling an EOL of z80kits. However, the timeline for this depends mainly on the buying departments of Digikey, Mouser, RS et al. which is an uncomfortable place to be in. And whilst a few dollars on the cost of a single chip might be affordable for a hobbyist, as a company that orders chips in quantities of 100 at a time, this is going to have some financial challenges too.

As mentioned above, there are alternatives. Reclaimed chips are not an option, as selling a kit has an implied assurance that the kit will work. Troubleshooting a users build when even the CPU is an unknown quantity is not something that me or the customer wants. The eZ80 or an FPGA will probably be the most likely contenders, although they will inevitably require a lot of R&D, and sadly lose a lot of the nice retro 40 pin DIP appeal that the Z80 has.

In the short term, however, I am not expecting things to change very rapidly. A decent supply of chips is always kept on hand, and that should last until the suppliers get their stock from the final production run. As long as the suppliers have made their predictions correctly, then things should just carry on as they have been. But if the suppliers decide that there isn’t enough profit in old components like this, then the outlook is much less rosy. We will have to see…

Jig-Ulator

Sometimes an RC2014 has just one job. This one is to go Beep Whoop, Beep Beep Whoop, Beep Beep Beep Whoop! whenever a working Why Em-Ulator Sound Module PCB is put on the jig.

Jig-Ulator

Before we get to that, though, lets go back to the start and consider the Why Em-Ulator Sound Module. This is supplied to RC2014 Towers with the surface mount components assembled and the PCBs panelised. The panelisation is needed so that they will go through the assembly process at the fab house. So the first thing to do is remove the rails and separate the pair of boards.

Removing the rails is made easy with a slot cut in to a wooden box. The rails are put in to the slot and a quick bend up and down detaches them from the main PCB. The discarded rails are then collected in the box. Breaking the two PCBs apart is also a simple process.

Next the micro controller needs to be programmed. The PCB has a TC2030 Tag Connect compatible programming header next to the micro controller. The programming cable has spring loaded pogo pins and some locating pins that protrude through the board. To accommodate this, a small jig (Jiglett) is used.

The programmer is a stand alone device which has the flash hex file, eprom hex file and fuse settings for the default Why Em-Ulator settings (YM2149 at 1.7734MHz). Other settings can be programmed manually from a laptop.

For peace of mind that the firmware has been programmed successfully, and that the assembly process was correct, it needs to be tested. This is where the Jig-Ulator comes in.

At the heart of the Jig-Ulator is an RC2014 Micro. This sits in a Backplane 5 with 3 sockets fitted. One of these sockets has a Digital I/O Module for visual feedback and the other has a Rev 5 YM2149 Sound Module with an AY-3-8910 to AY-3-8912 adapter. This adapter carries all the signals (Power, 8 data lines, Reset, BC1 and BDIR) that the Why Em-Ulator needs to operate, as well as the return path for the sound from Channel A, Channel B and Channel C. The sound module is plugged in to a speaker for audio feedback.

At the front of the Jig-Ulator is a bed of nails test jig made from laser cut Perspex and pogo pins. The Perspex holds the pogo pins in place, and the upper layers have an alignment cutout so that the module under test will line up perfectly with the pins. A little bit of pressure ensures that all signals make good contact.

The RC2014 Micro has some very simple test code in ROM that runs on startup and continues indefinitely. This code isn’t elegant. Nor is it particularly efficient. And it certainly isn’t an example of how to write good Z80 assembly code. However, it has one job, test the module, and it does that well.

All of this only takes up a couple hundred bytes of the 8k ROM. It can surely be optimised to take up less space. Alternatively, the calls can be unrolled to take up more space but without needing any RAM for the stack.

            .ORG    $0000 
REG         EQU     $D8 
DAT         EQU     $D0 
START:               
            NOP      
            NOP      
            DI       ; disable interrupts
            LD      hl,$9000 
            LD      sp,hl ; set up stack
            NOP      
;set mixer reg to enable channel A
            LD      a,7 
            OUT     REG,a 
            LD      a,62 
            OUT     DAT,a 
            LD      a,15 
            OUT     0,a ; set DIO lights right

;set channel A to max volume
            LD      a,8 
            OUT     REG,a 
            LD      a,15 
            OUT     DAT,a 

;output 2 note to channel A
            LD      a,0 
            OUT     REG,a 
            LD      a,128 ;low note
            OUT     DAT,a 
            CALL    delay 
            LD      a,255 ;high note
            OUT     DAT,a 
            CALL    delay 

;decremental tone
            LD      a,0 
            OUT     REG,a 
            LD      b,255 
            CALL    ALOOP 

;set mixer reg to enable channel B
            LD      a,7 
            OUT     REG,a 
            LD      a,61 
            OUT     DAT,a 
            LD      a,$F0 
            OUT     0,a ; set DIO lights left

;set channel B to max volume
            LD      a,9 
            OUT     REG,a 
            LD      a,15 
            OUT     DAT,a 

;output 4 note to channel B
            LD      a,2 
            OUT     REG,a 
            LD      a,255 ;low note
            OUT     DAT,a 
            CALL    delay 
            LD      a,128 ;high note
            OUT     DAT,a 
            CALL    delay 
            LD      a,255 ;low note
            OUT     DAT,a 
            CALL    delay 
            LD      a,128 ;high note
            OUT     DAT,a 
;decremental tone
            LD      a,2 
            OUT     REG,a 
            LD      b,255 
            CALL    ALOOP 

;set mixer reg to enable channel C
            LD      a,7 
            OUT     REG,a 
            LD      a,59 
            OUT     DAT,a 
            LD      a,60 
            OUT     0,a ; set DIO lights middle

;set channel C to max volume
            LD      a,10 
            OUT     REG,a 
            LD      a,15 
            OUT     DAT,a 

;output 6 note to channel C
            LD      a,4 
            OUT     REG,a 
            LD      a,128 ;low note
            OUT     DAT,a 
            CALL    delay 
            LD      a,255 ;high note
            OUT     DAT,a 
            CALL    delay 
            LD      a,128 ;low note
            OUT     DAT,a 
            CALL    delay 
            LD      a,255 ;high note
            OUT     DAT,a 
            CALL    delay 
            LD      a,128 ;low note
            OUT     DAT,a 
            CALL    delay 
            LD      a,255 ;high note
            OUT     DAT,a 
;decremental tone
            LD      a,4 
            OUT     REG,a 
            LD      b,255 
            CALL    ALOOP 


;turn sound off
            LD      a,7 
            OUT     REG,a 
            LD      a,63 
            OUT     DAT,a 
            LD      a,0 
            OUT     0,a 
            CALL    DELAY ; wait....
            CALL    DELAY 
            CALL    DELAY 
            CALL    DELAY 
            CALL    DELAY 
            CALL    DELAY 
            CALL    DELAY 
            CALL    DELAY 
            CALL    DELAY 
            CALL    DELAY 
            CALL    DELAY 
            CALL    DELAY 
            JP      START ; and start all over again


            EI       ; enable interrupts
            RET      ; which will never get to. But helpful for debugging RAM based versions of the code
SHORTDELAY:          
            PUSH    hl 
            PUSH    af 
            LD      hl,1000 
            JP      DELLOOP 

DELAY:               
            PUSH    hl 
            PUSH    af 
            LD      hl,$ffff 
DELLOOP:             
            DEC     l 
            JP      nz,DELLOOP 
            DEC     h 
            JP      nz,DELLOOP 
            POP     af 
            POP     hl 
            RET      

ALOOP:               
            LD      a,b 
            OUT     DAT,a 
            CALL    SHORTDELAY 
            DEC     b 
            JP      nz,ALOOP 
            RET      


After starting up, interrupts are disabled and a stack area is defined. Then it makes a Beep-Boob on channel A, whilst turning on the right 4 LEDs on the DIO module, then plays a Whoop noise. It then does this again on Channel B, but with a Beep-Boop-Beep-Boop and illuminating the left 4 LEDs. And finally, it does this again on Channel C, but with a Beep-Boop-Beep-Boop-Beep-Boop and the middle 4 LEDs. Slight pause and back to the start.

The whole thing only takes a few seconds to confirm that everything is working as it should.