Page 7 of 10

Re: Another Home-Brew - Z180

Posted: 20 Jun 2020 11:21
by Bill B
Martin A wrote: 19 Jun 2020 22:09 Sheesh that's a lot of work to get the CPLS programmed!
Since the whole project is just a pass-time anyway, what does it matter :roll:

Besides, I learn stuff along the way.

I once discovered a "T" rating for projects:

T0: A project that you can complete with existing tools.
T1: A project where you first have to make the necessary tools.
T2: A project where it is necessary to make the tools needed to make the tools required for the project.
Tn: A project where it is necessary (to make the tools needed)*(n-1) to make the tools required for the project.

I have been unable to re-discover the reference for this.

Re: Another Home-Brew - Z180

Posted: 20 Jun 2020 13:49
by Martin A
Bill B wrote: 20 Jun 2020 11:21
Martin A wrote: 19 Jun 2020 22:09 Sheesh that's a lot of work to get the CPLS programmed!
Since the whole project is just a pass-time anyway, what does it matter :roll:

Besides, I learn stuff along the way.
And the learning is the important thing really.

Re: Another Home-Brew - Z180

Posted: 25 Jun 2020 16:04
by Bill B
It lives :)
20200625_142727.jpg
20200625_142727.jpg (907.35 KiB) Viewed 2533 times
20200625_142759.jpg
20200625_142759.jpg (1008.19 KiB) Viewed 2533 times
Some very minimal firmware (source attached):
  • Configures one of the serial ports for input and output
  • Performs some basic memory tests
  • Echoes text typed in
  • Uploads and executes hex files
This last feature will allow me to do further software development and testing without having to repeatedly swap the ROM chip in and out. If I have got the design right, I should even be able to upload programs which re-flash the ROM in-situ.

A couple of hiccups:
  • I should have included a capacitor on the reset line. It is necessary to hit the reset button after powering up to get any reponse. Easy enough, but messy, to solder a capacitor underneath the board. Not so easy, but probably possible, to put one in on the top surface.
  • The processor is currently running at only 4MHz. The small green board in the corner is a home-made oscillator module. When I first started this project, my Z80 databook indicated that I needed an oscillator at twice the CPU frequency. I did not realise that more recent Z180s had clock doubling capabilities. I therefore purchased a couple of 40MHz oscillator modules. I am not sure whether these are proving unreliable, or just that my old test equipment cannot cope with frequencies that high. I need to purchase some new oscillator modules.

Re: Another Home-Brew - Z180

Posted: 25 Jun 2020 19:55
by Martin A
It's a great feeling when that happens. Well Done :D

I've checked the Z180 board I did for the MTX plus, that's got a 12mhz clock on it so I suspect I ran that clock doulbed. It's a long time since I played with it, though I do remember trying all sorts of clocks, I think it was more stable at 12 doubled than it was at 25 without the clock doubler (there are no 24 mhz clocks in the box).

Interestigly it's got a stock 10mhz CTC on it which would have been out of spec at 12, let alone 24. That may well be the reason fot the upper limit of the board being in the 24-25 range.

Hopfully when you get sone clocks, you'll be able to surpass the 20mhz rating of the CPU itself.

Re: Another Home-Brew - Z180

Posted: 25 Jun 2020 20:24
by Bill B
The Z180 I am using is rated at 33MHz. I will probably get 10MHz and 16MHz oscillator modules.

Re: Another Home-Brew - Z180

Posted: 01 Nov 2020 10:49
by Bill B
My Z180 project has not been abandoned, it just got put on the back burner while I was distracted by other projects:
There had been some background progress. I finalised the design of the peripherals board:
Z180_EC_v3_Periph_Circuit.pdf
(163.9 KiB) Downloaded 29 times
And laid out and routed a PCB design. This took a number of iterations, as the board is fairly crowded:
Z180_EC_v3_Periph_PCB.pdf
(97.19 KiB) Downloaded 28 times
This weekend I finally got around to etching the board:
20201101_081336.jpg
20201101_081336.jpg (863.81 KiB) Viewed 979 times
It has a few issues (e.g. One track has been etched through), but I think it is usable.

Next step, drill lots of holes.

Re: Another Home-Brew - Z180

Posted: 15 Nov 2020 13:34
by Bill B
20201115_110720.jpg
20201115_110720.jpg (869.56 KiB) Viewed 589 times
Peripherals board for my Z180 now:
  • Drilled
  • Soldered
  • Multimeter tested for shorts and continuity
  • Assembled
One significant error encountered, my stupidity for not checking :oops: I am using TXB0108 bi-directional logic level converters between the Propeller and the Z180. I put in standard 20 pin 0.3-inch pitch DIL sockets. However the TXB0108 I have are surface mount chips on a break-out board. The pin spacing on the board is 0.5-inch! Fortunately, the break-out boards were supplied without the pins soldered. It was possible to bend the pins before soldering them in place so that the boards will fit in the DIL sockets.

It is also possible that the VGA output connector is a bit too close to the SD card connector.

Still to do before I can test:
  • Program the CPLD
  • Write the firmware for the Propeller (adapt the CFX-II code)
  • Program the Propeller firmware into the serial EEPROM

Re: Another Home-Brew - Z180

Posted: 17 Nov 2020 21:21
by Martin A
That's impressive, it'll really interesting to see how it progresses.

Re: Another Home-Brew - Z180

Posted: 28 Nov 2020 18:10
by Bill B
How it progresses is not very well :(

I am doing a slow device by device integration, pop all the chips out, and then put them back one by one, and test each new configuration:
  • Start with just the Propeller and its ROM chip installed in the Peripherals board. Power the board independent from the CPU board.
  • A few teething problems with the Propeller firmware. Owing to the board layout, it is using different output pins to the CFX-II and is running at a higher clock frequency. However, not too difficult to solve, and the Propeller produces its initial test card.
  • Connect the CPU and Peripherals board together, and power via the CPU board. The Propeller still produces its test card and the Z180 runs its memory test, outputting to serial.
  • Insert the CPLD and the level shifters, so that the Z180 can talk to the Propeller. Power up again, and VGA output still produced, but the Z180 does not boot :(
  • A bit of testing soon shows that the Z180 will not boot if the level shifter on the data bus is installed.
I am clearly going to have to investigate these level shifters. They came from China, so they may be fake, but I purchased them through Amazon, so hopefully not. I may have to end out creating my own level shifter break-out using resistors.

At the moment I am undecided whether to continue working on this, or whether to remove the Propeller for now and try the other devices (particularly the SD card) using the serial output from the Z180.

Re: Another Home-Brew - Z180

Posted: 28 Nov 2020 19:49
by Martin A
Can you "get away" with just using current limiting resistors, at least for testing ?

The VIH minimum for the Z180 is 2v according to the datasheet I have. Which is witin the Propeller capabilities as that should have a VOH minimum of 2.8.