@@ -8,24 +8,24 @@ For the input this module provides a raw value as well as a debounced value.
88Debouncing is useful to avoid counting a single button press multiple times.
99For more information on contact bounce, see [ this Wikipedia page] ( https://en.wikipedia.org/wiki/Switch#Contact_bounce ) .
1010
11- | Offset | Register |
12- | --------| ----------|
13- | 0x0000 | Output |
14- | 0x0004 | Input |
15- | 0x0008 | Debounced input |
16- | 0x000C | Debounce threshold |
17- | 0x6000 | R-Pi output |
18- | 0x6004 | R-Pi input |
19- | 0x6008 | R-pi debounced input |
20- | 0x600C | R-pi debounce threshold |
21- | 0x7000 | Arduino output |
22- | 0x7004 | Arduino input |
23- | 0x7008 | Arduino debounced input |
24- | 0x700C | Arduino debounce threshold |
25- | 0x8000 | PMOD output |
26- | 0x8004 | PMOD input |
27- | 0x8008 | PMOD debounced input |
28- | 0x800C | PMOD debounce threshold |
11+ | Offset | Register |
12+ | --------| ------------------------- |
13+ | 0x0000 | Output |
14+ | 0x0004 | Input |
15+ | 0x0008 | Debounced input |
16+ | 0x000C | Output enable |
17+ | 0x0010 | R-Pi output |
18+ | 0x0014 | R-Pi input |
19+ | 0x0018 | R-pi debounced input |
20+ | 0x001C | R-pi output enable |
21+ | 0x0020 | Arduino output |
22+ | 0x0024 | Arduino input |
23+ | 0x0028 | Arduino debounced input |
24+ | 0x002C | Arduino output enable |
25+ | 0x0030 | PMOD output |
26+ | 0x0034 | PMOD input |
27+ | 0x0038 | PMOD debounced input |
28+ | 0x003C | PMOD output enable |
2929
3030## Output
3131
@@ -66,69 +66,28 @@ The only difference between the registers is that the latter has debounced signa
6666
6767The input registers are used to interact with the joystick, the button and the DIP switches that are available on the Sonata board.
6868
69- ## Debounce threshold
70-
71- ** Not implemented yet.**
72-
73- This register indicates how many clock cycles an input needs to be stable before it shows up on the output.
74- The same threshold applies to all of the inputs.
75-
76- | Bit offset | Description |
77- | ------------| -------------|
78- | 31-0 | Threshold |
79-
8069## Raspberry Pi HAT
8170
82- The Raspberry Pi HAT header has 11 GPIO pins.
71+ The Raspberry Pi HAT header has 27 pins that can act as GPIO.
72+ Some can be remapped to other IP blocks (see Pinmux).
8373When writing, it only writes the bits for which the output is set to enable.
8474The input and output registers have the same bit mapping.
8575
8676| Bit offset | Description |
8777| ------------| -------------|
88- | 10 | GPIO 27 |
89- | 9 | GPIO 26 |
90- | 8 | GPIO 25 |
91- | 7 | GPIO 24 |
92- | 6 | GPIO 23 |
93- | 5 | GPIO 22 |
94- | 4 | GPIO 13 |
95- | 3 | GPIO 12 |
96- | 2 | GPIO 6 |
97- | 1 | GPIO 5 |
98- | 0 | GPIO 4 |
99-
100- For the output register it is teh same order as above:
101- | Bit offset | Description |
102- | ------------| -------------|
103- | 26-16 | Output enable |
104- | 10-0 | Output value |
78+ | 27-0 | g27 - g0 |
10579
10680When the output enable is set to zero it instead acts as an input pin.
10781
10882## Arduino Shield
10983
110- The Arduino Shield header has 10 GPIO pins.
84+ The Arduino Shield header has 17 pins that can act as GPIO .
11185When writing, it only writes the bits for which the output is set to enable.
11286The input and output registers have the same bit mapping.
11387
114- | Bit offset | Description |
115- | ------------| -------------|
116- | 9 | GPIO 9 |
117- | 8 | GPIO 8 |
118- | 7 | GPIO 7 |
119- | 6 | GPIO 6 |
120- | 5 | GPIO 5 |
121- | 4 | GPIO 4 |
122- | 3 | GPIO 3 |
123- | 2 | GPIO 2 |
124- | 1 | GPIO 1 |
125- | 0 | GPIO 0 |
126-
127- For the output register it is teh same order as above:
128- | Bit offset | Description |
129- | ------------| -------------|
130- | 25-16 | Output enable |
131- | 9-0 | Output value |
88+ | Bit offset | Description |
89+ | ------------| --------------|
90+ | 17-0 | GPIO 17 to 0 |
13291
13392When the output enable is set to zero it instead acts as an input pin.
13493
@@ -143,10 +102,4 @@ The input and output registers have the same bit mapping.
143102| 15-8 | PMOD 1 |
144103| 7-0 | PMOD 0 |
145104
146- For the output register it is teh same order as above:
147- | Bit offset | Description |
148- | ------------| -------------|
149- | 31-16 | Output enable |
150- | 15-0 | Output value |
151-
152105When the output enable is set to zero it instead acts as an input pin.
0 commit comments