16
6.3
A crash course in Binary Coded Decimal
You can skim over this section if you already know about Binary Coded Decimal.
You have 4 switches in the 4-way DIP switch. Each switch can be either on or off. If it
is on, the weight is 8, 4, 2 or 1 as indicated by the silk screen printed legend on the
ProgRock PCB. Unfortunately the actual red switch is only labelled “1 2 3 4” and you
will have to ignore that.
To make a number, you switch the required switches to “on” that add up to the
required number.
For example, the switch configuration to (above-right)
means “6”, because the “4” switch and the “2” switch
are the only switches which are “on”, and 4 + 2 = 6.
The table below shows the switch configurations for digits 0 to 9, for your reference.
Note the two special codes, which represent “Cancel” and “Enter”. (These are hexadecimal E and F
respectively, if you want to consider them this way).
If
you configure the switch for the “Cancel” command and press the button, then the current number entry
is cancelled.