RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » New Board - Easy Z80 SBC (Easy Z80 SBC)
New Board - Easy Z80 SBC [message #6027] Fri, 01 March 2019 12:06 Go to next message
Sergey is currently offline  Sergey
Messages: 173
Registered: October 2015
Location: Portland, OR
Senior Member
We can't have too many Z80-based SBCs, right? Smile

Well, here is another one - Easy Z80. This one was created by my son Max, under my supervision. His goal was to understand how a microprocessor system works, what it takes to design and build one. And we also wanted to make it a useful system - one that can run CP/M software - Zork?!Wink and with an option to expand the system in the future. I also wanted him to learn a thing or two about programmable logic, so we decided to use an SPLD for glue logic (and save some ICs by doing so).

Specs:
- Z80 CPU - runs at 10 MHz, but can run at any other frequency
- Z80 SIO/O - provides two serial ports. Two MAX232A transceivers are included on the board.
- Z80 CTC - timer interrupt and optionally baud rate generation for SIO
- 512 KB Flash ROM / 512 KB battery backed SRAM - same paging as implemented in Zeta SBC V2
- MAX693 microprocessor supervisor that provides reset generation, SRAM battery backup, power failure monitoring (and NMI), and an optional watchdog
- RC2014 compatible extension connector
- Runs RomWBW. Wayne had kindly merged a couple of small changes required to support the board into his RomWBW repo.
- All this fit into a very busy 10 cm x 10 cm board.

The project documentation (work in progress), EDA files, and everything else is here: https://github.com/skiselev/easy_z80/

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

Thanks,
Sergey
Re: New Board - Easy Z80 SBC [message #6033 is a reply to message #6027] Wed, 06 March 2019 15:17 Go to previous messageGo to next message
alank2 is currently offline  alank2
Messages: 30
Registered: March 2019
Member
Looks great Sergey, nice that your son is building stuff too!

I recently got your fine Zeta V2 SBC built - I recompiled the GoTek FlashFloppy firmware to support 2:1 interleave for it:

/forum/index.php?t=getfile&id=1273&private=0
Re: New Board - Easy Z80 SBC [message #6034 is a reply to message #6033] Wed, 06 March 2019 15:41 Go to previous messageGo to next message
Sergey is currently offline  Sergey
Messages: 173
Registered: October 2015
Location: Portland, OR
Senior Member
Alan,

That looks nice, I need to get one of these floppy emulators.

Thanks,
Sergey
Re: New Board - Easy Z80 SBC [message #6035 is a reply to message #6034] Wed, 06 March 2019 15:44 Go to previous messageGo to next message
alank2 is currently offline  alank2
Messages: 30
Registered: March 2019
Member
They are pretty cheap on eBay, and you can reflash them with a USB to TTL serial adapter to the FlashFloppy firmware. If you want the 2:1 interleave firmware, I posted it at vcfed.org.
Re: New Board - Easy Z80 SBC [message #6036 is a reply to message #6035] Thu, 07 March 2019 11:30 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 223
Registered: October 2015
Senior Member
Nice... one comment from the pal

0x84-0x87 is a defacto standard place for the second SIO board on the RC2014 as well as your watchdog.
Re: New Board - Easy Z80 SBC [message #6037 is a reply to message #6036] Thu, 07 March 2019 11:48 Go to previous messageGo to next message
Sergey is currently offline  Sergey
Messages: 173
Registered: October 2015
Location: Portland, OR
Senior Member
Hi Alan,

It is a valid concern. Thankfully the board uses an SPLD for the address decode and therefore the address can be easily changed.
Any recommendations for an I/O address for the watchdog (a block of 4 addresses, since it doesn't decode A0 and A1)?

Another thing, the SPLD can be actually programmed to pulse the WDOG signal (and reset the watchdog) when any of the SPLD inputs or their combination change. Perhaps an easy approach would be to pulse it for any I/O request?

Thanks,
Sergey
Re: New Board - Easy Z80 SBC [message #6038 is a reply to message #6037] Thu, 07 March 2019 13:08 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 223
Registered: October 2015
Senior Member
There is a spreadsheet for RC2014 maintained by Steve Cousins steve.cousi at gmail.com that might be the best thing to consult. It's all a bit adhoc (too adhoc IMHO.. Wink

I guess the other question is whether you also have pullups somewhere so non IM2 using RC2014 devices don't jump to random vectors, and/or mess up when they are IM2 capable but don't have IE*

Alan

[Updated on: Thu, 07 March 2019 13:24]

Report message to a moderator

Re: New Board - Easy Z80 SBC [message #6039 is a reply to message #6038] Thu, 07 March 2019 14:46 Go to previous messageGo to next message
Sergey is currently offline  Sergey
Messages: 173
Registered: October 2015
Location: Portland, OR
Senior Member
Oh right I've seen that spreadsheet before. I've checked it, it looks that 0x6C-0x6F block is fairly unused, so I'll move the watchdog there.

Do you have any preferences for the CTC address? Zeta SBC V2 currently has the CTC at 0x20-0x23 and that's what we've used for Easy Z80. RC2014 boards have it either at 0x88-0x8B (Steve Cousins SC102 board), or at 0x90-0x93 (Dr. Scott M. Baker's board).

Easy Z80 doesn't have pullups on data bus. I can add a resistor array in the next revision. Meanwhile it is possible to solder a resistor array on the back side of the board next to the RC2014 header.

Thanks,
Sergey
Re: New Board - Easy Z80 SBC [message #6040 is a reply to message #6039] Thu, 07 March 2019 17:33 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 223
Registered: October 2015
Senior Member
0x88 seems to be the closest to a default.

0x90 doesn't work because the standard RC2014 IDE CF adapter doesn't decode A7 (again see the spreadsheet). It's not quite as bad as all the ZX spectrum decodes but there are lots of partial decode issues.

Fuzix I tried to use the defaults I could find so it uses

0x01 Joystick 1 (PIO defaults)
0x02 Joystick 2
0x10 IDE CF (also decodes at 90) (default from docs, as required by CP/M)
0x20 PPIDE (and I think it's also suggested at E0 need to check if CP/M or ROMWBW now handle it and if so copy their choice)
0x48-0x58 FDC
0x70-7F Bank control (as built into 512K/512K board)
0x80 SIO1 (as required for CPM and ROMWBW)
0x84 SIO2 (as suggested by SC10x card manual)
0x88 CTC (as suggested by SC10x card manual)
0xC0 Clock/Timer (as required by CP/M and ROMWBW)

I've not merged the drivers for these yet but I'm planning to use

0xD0-0xD3 AY3-891x audio
0x68-0x6B Z80 PIO

based on suggested jumpers in various docs.

No idea where I'm going to put the VDP once assembled. Probably 0x98-0x9B as per MSX Cool


I've added a first draft of your platform to the RC2014 emulator. Once I have firmware and time I'll give it a bit more of a test. Also need to check I have the IM2 priority ordering correct.

Alan
Re: New Board - Easy Z80 SBC [message #6041 is a reply to message #6040] Fri, 08 March 2019 03:24 Go to previous messageGo to next message
b1ackmai1er is currently offline  b1ackmai1er
Messages: 265
Registered: November 2017
Senior Member
Really nice to see an all Zilog board and in a 10x10 format Smile ECB version? ;)
Re: New Board - Easy Z80 SBC [message #6048 is a reply to message #6041] Fri, 08 March 2019 10:41 Go to previous messageGo to next message
Sergey is currently offline  Sergey
Messages: 173
Registered: October 2015
Location: Portland, OR
Senior Member
Phil,

Making an ECB version out of it will likely increase the board size... well... to ECB (16 cm x 10 cm) dimensions.
I've just put a bunch of recommendations on your ECB Z80 SBC redesign work, which basically will bring it to Easy Z80 + ECB.
Except of the SIO... So here comes the SIO vs 16550A UART discussion:

Pros of SIO:
- Two serial ports
- More flexible as far as the modes of operation go. It supports either asynchronous or synchronous communications (synchronous mode not likely to be used in our SBC)
- Z80 interrupt mode 2 support

Cons of SIO:
- Baud rate generator can only divide the input clock by 1, 16, 32, or 64. This makes it difficult to support both 115200/57600 and 9600/19200/38400 bit rates at the same time. It is possible to use the Z80 CTC to generate the Tx/Rx clock, but that complicates the software.
- No FIFO (I don't think it is currently used by RomWBW, not sure about FUZIX)

Pros of 16550A UART:
- Much more capable baud rate generator
- FIFO available
- Backward compatible with 8250 and 16450
- Already used in the ECB SBC

Cons of 16550A UART:
- No interrupt mode 2 support. It is possible to use one of the CTC channels to generate interrupts.
- Single port (but do we need two?Wink

Frankly, I am not sure which poison to pick here Smile

Thanks,
Sergey

[Updated on: Fri, 08 March 2019 10:42]

Report message to a moderator

Re: New Board - Easy Z80 SBC [message #6049 is a reply to message #6048] Fri, 08 March 2019 11:59 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 223
Registered: October 2015
Senior Member
The SIO baud can only do 1x for synchronous serial, so you are stuck with 16/32/64. It does have a very small receive FIFO that is automatic and always active (3 bytes). It and the CTC and other stuff are also available in one chip (KIO).

The 16550A also has the problem of needing a lot of I/O ports per channel. IM2 ought to be doable somewhat. Certainly there were systems using Intel 8250 and the like with IRQ logic and resistors to pull the bus to a default IM2 vector. Not sure I'd use a CTC as you get a lot more interrupt lines out of a Z80 PIO and still have enough bits left for SD card support and a bit banged RTC (and probably even simple MMU).

The other option is the Z85230 which gives you 4 bytes transmit, 8 bytes receive FIFO and a proper baud rate generator - and can do IM2.

A second port is very useful for networking (CP/NET or TCP/IP or kermit)

Alan

[Updated on: Fri, 08 March 2019 12:11]

Report message to a moderator

Re: New Board - Easy Z80 SBC [message #6050 is a reply to message #6049] Fri, 08 March 2019 14:03 Go to previous messageGo to next message
Sergey is currently offline  Sergey
Messages: 173
Registered: October 2015
Location: Portland, OR
Senior Member
KIO comes in PLCC-68 and LQFP-100 packages. I am not sure if there is a sentiment to stick to DIP packages for the SBC. But otherwise it is certainly a capable IC that could replace UART, Z80 CTC and 8255 PPI.

Z85230 certainly looks like an interesting option if going discrete UART route. Kind of the best of both worlds. It is also available (although in a limited quantity) at Mouser.




Re: New Board - Easy Z80 SBC [message #6051 is a reply to message #6050] Fri, 08 March 2019 14:04 Go to previous messageGo to next message
Sergey is currently offline  Sergey
Messages: 173
Registered: October 2015
Location: Portland, OR
Senior Member
Alan,

FYI - I've moved the CTC to 0x88-0x8B

Thanks,
Sergey

[Updated on: Fri, 08 March 2019 14:04]

Report message to a moderator

Re: New Board - Easy Z80 SBC [message #6053 is a reply to message #6051] Fri, 08 March 2019 15:39 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 223
Registered: October 2015
Senior Member
I've just pushed a theoretical Fuzix port (as in untested) to the git tree. Given how close it is to RC2014 and Zeta v2 plus having the SIO IM2 support from the Linc80 it was basically a cut and paste effort plus some constant changes.

Now whether it works I don't know. I will investigate more once there's a known good ROMWBW image to test the emulation against.
Re: New Board - Easy Z80 SBC [message #6055 is a reply to message #6053] Fri, 08 March 2019 16:01 Go to previous messageGo to next message
Sergey is currently offline  Sergey
Messages: 173
Registered: October 2015
Location: Portland, OR
Senior Member
The support for Easy Z80 had been merged to RomWBW 2.9.1. When building the image select RC2014 platform, and then ezz80 configuration.

Note that CTC is wired a bit differently in Easy Z80 vs. Zeta SBC V2:


  • In Easy Z80, CTC channels 0 and 1 can be wired to SIO clock inputs (they are not connected by default - the default is to get 1.8432 MHz clock signal straight from the oscillator), and CTC channels 2 and 3 are chained together, and channel 3 can be used to generate periodic timer interrupt.

  • In Zeta SBC V2, CTC channels 0 and 1 are chained together, and are used to generate periodic timer interrupt, channels 2 and 3 are used as IM2 interrupt inputs from the UART and the PPI respectively,

[Updated on: Fri, 08 March 2019 16:02]

Report message to a moderator

Re: New Board - Easy Z80 SBC [message #6056 is a reply to message #6055] Fri, 08 March 2019 16:19 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 223
Registered: October 2015
Senior Member
The CTC is actually how my RC2014 is wired (minus CTC0 not being channel A speed) so I took the CTC code from there and tweaked it for the differing clocking arrangements. In Fuzix I actually use CTC2 as a timer generating interrupts and CTC 3 counts them so when interrupts are off I can recover from over a second of IRQ off time correctly. So that bit of the design fitted beautifully.

I'll maybe build a ROMWBW but as I have lots to do the next few days more likely wait until there's a known good build. I've had too many adventures simultaneously debugging emulators and miscompiled firmware or OS code at the same time to ever want to do it again Cool

Alan
Re: New Board - Easy Z80 SBC [message #6060 is a reply to message #6056] Fri, 08 March 2019 21:13 Go to previous messageGo to next message
Wayne W is currently offline  Wayne W
Messages: 300
Registered: October 2015
Location: Fountain Valley, Californ...
Senior Member
If it is helpful, I have have generated RomWBW v2.9.1-pre.11 that includes all of the normal images in addition to ones for Easy Z80. In the binary subdirectory, you will now find RC_ezz80.rom. As usual, you need to download the .zip package from the releases page of GitHub which is found at https://github.com/wwarthen/RomWBW/releases.

Thanks,

Wayne
Re: New Board - Easy Z80 SBC [message #6071 is a reply to message #6060] Sat, 09 March 2019 14:44 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 223
Registered: October 2015
Senior Member
Thanks. And as expected I've spent an afternoon debugging Z80 SIO emulation rather than Fuzix Cool

Re: New Board - Easy Z80 SBC [message #6083 is a reply to message #6071] Sun, 10 March 2019 16:47 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 223
Registered: October 2015
Senior Member
Fuzix now runs on the emulated system, so hopefully it runs on the real one. As with RC2014 the memory is a bit tight and I need to sort that out properly at some point by moving to a banked kernel so there is room to throw in networking, VDP video support, SD card over Z80 PIO and whatever else people come up with.
Re: New Board - Easy Z80 SBC [message #6177 is a reply to message #6083] Thu, 21 March 2019 19:53 Go to previous messageGo to next message
jdgabbard is currently offline  jdgabbard
Messages: 48
Registered: March 2016
Member
Wow Sergey, you packed more onto a 10x10 than I was able to do with my G80-S/USB computers! Thats impressive man.

Doug Gabbard
Creator of the G80-S Micro Computer and 'Porter' of TinyBASIC 2.5g
Website: http://retrodepot.net
z80 TinyBASIC 2.5g: http://retrodepot.net/?p=424
AtariAge Username: jdgabbard
Re: New Board - Easy Z80 SBC [message #6275 is a reply to message #6177] Sun, 28 April 2019 10:28 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 223
Registered: October 2015
Senior Member
What would folks suggest for programing the SPLD. I gave it a spin with the TL866cs I have but just got 'unknown device'

Alan

[Updated on: Sun, 28 April 2019 10:29]

Report message to a moderator

Re: New Board - Easy Z80 SBC [message #6276 is a reply to message #6275] Sun, 28 April 2019 10:58 Go to previous messageGo to next message
jdgabbard is currently offline  jdgabbard
Messages: 48
Registered: March 2016
Member
It's a 16v8, so the Minipro should work.

As a side note, there is a newer version of the mini pro software that fixed the issue with 22v10s if I'm not mistaken.


Doug Gabbard
Creator of the G80-S Micro Computer and 'Porter' of TinyBASIC 2.5g
Website: http://retrodepot.net
z80 TinyBASIC 2.5g: http://retrodepot.net/?p=424
AtariAge Username: jdgabbard
Re: New Board - Easy Z80 SBC [message #6280 is a reply to message #6276] Mon, 29 April 2019 08:16 Go to previous messageGo to next message
Sergey is currently offline  Sergey
Messages: 173
Registered: October 2015
Location: Portland, OR
Senior Member
MiniPro TL866A and TL866CS programmers support ATF16V8 and GAL16V8.
Re: New Board - Easy Z80 SBC [message #6412 is a reply to message #6280] Mon, 15 July 2019 07:28 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 223
Registered: October 2015
Senior Member
I finally got it to work. It needed not just the right firmware but the latest software as well. Once I figured out it needed the battery backup to boot all was good.

Alan
Re: New Board - Easy Z80 SBC [message #6413 is a reply to message #6412] Mon, 15 July 2019 14:44 Go to previous messageGo to next message
Wayne W is currently offline  Wayne W
Messages: 300
Registered: October 2015
Location: Fountain Valley, Californ...
Senior Member
etchedpixels wrote on Mon, 15 July 2019 07:28
I finally got it to work. It needed not just the right firmware but the latest software as well. Once I figured out it needed the battery backup to boot all was good.

Alan

Alternatively, you can just short J4 with a jumper for "no battery" operation. This is in accordance with the datasheet which indicates that Vbatt must be shorted to ground if there is no backup battery.

It was a while ago, but I think this same thing also stumped me for a few minutes.

-Wayne
Re: New Board - Easy Z80 SBC [message #6421 is a reply to message #6413] Tue, 23 July 2019 15:16 Go to previous messageGo to next message
Sergey is currently offline  Sergey
Messages: 173
Registered: October 2015
Location: Portland, OR
Senior Member
Wayne W wrote on Mon, 15 July 2019 14:44
etchedpixels wrote on Mon, 15 July 2019 07:28
I finally got it to work. It needed not just the right firmware but the latest software as well. Once I figured out it needed the battery backup to boot all was good.

Alan
Alternatively, you can just short J4 with a jumper for "no battery" operation. This is in accordance with the datasheet which indicates that Vbatt must be shorted to ground if there is no backup battery.

It was a while ago, but I think this same thing also stumped me for a few minutes.

-Wayne
Yeah, these NVRAM supervisor ICs do not work properly with VBat floating. I've added a note in the README about that.

Meanwhile, I've received 10 version 1.1 PCBs, so I have some to sell [($5 + shipping) * 1.05 PayPal fees]. The changes are fairly minimal and outlined in the README Changes section.

/forum/index.php?t=getfile&id=1446&private=0
Re: New Board - Easy Z80 SBC [message #6422 is a reply to message #6413] Tue, 23 July 2019 18:33 Go to previous message
mscane is currently offline  mscane
Messages: 103
Registered: October 2015
Senior Member
I think from memory, if the battery is not connected the first memory write will fail. It is used to tell the system that the battery is missing or needs replacement. It is in the data sheet I think.

Cheers!

Max



Previous Topic: For aussies: Rack mounted case
Next Topic: 6x0x boards for sale


Current Time: Tue Dec 10 10:50:27 PST 2019

Total time taken to generate the page: 0.01773 seconds