5.2 Joystick
The kit has an analog joystick with 8 measureable positions. This joystick is connected to the EFM8 on the P1.7 pin and uses different
resistor values to create voltages measurable by the ADC0.
Figure 5.2. Joystick
Table 5.1. Joystick Resistor Combinations
Direction
Resistors Combinations (kΩ)
Expected UIF_JOYSTICK Voltage (V)
Center press
0.1
0.1 + 10
0.033
Up (N)
60.4
60.4 + 10
2.831
Up-Right (NE)
(
N
//
E
)
(
N
//
E
) + 10
=
21.34
21.34 + 10
2.247
Right (E)
33
33 + 10
2.533
Down-Right (SE)
(
S
//
E
)
(
S
//
E
) + 10
=
7.67
7.67 + 10
1.433
Down (S)
10
10 + 10
1.650
Down-Left (SW)
(
S
//
W
)
(
S
//
W
) + 10
=
6
6 + 10
1.238
Left (W)
15
15 + 10
1.980
Up-Left (NW)
(
N
//
W
)
(
N
//
W
) + 10
=
12.01
12.01 + 10
1.801
Note:
1. These calculated values assume a VMCU of 3.3 V.
UG238: EFM8SB2-SLSTK2011A User's Guide
Peripherals
silabs.com
| Building a more connected world.
Rev. 0.3 | 8