aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/config_options.md2
-rw-r--r--docs/feature_backlight.md47
-rw-r--r--docs/getting_started_make_guide.md2
-rw-r--r--docs/hardware_avr.md4
-rw-r--r--docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md2
5 files changed, 27 insertions, 30 deletions
diff --git a/docs/config_options.md b/docs/config_options.md
index 3be294db8..d2ae56179 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -76,7 +76,7 @@ This is a C header file that is one of the first things included, and will persi
76* `#define B7_AUDIO` 76* `#define B7_AUDIO`
77 * enables audio on pin B7 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO) 77 * enables audio on pin B7 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO)
78* `#define BACKLIGHT_PIN B7` 78* `#define BACKLIGHT_PIN B7`
79 * pin of the backlight - `B5`, `B6`, `B7` and `C6` (and `D4` on ATmega32A) use hardware PWM, others use software implementation 79 * pin of the backlight
80* `#define BACKLIGHT_LEVELS 3` 80* `#define BACKLIGHT_LEVELS 3`
81 * number of levels your backlight will have (maximum 15 excluding off) 81 * number of levels your backlight will have (maximum 15 excluding off)
82* `#define BACKLIGHT_BREATHING` 82* `#define BACKLIGHT_BREATHING`
diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md
index 64c663076..2d9eea67b 100644
--- a/docs/feature_backlight.md
+++ b/docs/feature_backlight.md
@@ -30,32 +30,31 @@ You should then be able to use the keycodes below to change the backlight level.
30 30
31This feature is distinct from both the [RGB underglow](feature_rgblight.md) and [RGB matrix](feature_rgb_matrix.md) features as it usually allows for only a single colour per switch, though you can obviously use multiple different coloured LEDs on a keyboard. 31This feature is distinct from both the [RGB underglow](feature_rgblight.md) and [RGB matrix](feature_rgb_matrix.md) features as it usually allows for only a single colour per switch, though you can obviously use multiple different coloured LEDs on a keyboard.
32 32
33Hardware PWM is only supported on certain pins of the MCU, so if the backlighting is not connected to one of them, a software PWM implementation triggered by hardware timer interrupts will be used.
34
35Hardware PWM is supported according to the following table: 33Hardware PWM is supported according to the following table:
36 34
37| Backlight Pin | Hardware timer | 35|Backlight Pin|AT90USB64/128|ATmega16/32U4|ATmega16/32U2|ATmega32A|
38|---------------|-------------------------| 36|-------------|-------------|-------------|-------------|---------|
39|`B5` | Timer 1 | 37|`B5` |Timer 1 |Timer 1 | | |
40|`B6` | Timer 1 | 38|`B6` |Timer 1 |Timer 1 | | |
41|`B7` | Timer 1 | 39|`B7` |Timer 1 |Timer 1 |Timer 1 | |
42|`C6` | Timer 3 | 40|`C4` |Timer 3 | | | |
43|`D4` | Timer 1 (ATmega32A only)| 41|`C5` |Timer 3 | |Timer 1 | |
44| other | Software PWM | 42|`C6` |Timer 3 |Timer 3 |Timer 1 | |
45 43|`D4` | | | |Timer 1 |
46The [audio feature](feature_audio.md) also uses hardware timers. Please refer to the following table to know what hardware timer the software PWM will use depending on the audio configuration: 44|`D5` | | | |Timer 1 |
47 45
48| Audio Pin(s) | Audio Timer | Software PWM Timer | 46All other pins will use software PWM. If the [Audio](feature_audio.md) feature is disabled or only using one timer, the backlight PWM can be triggered by a hardware timer:
49|--------------|-------------|--------------------| 47
50| `C4` | Timer 3 | Timer 1 | 48|Audio Pin|Audio Timer|Software PWM Timer|
51| `C5` | Timer 3 | Timer 1 | 49|---------|-----------|------------------|
52| `C6` | Timer 3 | Timer 1 | 50|`C4` |Timer 3 |Timer 1 |
53| `B5` | Timer 1 | Timer 3 | 51|`C5` |Timer 3 |Timer 1 |
54| `B6` | Timer 1 | Timer 3 | 52|`C6` |Timer 3 |Timer 1 |
55| `B7` | Timer 1 | Timer 3 | 53|`B5` |Timer 1 |Timer 3 |
56| `Bx` & `Cx` | Timer 1 & 3 | None | 54|`B6` |Timer 1 |Timer 3 |
57 55|`B7` |Timer 1 |Timer 3 |
58When all timers are in use for [audio](feature_audio.md), the backlight software PWM will not use a hardware timer, but instead will be triggered during the matrix scan. In this case the backlight doesn't support breathing and might show lighting artifacts (for instance flickering), because the PWM computation might not be called with enough timing precision. 56
57When both timers are in use for Audio, the backlight PWM will not use a hardware timer, but will instead be triggered during the matrix scan. In this case, breathing is not supported, and the backlight might flicker, because the PWM computation may not be called with enough timing precision.
59 58
60## Configuration 59## Configuration
61 60
diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md
index 75eafd42c..4fe3f184d 100644
--- a/docs/getting_started_make_guide.md
+++ b/docs/getting_started_make_guide.md
@@ -83,7 +83,7 @@ This allows the keyboard to tell the host OS that up to 248 keys are held down a
83 83
84`BACKLIGHT_ENABLE` 84`BACKLIGHT_ENABLE`
85 85
86This enables your backlight on Timer1 and ports B5, B6, or B7 (for now). You can specify your port by putting this in your `config.h`: 86This enables the in-switch LED backlighting. You can specify the backlight pin by putting this in your `config.h`:
87 87
88 #define BACKLIGHT_PIN B7 88 #define BACKLIGHT_PIN B7
89 89
diff --git a/docs/hardware_avr.md b/docs/hardware_avr.md
index 7c28ab6db..c6987d1bd 100644
--- a/docs/hardware_avr.md
+++ b/docs/hardware_avr.md
@@ -125,7 +125,7 @@ To configure a keyboard where each switch is connected to a separate pin and gro
125 125
126### Backlight Configuration 126### Backlight Configuration
127 127
128By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are using one of those you can simply enable it here. For more details see the [Backlight Documentation](feature_backlight.md). 128QMK supports backlighting on most GPIO pins. A select few of these can be driven by the MCU in hardware. For more details see the [Backlight Documentation](feature_backlight.md).
129 129
130```c 130```c
131#define BACKLIGHT_PIN B7 131#define BACKLIGHT_PIN B7
@@ -134,8 +134,6 @@ By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are us
134#define BREATHING_PERIOD 6 134#define BREATHING_PERIOD 6
135``` 135```
136 136
137?> You can use backlighting on any pin you like, but you will have to do more work to support that. See the [Backlight Documentation](feature_backlight.md) for more details.
138
139### Other Configuration Options 137### Other Configuration Options
140 138
141There are a lot of features that can be configured or tuned in `config.h`. You should see the [Config Options](config_options.md) page for more details. 139There are a lot of features that can be configured or tuned in `config.h`. You should see the [Config Options](config_options.md) page for more details.
diff --git a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md
index 979eafbc8..bce9f9dc9 100644
--- a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md
+++ b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md
@@ -34,7 +34,7 @@ For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the
34 34
35To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `DIRECT_PINS`. The mapping defines the pins of each switch in rows and columns, from left to right. Must conform to the sizes within `MATRIX_ROWS` and `MATRIX_COLS`, use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `DIODE_DIRECTION`, `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. 35To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `DIRECT_PINS`. The mapping defines the pins of each switch in rows and columns, from left to right. Must conform to the sizes within `MATRIX_ROWS` and `MATRIX_COLS`, use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `DIODE_DIRECTION`, `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`.
36 36
37`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported. 37`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to.
38 38
39`BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap. 39`BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap.
40 40