License

GPL 3.0

Recommend Projects

Simple Z80 SBC

2 years ago 1593
  • Description
  • Documents
  • BOM
  • Attachments
  • Members
  • Comments

Description

Simple Z80 test design - single board with all the basics and a few luxuries.

NOTE EasyEDA shows the most recent WIP for this project, which might be part way through me making changes. Before using the PCB layout please do get in touch (comment or message) so I can let you know if what you're seeing is stable! I create labelled versions of the project, but EasyEDA doesn't allow me to publish a specific version :-(

Please do post comments down below if you find any of this interesting, I'd love to share thoughts on how this could be improved in future! I've noticed a few people have cloned it and a few have starred so I'd love to hear from you all.

The board has many more options than it really needs so that I can experiment. All devices are through-hole to make the build easy for those of us yet to venture into SMD. Influences for this project include the RC2014 512K RAM/Flash card and the SIO/2 card along with bits and pieces from all over the Internet that I've managed to lose track of.

The paged memory model supports a 4MB address space, 1MB of which is used on board. The main header exports all Z80 control lines plus the extended address bus allowing 3MB external. I'm hoping to add a memory mapped video card along the lines of the 70s/early 80s systems which would sit in the paged memory map. Great for simple games!

The board uses an oscillator chip and an optional divide by 2 to the CPU and SIO. This allows a certain level of exprimentation with clock speeds. I'm using a 10MHz Z80/SIO/CTC and on the first version of the board a 7.35MHz clock. With the CTC it's possible to decouple the system clock from the SIO baud rate so it's easier to play with clock speeds. I'm hoping to use at least a 10MHz clock or possibly higher. I have a 25MHz clock which, with the divide by 2 might work quite nicely. It's also possible to drive the clock externally rather than use the on board one. So I could have a video card with 25MHz dot-clock also driving the main board. Lots of options!

update the board is working nicely and I have it running at 14.7456MHz crystal.

Version 2 board features:

  • 512K SRAM + 512K Flash memory in 16K pages and 4M address range
  • SIO/0 dual UART
  • Z80 CTC
  • SD Card interface. Pins suitable for the breakout board I have.
  • (2.2) second SD Card interface. Allows two cards but more importantly easy copying between them for cloning. The second connector could also be used for any SPI peripheral with suitable software.
  • Exported SPI interface. Includes two spare device select lines, also exported, allowing connection to external SPI devices
  • DS1704+ real time clock with battery backup
  • i2c interface (used for the clock and available on headers to connect external devices)

Software

The banked memory system means there's plenty of space. I have CP/M 2.2 running from SD Card and a boot loader that supports a range of functions including booting from a Raspberry Pi over the second serial port, or booting directly from SD Card. It's a bit of a mess at the moment but once it's cleaned up it'll be on GitHub.

ToDo:

  • The BOM needs some tidying up including renaming components for consistency. It's a pain doing this on EasyEDA because renaming causes the PCB to think it's a new component and loses all the existing layout.
  • Move some of the circuits around to make each schematic page do one logical thing
  • Add a "RESET IN" signal on the connector to allow an external system (eg Raspberry Pi) to force a hardware reset. This with a Bluetooth serial adapter would allow completely remote devevlopment.

Change Log version 2.2

Bug fixes from the version 2.1 board:

  • The CPU "WAIT" should be pulled high. It wasn't on version 1 and caused no problem (luck I think!) but should be. There are spare resistors in RP1 so a link to one of those fixes this potential issue.
  • BRDM should be (/MREQ OR BA21),it's incorrectly (/WR OR BA21). Also the second input to BR21SEL should be /MREQ not /WR. Patch for version 2.1: remove BR21SEL jumper and connect the centre pin the MREQ. This limits the addressable memory range to 2M (1 external) rather than 4 but is OK.
  • Silkscreen error: mux_2 should be a 74HCT138, NOT 139!!

Enhancements:

  • Shrink board size a bit. This reduces build costs for the board. Current WIP 2.2 is 20% smaller in area than 2.1
  • Add connector for a second SD Card to allow card-to-card copies
  • Extend output port 64h to 8 bits. Upper 8 bits select a further 4 SPI devices. Allows efficient access to the second SD card and other SPI devices and minimises changes to SD card library.
  • Change oscilator layout to accept both 8 bit and 14pin layouts. All my 7MHz parts are 14 pin and my 14MHz parts are 8 :/
  • The CR2032 battery holder I used seems to have availability issues. Change layout to accept several different layouts.
  • Not everyone is going to want a CTC so should be able to leave that out. If you do that then really you want to bridge IO_1 to IOUT to allow the interrupt chain to be maintained on external cards. Add a jumper between these two. (New jumper P5)
  • Allow SIO - port B to be driven from the CTC or CLKU. 2.1 it was only driven by CLK, the CPU frequency.
  • Allow SIO - port A to be driven either from the CTC or from CLKU. 2.1 allowed only CLKU and not the CTC for port A.
  • Include option (link) to divide SIO port A Tx to 3V rather than 5. This would allow direct connect to 3.3V devices. There are some serial to Bluetooth adaptors this would be useful for.
  • Add support for BOTH SIO/0 (current design) and SIO/2 which seems more popular if less available. Only three pins change function.
  • Add a "RESET IN" signal on the connector to allow an external system (eg Raspberry Pi) to force a hardware reset. This with a Bluetooth serial adapter would allow completely remote devevlopment.

Changelog 2.1

Bug fixes:

  • Fix layout for 74HCT04 - Incorrect 16 pin package used. Replaced with correct 14 pin package.
  • Pull up control lines (INT and others) - missing ulls ups result in unpredicatably behaviour.

Changes from version 1 to version 2

  • Add SPI interface
  • Add i2c interface
  • Add i2c real time battery backed clock (DS1307+ chip)
  • Add SDCard hardware interface (single card)
  • Add optional clock divider - selected by jumper. Select either full oscillator speed or 1/2.
  • Add Z80 CTC
  • Remove LED bar. Required too much logic to drive.

Comments/thoughts

With the SDcard interface working very nicely maybe the board doesn't need 512K of flash. It's a complete PITA to programme compared with simply writing to the SD card. Maybe a smaller flash device?

Documents

CPU

Misc Logic

External Connections

Onboard Memory

PCB

Timer

Real Time Clock

Output Regs

Reset Circuit

BOM

ID Name Designator Footprint Quantity
1 74LS670N REG_1,REG_2 DIL16 2
2 DS1307+ U6-1307 DIP-8 1
3 1u C1 AXIAL-0.3 1
4 10K R15 AXIAL-0.4 1
5 1k R31,R32,R33,R7,R10,R30,R8,R16 AXIAL-0.4 8
6 4K7 R14,R13 AXIAL-0.4 2
7 2k R1,R4 AXIAL-0.4 2
8 Header-Male-2.54_1x4 P7 DIP-1X4P-2.54MM-M 1
9 Z80CTC-P CTC DIP-28 1
10 2N5551 Q1,Q2,Q3 TO-92(TO-92-3) 3
11 Header-Male-2.54_1x3 P2,P6,P3 HDR-3X1/2.54 3
12 Header-Male-2.54_1x3 SIOCLK,CPUCLK,BA21SEL HDR-TH_3P-P2.54-V 3
13 Header I2C HDR-3X1/2.54 1
14 Z80CPU-P CPU DIP-40 1
15 Resistor SIL 4K7x8 RP3,RP1,RP2,RP4 SIL-9 4
16 RESET S1 TACTILE-PTH 1
17 SW-DIL-3 SW2 DIP-6__300_ELL 1
18 Header-Female-2.54_2x30 P1 HDR-30X2/2.54 1
19 Z80 SIO/0 SIO DIP-40-600-ELL 1
20 SN74HCT175N U7-175,U2-175,SPI-OUT DIP16 3
21 330 R23,R37,R36,R35,R24 AXIAL-0.4 5
22 4K7 R34,R18,R5,R6 AXIAL-0.4 4
23 2k R3,R2 AXIAL-0.4 2
24 S4 LED4 LED-3MM/2.54 1
25 S5 LED5 LED-3MM/2.54 1
26 S3 LED3 LED-3MM/2.54 1
27 S2 LED2 LED-3MM/2.54 1
28 S1 LED1 LED-3MM/2.54 1
29 SST39SF040-70-4I-NHEDIP36-X FLASH DIP-32-600-ELL 1
30 74ACT541 U4-541 DIP20 1
31 74ACT32 U3-7432 DIP14 1
32 1074 B1 1074 1
33 M05PTH SB,SA 1X05 2
34 32.768KHz X1 CRYSTAL_TC26V 1
35 Header-Male-2.54_1x8 SPI,SDCARD1,SDCARD2 210S-1X8P 3
36 CTC_CFG P4 210S-1X8P 1
37 NOCTC P5 HDR-2X1/2.54 1
38 Header-Male-2.54_1x2 SA3V3 HDR-2X1/2.54 1
39 Male Header 2.54mm PWR 2.54MM_HDR_2PIN 1
40 AS6C4008-55PCN SRAM DIP-32-600-ELL 1
41 74HCT138N MUX_2 DIP-16_300MIL 1
42 100nf C8,C7,C11,C3,C5,C4,C2,C10,C6,C9 RAD-0.1 10
43 Oscillator 8/14 Pin Layout OSC DIP14 - OSCILLATOR 1
44 74F04 U1 DIP-14_300MIL 1
45 74AHCT139N MUX_1 DIL16 1
46 MC74F74AN U5 DIP14 1

Attachments

None

Members

Success
The owner does not allow comments in this project now

Comments (5)

UserSupport Reply

Nice project, thanks for sharing

peterw8102 Reply

@UserSupport Thank you!

Kimbo Reply

hi there
can you tell me the values of the 4 resistor packs please.  R23 R24 can i have the values for these too.
what is the value of Q3.  p5 is it a test point or a jumper?
its a great project too
regards
kim

peterw8102 Reply

@Kimbo sorry for the delay replying, I've just seen your message.


All the resistor packs are 4K7 pullups.


R23 and R24 are 330R for driving the LEDs.


Let me know how you get on!


Pete

peterw8102 Reply

@Kimbo and Q3 is a standard 2N5551 transistor


P5 - this jumper is there for people that don't want to include the Z80 CTC on the board. If you leave that device out then add the jumper to complete the interrupt daisychain.

goToTop
你现在访问的是EasyEDA海外版,使用建立访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow
We use cookies to offer you a better experience. Detailed information on the use of cookies on this website is provided in our Privacy Policy. By using this site, you consent to the use of our cookies.