https://github.com/ildus/midi_fpga
MIDI footswitch controller on iCE40HX1K-EVB
https://github.com/ildus/midi_fpga
Last synced: 5 months ago
JSON representation
MIDI footswitch controller on iCE40HX1K-EVB
- Host: GitHub
- URL: https://github.com/ildus/midi_fpga
- Owner: ildus
- License: gpl-3.0
- Created: 2020-12-28T19:23:18.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-13T08:13:16.000Z (over 5 years ago)
- Last Synced: 2025-10-13T12:55:52.607Z (9 months ago)
- Language: SystemVerilog
- Homepage:
- Size: 1.61 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
MIDI footswitch controller on iCE40HX1K-EVB
=============================================
Description
-----------
MIDI footswitch controller with four SPDT buttons. Supports MIDI OUT for
controlling other devices and MIDI IN to teach buttons what MIDI commands
should be send. Two LEDs indicate current processes.
Teaching is simple, connect other device's MIDI OUT to MIDI IN of footswitch
controller, trigger signal on the other device (LED2 will indicate that our
controller got the signal) and push one of the buttons and it'll accociate
the button with MIDI command.
MIDI IN and MIDI OUT schematics should be based on 3.3V (not 5V) as usual.
Getting started
---------------
Latest versions of `yosys`, `icestorm`, `nextpnr` and `iverilog` packages
are needed.
Compilation:
```
make ice40
```
Uploading is done through my Banana PI (Raspberry PI alternative), I copy
the bitstream using ssh to BPI, and I use flashrom to write the bitstream to the
flash chip on dev board. The command does all that:
```
make upload_ice40
```
Look for any detals in Makefile. Tested on Arch Linux.
Footswitches are 3-pin SPDT, center pin goes to GND, other pins go to pins
in GPIO, look which pins to use in `ice40/ice40hx1.pcf`. To determine physical
locations of pins the `iCE40HX1K-EVB` schematic will be needed, which can be found
[here](https://github.com/OLIMEX/iCE40HX1K-EVB/blob/master/iCE40HX1K-EVB_Rev_B.pdf).
Tests
-----------
```
pip install cocotb
make check
```
For simulation install `gtkwave` package and run `make check` with `TESTCASE`
option. `TESTCASE` is a name of function in `tests/test_midi_ctrl.py`.
After that run:
```
gtkwave tests/midi_ctrl.vcd
```