GithubHelp home page GithubHelp logo

jwrr / z80usb Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 43 KB

Z80 + USB + TinyFPGA-BX in Verilog using open-source Yosys+NextPNR

License: Apache License 2.0

Makefile 17.34% C 31.51% Assembly 3.95% Python 7.90% Verilog 39.30%
tinyfpga-bx z80 usb yosys nextpnr

z80usb's Introduction

z80usb

Description

tinyfpga-bx + usb + z80 + morse code

This project combines a USB core with the 8-bit Z80 processor on the TinyFPGA- BX. C code running on the Z80 generates Morse Code that blinks on the LED. When the board starts up it blinks a default message on the LED. When you type into the terminal, your message blinks on the LED. Your message is also echo'ed back to the terminal display. If you don't type for a while, the default message starts to blink again.

The TinyFPGA-BX is a small circuit board with a Lattice ICE40LP8K FPGA, a USB interface, many IO and one LED.

The ICE40LP8K can, of course, be programmed with proprietary Lattice Tools. But what's really interesting is that it can also be programmed using the open tool-chain from Project IceStorm, including the Yosys Synthesis Suite, and the NextPNR Place and Route Tool. Given the secretive nature of FPGA vendors, I was sceptical of an open tool chain, but I've used it for a while and find it very stable and produces good results. Congratulations to the team. I look forward to trying Project X-Ray on an Arty-7.

The ICE40LP8K has 7680 Look-Up Tables (LUTs), 32 4Kbit Embedded Block memories (EBRAMs) and a PLL. It's not huge but it's enough to do quite a few low-cost projects.

Most boards with a USB interface use a FTDI (or clone) chip to handle the USB protocol. The TinyFPGA-BX has FPGA code that handles the USB interface. This approach uses FPGA resources but it allows for a simpler,lower-cost board design.

I've become re-interested in the classic Heathkit H89. My dad built a couple in the late 1970s. It had a Zilog Z80 processor. The TV80 is a verilog implementaton of the Z80. It can be programmed using the open-source Small Device C Compiler. The iceZ0mb1e provides a good starting point, instantiating the TV80 with several usefule IO blocks and memory.

License

This project is licensed under the Apache 2 License, which is the permissive license used by the USB core. IceZ0mbie and my source files are licensed under the even-more-permissive MIT License.

Some of my change have been PR'ed upstream to the iceZ0mb1e project. But I'm not sure if the Apache-licensed USB-core can integrated into the MIT-Licensed Icez0mb1e. I'm no license expert, but my feeble understanding is that MIT can be merged into Apache, but Apache can't be merged into MIT (please correct me if I'm wrong).

Repos Used by the Project

Download and Install

These steps clone the repo and download the submodules (most of the work is in the submodules).

git clone https://github.com/jwrr/z80usb
cd z80usb
git submodule update --init

Build Instructions

make init
make clean
make main MAIN=morse
make copy
make

Program the FPGA

tinyprog -p z80usb.bin (with TinyFPGA-BX connected)

Terminal Program

# Find COM-port
apio system --lsserial
  • Putty
    • Terminal -> Implicit LF in every CR
    • Serial -> COM8 (or whatever you commport is) -> Open

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.