Close

Flashing lights

A project log for Z80 Computer

Yet another Z80 computer.

james-otsJames Ots 05/04/2017 at 21:150 Comments

This evening I got all the Z80's control pins connected up to the CPLD (it's a Xilinx XC95144XL, by the way), as well as three LEDs, for testing things with. I've also added a MAX703 to provide a reset signal, and replaced the previous 3.3v power supply with an LD1117AV33, which is much more compact. I decided to put the 3.3v clock signal through the 74LS04 in order to get it up to 5v, just to be sure.

The CPLD is currently programmed to hold all the control inputs high, and hold all the data lines low so that the CPU will execute NOP instructions, and the address will slowly increment. I connected the LEDs to A13, A14 and A15, which should make them flash at 15, 30 and 60Hz or thereabouts, I think. Just about slow enough to see them flash (at least at 15 and 30Hz), and my multimeter should be able to measure it. Unfortunately, nothing happened.

So I programmed the CPLD to flash the green light on and off fairly slowly. Which should work, as it was working yesterday. Alas, today it didn't work.

I was starting to run out of things to check. The reset circuit was working correctly, the clock circuit hasn't been touched, the CPLD still looks like it's working (the xc3sprog programme can still see it). Eventually I had a look at the VHDL code which ISE generates from my schematic, and noticed that it was all wrong. Aha! Yet again, I had done something stupid. Yesterday I had started a new CPLD project on my computer to put the Z80 code into, but I was still loading the old test code onto the board. D'oh! I uploaded the correct code, and the lights started flashing perfectly!

This means that the Z80 works. Hooray! And I tried putting the 3.3v clock signal into the Z80 and it wasn't happy with it, but it seems to be okay with 3.3v on the other inputs.

The next stage, I think, is to connect up the FTDI USB port properly so that I can run a programme to flash the lights differently, and then wire up the RAM and ROM.

Discussions