piclist 1999\10\13\202049a >
Thread: What's in the train? The whole story.
www.piclist.com/techref/index.htm?key=whats+train+whole
flavicon
picon face BY : Thomas Brandon email (remove spam text)



I would have thought something along this lines was more efficient. If only
due to the fact every block has intelligence. If all it's doing is passing
messages that's a bit of smarts not being used. The other advantage is as
was stated, the equals block has to have ALL the logic. i.e. if you add say
a multiplication block, it will only work with equals blocks aware of the
existence of the multiplication block. However, if it is the multiplication
block that knows what multiplication is then all the equals block needs to
know is that some other block will give it data (2 blocks I guess). It
slightly depends on what happens. If they connect say 3 + 4 = 5, what
happens, does a red light on the equals block light?

Having an expression tree style process will reduce alot of complexity as
well. For instance a X - Y = Z sequence, with all intelligence in the equals
block, it needs to determine the exact order, to know whether to do X - Y or
Y - X, it then needs to know how to do X - Y. However, if the minus block
has this intelligence, it just knows it subtracts the block to the left from
the block to the right. You'd need bidirectional communication so the minus
block could find out about the Y block but that was on the cards any way. In
the above example, a pulse would be passed from the initiating block (i.e.
the kid pushes a button on the equals block (or the equals block detects a
block on each side (I'd say press a button to allow parent\child interaction
etc "Are you sure 4 + 5 = 8?"))) down the chain.
The euals block would send to the left, the Y block would transmit it's
value, the - block would record this value as it was one hop to the right,
it would then send a fresh message to the left, the X block would try and
send it's value to the left and find an open circuit (timeout) so it would
instead send it to the right, the minus block would record this as it's
second value as it was one hop to the left. It would then calculate X - Y
and send it right again, the Y block, not wanting input would ignore it and
not increment the hops. Hence the equals block would get 'X-Y' as a message
from one hop to the left. A similar process happens on the right hand side,
now the equals block has the evaluation of the LHS and RHS without doing any
calculation. That way the - block could be replaced with any binary op
without change to any other block.

Still not a lot of work for a PIC, but for 0.90c...

Very nice idea I must say, If I had kids I'd be pretty interested (however
at 20yrs I'm not holding my breath).

Tom.
{Original Message removed}
<066d01bf15da$411f08f0$fb255e81@tb> 7bit

See also: www.piclist.com/techref/index.htm?key=whats+train+whole
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) What's in the train? The whole story.

month overview.

new search...