From 9d7c140ae76ed922146c06474cb1220ea5bcb613 Mon Sep 17 00:00:00 2001 From: Andrey Alekseenko Date: Tue, 6 Jan 2015 14:47:45 +0300 Subject: Minor typo in fpga-hacking.rst --- fpga-hacking.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpga-hacking.rst b/fpga-hacking.rst index 467277d..2f2e8d3 100644 --- a/fpga-hacking.rst +++ b/fpga-hacking.rst @@ -17,6 +17,6 @@ Run these commands from a Novena with the GPBB attached:: git clone https://github.com/bunnie/novena-gpbb-example cd novena-gpbb-example make -j4 - sudo ./configure.sh novena_fpga + sudo ./configure.sh novena_fpga.bit sudo ./novena-gpbb -v -- cgit v1.2.3 From 97f6da592df6b44732be885dadfdd1e5a1e48872 Mon Sep 17 00:00:00 2001 From: Andrey Alekseenko Date: Tue, 6 Jan 2015 15:32:10 +0300 Subject: Added bash script to toggle LEDs on GPBB Because blinking LEDs is the first thing everyone does after getting anything with GPIO. --- fpga-hacking.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fpga-hacking.rst b/fpga-hacking.rst index 2f2e8d3..edebb30 100644 --- a/fpga-hacking.rst +++ b/fpga-hacking.rst @@ -20,3 +20,13 @@ Run these commands from a Novena with the GPBB attached:: sudo ./configure.sh novena_fpga.bit sudo ./novena-gpbb -v +Simple test --- toggle four on-board LEDs, connected to I/O port B, pins 0--3:: + + sudo ./novena-gpbb -oeb 1 # set port B to drive + for BIT in 0 1 2 3; do + sudo ./novena-gpbb -p_set b $BIT # Set pin + sleep 1 + done + sudo ./novena-gpbb -p b 00 # Write 0x00, i.e. reset all pins + sudo ./novena-gpbb -oeb 0 # return port B to tristate mode + -- cgit v1.2.3