Subject:
|
Re: Crazy idea - analog computer
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Tue, 2 Nov 2004 23:04:03 GMT
|
Viewed:
|
1089 times
|
| |
| |
In lugnet.robotics Steve Baker wrote:
> Analog computers tend to be either hard or impossible to 'program' - so they
> are generally 'fixed function' - they do one thing and one thing only and in
> these modern times, they are rather un-interesting and tend to be relegated
> to museums.
I agree with that. Analog computers dont allow to have "states". Meaning they
cannot fall into another action, after input condition(s) has changed, e.g. a
bumper fired.
A state is thought as a kind of memory of the robot. He knows, instructed by its
digital program, in which state he has been before, and can decide on input
conditions, which state to take next. Thats basicly a digital control machines
function.
> I suppose you could build Lego Analog computers to calculate more difficult
> things - perhaps up to the complexity of the Meccano Differential Analyser.
> But the real, serious, interesting and impressive challenge would be to
> build a programmable digital computer from Lego mechanical parts.
Imagine, you have a digital counter. He is clocked by a digital clocking cirquit
and the counter will run through the well known binary code, counting from zero
to maximum and then start from zero again, counting up again, as long as the
clock circuit supplies clock signals. What he endlessly will do, as long as you
add power to it.
Imagine next, you connect the address input of a Read Only Memory (ROM) to the
binary output of the counter. As the counter cycles through the addresses of the
ROM, he will show all the binary images, one after the other, controlled by
clock speed, he has stored in its storage words.
Now comes the intelligent part. (This is not my invention, its known digital
technique, called a "Micro Program Machine").
Imagine you split the ROM data output word into two parts, called "operation
code" and "operand". The operation code is supplied into the selecting inputs of
a digital multiplexer. The multiplexers output is supplied into the load input
of the counter. The counter gets the operand part of the ROM output word as
input. He will load it into the counter, when the load input of the counter
fires. So we will realise a non-conditional and some conditional jumps.
It is essential to understand, that the counter must have a syncronous load
input. Syncronous to the clock input.
This counter we call "Program Counter" now. Our multiplexer is the command
decoder, decoding "operation code" (OpCode) commands.
Using an 8 Bit Input Multiplexer we could have the following Program Commands:
OpCode Command
000 MOVE OUT Operand
001 GOTO Operand
010 IF input1 THEN GOTO Operand
011 IF input2 THEN GOTO Operand
100 IF input3 THEN GOTO Operand
101 IF input4 THEN GOTO Operand
110 IF input5 THEN GOTO Operand
111 IF input6 THEN GOTO Operand
And the following ROM data word (Program Instruction) structure, where the
operand is 6 bit wide:
+--------------------------+
| OpCode | Operand | a nine bit
| | | | | | | | | | ROM storage word
+--+--+--+--+--+--+--+--+--+
An output register catches the MOVE OUT Operand:
+------------+
| |
V |
+--------+-------+ |
LOAD | | |
+------->+ COUNTER | |
| | | |
| +--------+-------+ |
| | |
| | 6 bit addr |
| V | 6 bit operand
+-----+----+ +--------+-------+ |
| OUT | | ADDRESS IN | |
input6 -->| 7 | | | |
input5 -->| 6 | | | |
input4 -->| 5 | | | | ROM :
input3 -->| 4 MUX | | ROM | | 2^6 = 64 Memory words
input2 -->| 3 | | | | of nine bits
input1 -->| 2 | | | |
1 -->| 1 | | | |
0 -->| 0 | | | |
| IN | | DATA OUT | |
+-----+----+ +---+------+-----+ |
^ | | |
| | | |
+------------+ +----------+
3 bit opcode | |
V V
+-----+------+------+
| output register |
+---------+---------+
|
V
output bits
counter and output register is supplied with a clock and a reset signal. The
latter one indicating power on and writing all zeros into the registers.
This is a digital electronic machine. Build from digital integrated circuits. I
dont think, you can build it in LEGO mechanical nature. Due to the nature of the
clock signal. You could build an asyncronous digital structure, that has no
clock signal, like a set/reset flip-flop. But that does not help you either. Or
i might wonder.
The ROM could be thought as a JUMPER-ROM. Made from jumpers used to configure
hardware in PCs. Each jumper is a single bit. The whole would form an ideal
education machine as ...
... you have to do the job of assembling the bits, performing your program,
manually. You can feel, what a software language assembler does.
Imagine the following program. It solves the problem of a simple switch. If the
input1 switch is switched, the machine will switch a motor on, by setting the
appropriate bit, you will find out here:
adr opcode operand Command Comment
0 000 000000 MOVE OUT 000000 we mistreat the reset cirquitry
1 010 000100 IF input1 GOTO 4
2 000 000000 MOVE OUT 000000 output motor off
3 001 000001 GOTO 1
4 000 010000 MOVE OUT 010000 output motor on
5 001 000001 GOTO 1
After power is switched on, the machine starts executing commands from address
location zero on. You can see two states in this program. One, where the machine
outputs a Motor Off, and one, where it outputs a Motor On. Depending on the
state of the input switch. A memory behavior is not involved, in this easieast
case. It could be, if you make some more program steps.
greetings
Ralph
|
|
1 Message in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|