opensteno_qmk/docs
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
..
gitbook/images
zh
.nojekyll
_summary.md [Docs] Smallish overhaul of the docs (#5281) 2019-03-18 14:22:02 -07:00
arm_debugging.md
becoming_a_qmk_collaborator.md
CNAME
compatible_microcontrollers.md
config_options.md Change split_common to use RGBLIGHT_SPLIT (#5509) 2019-04-19 15:25:08 -07:00
contributing.md Update our style guide (#5500) 2019-04-18 15:59:51 -07:00
custom_quantum_functions.md Custom Tapping Term per key (#5009) 2019-04-05 15:47:25 -04:00
documentation_best_practices.md
documentation_templates.md
faq.md
faq_build.md [Docs] Add udev rule for Input Club bootloaders (#5494) 2019-03-27 08:42:03 -07:00
faq_debug.md
faq_general.md
faq_keymap.md Replace instances of KEYMAP with LAYOUT 2019-02-21 23:19:26 -08:00
feature_advanced_keycodes.md [Docs] Add Tap Dance example to the docs (#5326) 2019-03-07 12:30:02 -08:00
feature_audio.md [Docs] Add music_map to audio documentation (#5419) 2019-03-18 14:20:30 -07:00
feature_auto_shift.md
feature_backlight.md Fix #3566 use an hardware timer for software PWM stability (#3615) 2019-04-22 08:34:13 -07:00
feature_bluetooth.md
feature_bootmagic.md [Docs] Bootmagic Lite Caveat (#5069) 2019-02-06 16:43:47 -08:00
feature_combo.md Remove caveat about combos with shared keys (#5601) 2019-04-10 18:36:05 -07:00
feature_command.md Change Command keycode defaults to match corresponding Bootmagic codes (#5078) 2019-02-17 22:23:32 -08:00
feature_debounce_type.md Eager Per Row Debouncing added (added to Ergodox) (#5498) 2019-04-03 14:45:55 -07:00
feature_dynamic_macros.md
feature_encoders.md Improve Encoder documentation (#5130) 2019-02-14 21:00:57 -08:00
feature_grave_esc.md Document an annoyance with Grave Escape and macOS Terminal (#5483) 2019-03-24 17:11:26 -07:00
feature_haptic_feedback.md Haptic feedback generalized - DRV2605 and solenoids (#4939) 2019-02-16 18:39:30 -08:00
feature_hd44780.md
feature_key_lock.md
feature_layouts.md Add a mechanism for force building a particular community layout (#5027) 2019-02-14 20:14:26 -08:00
feature_leader_key.md
feature_led_matrix.md Add documentation for led matrix 2019-02-10 15:37:12 -08:00
feature_macros.md [Docs] Adding Alt↯Tab example macro (#5616) 2019-04-14 11:32:11 -07:00
feature_mouse_keys.md Update mouse keys docs (#5653) 2019-04-19 23:18:06 -07:00
feature_oled_driver.md Fixing readme from feedback 2019-04-20 08:05:10 -07:00
feature_pointing_device.md
feature_ps2_mouse.md
feature_rgb_matrix.md Define RGB colors (#5300) 2019-04-22 08:26:41 -07:00
feature_rgblight.md Define RGB colors (#5300) 2019-04-22 08:26:41 -07:00
feature_space_cadet_shift.md Improvements to Space Cadet Shift (#3856) 2019-02-05 10:36:26 -08:00
feature_space_cadet_shift_enter.md
feature_stenography.md
feature_swap_hands.md
feature_tap_dance.md [Docs] Add Tap Dance example to the docs (#5326) 2019-03-07 12:30:02 -08:00
feature_terminal.md
feature_thermal_printer.md
feature_unicode.md [Docs] Add note about using Unicode Hex Input (#5248) 2019-02-28 12:15:38 -08:00
feature_userspace.md [Docs] Update the KC_MAKE example in Userspace docs (#5337) 2019-03-08 07:56:08 -08:00
feature_velocikey.md Velocikey: Match RGB animation speed to typing speed (#3754) 2019-02-21 07:22:46 -08:00
features.md Add LED Matrix to Features list for easy reference (#5280) 2019-03-03 15:29:29 -08:00
flashing.md Fix link to Caterina bootloader hex files (#5452) 2019-03-20 07:43:20 -07:00
fuse.txt
getting_started_build_tools.md Revert "Update build instructions and docker file to download submodules" (#5533) 2019-04-10 14:15:51 -07:00
getting_started_getting_help.md
getting_started_github.md
getting_started_introduction.md
getting_started_make_guide.md Clean up debounce a bit (#5255) 2019-03-04 07:44:46 -08:00
getting_started_vagrant.md
hand_wire.md Add more "decent" text editors (#5308) 2019-03-05 07:31:54 -08:00
hardware.md
hardware_avr.md Port DIRECT_PINS from split_common/matrix.c to matrix.c (#5091) 2019-04-11 11:51:55 -07:00
hardware_drivers.md OLED Driver Feature 2019-04-20 08:05:10 -07:00
hardware_keyboard_guidelines.md Clarify LAYOUT vs LAYOUT_all 2019-02-08 15:13:20 -08:00
how_keyboards_work.md Fix ascii art (#5407) 2019-03-14 14:18:11 -07:00
i2c_driver.md Next set of split_common changes (#4974) 2019-03-12 10:23:28 -07:00
index.html
internals_defines.md
internals_gpio_control.md
internals_input_callback_reg.md
internals_midi_device.md
internals_midi_device_setup_process.md
internals_midi_util.md
internals_send_functions.md
internals_sysex_tools.md
isp_flashing_guide.md ISP Flashing Guide - atmega32a info (#4993) 2019-03-22 18:26:21 -07:00
keycodes.md Add C(), A() and G() to match already existing S() (#4673) 2019-01-25 13:12:48 -08:00
keycodes_basic.md
keycodes_us_ansi_shifted.md
keymap.md [Docs] Smallish overhaul of the docs (#5281) 2019-03-18 14:22:02 -07:00
LANGS.md
newbs.md Contribute the MechMerlin QMK Configurator docs (#4986) 2019-01-28 17:31:33 -08:00
newbs_best_practices.md
newbs_building_firmware.md
newbs_building_firmware_configurator.md Contribute the MechMerlin QMK Configurator docs (#4986) 2019-01-28 17:31:33 -08:00
newbs_flashing.md [Docs] Smallish overhaul of the docs (#5281) 2019-03-18 14:22:02 -07:00
newbs_getting_started.md [Docs] Recursively clone qmk_firmware repo (#5378) 2019-03-18 14:22:33 -07:00
newbs_learn_more_resources.md
newbs_testing_debugging.md Add docs on using keyboard_post_init_user to enable debug modes 2019-02-16 21:20:18 -08:00
other_eclipse.md [Docs] Add VSCode guide to docs (#5124) 2019-03-15 14:34:58 -07:00
other_vscode.md [Docs] Add VSCode guide to docs (#5124) 2019-03-15 14:34:58 -07:00
porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md Port DIRECT_PINS from split_common/matrix.c to matrix.c (#5091) 2019-04-11 11:51:55 -07:00
power.txt
proton_c_conversion.md
qmk.css
quantum_keycodes.md
README.md
redirects.json
ref_functions.md
reference_configurator_support.md
reference_glossary.md
reference_info_json.md Add label to the info.json reference 2019-02-08 15:13:20 -08:00
sidebar.css
support.md
sw.js
understanding_qmk.md [Docs] Smallish overhaul of the docs (#5281) 2019-03-18 14:22:02 -07:00
unit_testing.md
usb_nkro.txt

Quantum Mechanical Keyboard Firmware

Current Version Build Status Discord Docs Status GitHub contributors GitHub forks

What is QMK Firmware?

QMK (Quantum Mechanical Keyboard) is an open source community that maintains QMK Firmware, QMK Toolbox, qmk.fm, and these docs. QMK Firmware is a keyboard firmware based on the tmk_keyboard with some useful features for Atmel AVR controllers, and more specifically, the OLKB product line, the ErgoDox EZ keyboard, and the Clueboard product line. It has also been ported to ARM chips using ChibiOS. You can use it to power your own hand-wired or custom keyboard PCB.

How to Get It

If you plan on contributing a keymap, keyboard, or features to QMK, the easiest thing to do is fork the repo through Github, and clone your repo locally to make your changes, push them, then open a Pull Request from your fork.

Otherwise, you can either download it directly (zip, tar), or clone it via git (git@github.com:qmk/qmk_firmware.git), or https (https://github.com/qmk/qmk_firmware.git).

How to Compile

Before you are able to compile, you'll need to install an environment for AVR or/and ARM development. Once that is complete, you'll use the make command to build a keyboard and keymap with the following notation:

make planck/rev4:default

This would build the rev4 revision of the planck with the default keymap. Not all keyboards have revisions (also called subprojects or folders), in which case, it can be omitted:

make preonic:default

How to Customize

QMK has lots of features to explore, and a good deal of reference documentation to dig through. Most features are taken advantage of by modifying your keymap, and changing the keycodes.