Go to file
Brice Figureau b61baf4281 Fix #3566 use an hardware timer for software PWM stability (#3615)
With my XD60, I noticed that when typing the backlight was flickering.

The XD60 doesn't have the backlight wired to a hardware PWM pin.
I assumed it was a timing issue in the matrix scan that made the PWM
lit the LED a bit too longer. I verified it because the more keys that
were pressed, the more lighting I observed.

This patch makes the software PWM be called during CPU interruptions.
It works almost like the hardware PWM, except instead of using
the CPU waveform generation, the CPU will fire interruption
when the LEDs need be turned on or off.

Using the same timer system as for hardware PWM, when the counter
will reach OCRxx (the current backlight level), an Output Compare
match interrupt will be fired and we'll turn the LEDs off.
When the counter reaches its maximum value, an overflow interrupt
will be triggered in which we turn the LEDs on.
This way we replicate the hardware backlight PWM duty cycle.

This gives a better time stability of the PWM computation than pure
software PWM, leading to a flicker free backlight.

Since this is reusing the hardware PWM code, software PWM also supports
backlight breathing.

Note that if timer1 is used for audio, backlight will use timer3, and if
timer3 is used for audio backlight will use timer1.
If both timers are used for audio, then this feature is disabled and we
revert to the matrix scan based PWM computation.

Signed-off-by: Brice Figureau <brice@daysofwonder.com>
2019-04-22 08:34:13 -07:00
.github Tweak issue templates (capitalisation mostly) (#5133) 2019-02-14 20:44:27 -08:00
.vscode
docs Fix #3566 use an hardware timer for software PWM stability (#3615) 2019-04-22 08:34:13 -07:00
drivers Removed / replaced questionable logos and added licenses file for safe logos 2019-04-20 08:05:10 -07:00
keyboards added info.json for ymd96 (#4982) 2019-04-22 08:28:17 -07:00
layouts RGB Matrix Overhaul (#5372) 2019-04-02 17:24:14 -07:00
lib RGB Matrix Overhaul (#5372) 2019-04-02 17:24:14 -07:00
quantum Fix #3566 use an hardware timer for software PWM stability (#3615) 2019-04-22 08:34:13 -07:00
tests
tmk_core Init RGB Matrix EEPROM 2019-04-19 14:58:08 -07:00
users Xulkal Keymaps 2019-04-16 18:30:54 -07:00
util add -yq flags to actually make it noninteractive 2019-04-19 14:46:19 -07:00
.clang-format convert to unix line-endings [skip ci] 2019-04-18 23:23:52 +00:00
.clang_complete
.editorconfig Update our style guide (#5500) 2019-04-18 15:59:51 -07:00
.gitattributes
.gitignore
.gitmodules
.travis.yml Travis CI - skip unit tests for documentation changes (#5267) 2019-04-19 13:20:02 -07:00
CODE_OF_CONDUCT.md
Dockerfile Revert "Update build instructions and docker file to download submodules" (#5533) 2019-04-10 14:15:51 -07:00
Doxyfile
LICENSE
Makefile Shallow clone submodules. (#5279) 2019-03-08 07:58:40 -08:00
Vagrantfile Align docker and vagrant base images (#4905) 2019-03-17 10:36:59 -07:00
autocomplete.sh
book.json
bootloader.mk
build_full_test.mk
build_keyboard.mk Change split_common to use RGBLIGHT_SPLIT (#5509) 2019-04-19 15:25:08 -07:00
build_layout.mk Add a mechanism for force building a particular community layout (#5027) 2019-02-14 20:14:26 -08:00
build_test.mk
common.mk
common_features.mk OLED Driver Feature 2019-04-20 08:05:10 -07:00
doxygen-todo
license_GPLv2.md
license_GPLv3.md
license_Modified_BSD.md
message.mk build size-check enhancement (#5485) 2019-03-27 08:51:56 -07:00
readme.md
secrets.tar.enc
shell.nix
show_options.mk Clean up debounce a bit (#5255) 2019-03-04 07:44:46 -08:00
testlist.mk

readme.md

Quantum Mechanical Keyboard Firmware

Current Version Build Status Discord Docs Status GitHub contributors GitHub forks

This is a keyboard firmware based on the tmk_keyboard firmware with some useful features for Atmel AVR and ARM controllers, and more specifically, the OLKB product line, the ErgoDox EZ keyboard, and the Clueboard product line.

Documentation

The docs are hosted on Gitbook and GitHub (they are synced). You can request changes by making a fork and pull request, or by clicking the "suggest an edit" link on any page of the docs.

Supported Keyboards

The project also includes community support for lots of other keyboards.

Maintainers

QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, Hasu. The OLKB product firmwares are maintained by Jack Humbert, the Ergodox EZ by Erez Zukerman, the Clueboard by Zach White, and the Atreus by Phil Hagelberg.

Official website

http://qmk.fm is the official website of QMK, where you can find links to this page, the documentation, and the keyboards supported by QMK.