Instructions

23
Game and Knowledge in Electronics-Lab
Motorcycle
sounds
19
The PROG-connections A to H are used to select
the programme. You may have come across it
accidentally: Nothing happens if you change the
programme while the micro-controller is running.
A new wire connection is only effective if you
interrupt the power and then insert the cable in the
connector BAT+ of the battery compartment.
But what exactly happens when a programme
is selected? Are the connectors A to H inputs or
outputs? And why is it possible to select so many
programmes with only eight connectors? The
programme can define each connector as input or as
an output. At first, the micro-controller starts a test run,
during which it determines where a cable connection
exists. To do this, it defines each connector briefly
as output and switches it on. The other connectors
are defined as inputs. If one of them has a voltage,
the cable connection was found. The corresponding
programme can then be started with this information.
Because each programme runs in an endless loop,
the programme inputs are no longer considered.
A new query is only started when the micro-controller
is restarted. It is also possible to detect two cable
connections, which is sometimes used in later
projects.
Using the programme B-D, your micro-
controller generates the sound of a
motorcycle engine. And you can change
the speed again with the knob, which is
connected between M+ and MI5 as done
before. Step on it!
MS
MS
PROG