Mon Jun 9 17:00:04 CEST 2014

First GPIO Success

New project: assembling a simplified, PDP8-like console panel, usable as frontend to simh-pdp8. Today, I attached a nice, clunky on/off switch to one of the GPIO pins of alexis, my OlinuXino-A20 board:

toggle switch

A first naive attempt, just inserting the switch between GPIO pin and GND, yielded just flaky results, following the hints and this design from http://elinux.org/RPi_GPIO_Interface_Circuits

switch circuit

made things work:

# while true ; do sleep 1; cat /sys/class/gpio/gpio64_pg0/value ; done
0
0
0
0
0
0   (flip)
1
1
1
1
1
1   (flop)
0
0
0
0
0
^C

Because I wasn't able to find my mixed bag of resistors, I abused my PDP11 processor board and located an r15k there:

r15k pull-up

Thanks to Doom for kindly guiding me around with this.


Posted by neitzel | Permanent link | File under: learned, done, marshlabs