[CCC DEV] Ideas for extending "Plumbing"

Steve Pretty steve.g.pretty at btinternet.com
Wed Feb 16 22:21:16 GMT 2011


I have been looking at some ideas for extending the functionality of 
plumbing. Rather than come up with an arbitrary set of new building 
blocks, I thought about using some form of industry standard. I settled 
on the world of Programmable Logic Controllers, described by IEC 61131. 
(I have to stress, I have no practical experience of these devices - I 
got hold of a text book on the subject, and used that to influence the 
building blocks I have developed).

My aim was to stick with the basic idea of plumbing - launching a set of 
"building blocks" under a PAR, and linking these with a set of CHANs. I 
decided to use the LEVEL type as the primary means of communication 
between my blocks (BYTE is used by some blocks)

I have implemented the following:

Logic blocks - a NOT, and two input AND, OR, NAND, NOR, XOR and EQ
These blocks in themselves probably have good educational value for 
people wanting to learn combinatorial logic design.  It is possible to 
design any combinatorial function from 2 input NAND or 2 input NOR - so 
the student could do their design on paper and then simulate it on the 
Arduino using these blocks.

Basic I/O  - digital input, inverting digital input and digital output 
(more or less cloned from plumbing)

Internal Relay blocks - 2 and 4 output - these implement the one to many 
message multicast (delta pattern)

Black Hole - for absorbing unwanted output messages

Timing Blocks -  Pulse timer (a retriggerable monostable function), Turn 
On timer - when input goes HIGH, output goes high after a delay, Turn 
off timer - When input goes, LOW, output goes LOW after a delay

Clock block - provides a pulse train which can be gated on and off.

Latches and Flip flops - a two input Set / Reset gate and a Flip / Flop 
(toggle), which is able to be toggled on a HIGH or the LOW message

Counter - a simple count up block. It counts to a maximum byte value 
before cycling back to zero. It outputs current count, and a pulse when 
the maximum count is reached.

Sequencer - takes a pattern array, receives an input byte (e.g. from the 
counter) and generates 4 outputs using the input to index the pattern.

I have working code and a set of test cases.

I plan to work on some further functionality, probably moving into some 
of the analogue aspects.

Is this of any interest - I would be happy to send you the code or place 
it in the community area?

Steve



More information about the developers mailing list