~joshrig/muxitd

multiplexor daemon
updated readme
simplified the protocol
added license

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~joshrig/muxitd
read/write
git@git.sr.ht:~joshrig/muxitd

You can also use your local clone with git send-email.

#muxitd

takes commands formatted as json from a named-pipe and bit-bangs the given configuration into the muxes and shift registers.

#to build

bash$ . ~/stm32/sdk/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
bash$ $CC muxitd.c -o muxitd

#commands (very incomplete)

commands are sent as ASCII text terminated by a newline '\n'.

#command layout

0x000miiii

where, m = mux b0000 - ch4 b0001 - ch3 b0010 - ch2 b0011 - ch1

and, i = io each nibble (each 'i') represents an output channel

bits 15..12 11..8 7..4 3..0
output ch ch1 ch2 ch3 ch4

each bit in the nibble represents an input channel

bits n+3 n+2 n+1 n
input ch ch1 ch2 ch3 ch4

yes, they're reversed. i didn't check the schematic very carefully after drawing it, apparently.

here's a crappy diagram: crappy diagram

#pin mappings

pin cross-reference. shows how everything is connected from a pin on the MPU all the way to a pin on a connector on the main board.

gpio header pin# stm32 pin gpio chip gpio line# function
8 PB10 chip1 10 adcsel0
10 PB12 chip1 12 adcsel1
16 PF1 chip5 1 shclk
18 PF0 chip5 0 stclk
22 PF4 chip5 4 res
2 - - - 5V
6 - - - gnd
Do not follow this link