Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Z80 CPU for OpenFPGAs, with Icestudio

Quick start

  • Open the file with Icestudio
  • Connect the Alhambra-II board (or compatible) and upload the design
  • After 2min aprox. the LEDs will show the value 0xAA
  • Let's upload a program test: open a terminal
  • Move to the roms folder
  • Execute the following line:
python3 05-counter.bin
  • After 2 seconds you will see a binary counter running on the LEDs

  • If you want to assemble that example, execute the following comands:

z80asm -o 05-counter.bin 05-counter.s

UART and pushbutton

The file adds the following:

  • TX/RX Uart mapped in ports 0x10 (Data) and 0x11 (Status). The Data port is for transmitting (out) and receiving (in)
  • Input port 0x00. The SW2 button can be read from the bit 0 of port 0x00

Have a look at this examples for more details:

  • 08-button-seq.s
  • UART-*.s