qmk_firmware/assets/feature_hd44780.md.yQt2vqod.js

16 lines
24 KiB
JavaScript
Raw Normal View History

import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.DyMmIvSC.js";
const __pageData = JSON.parse('{"title":"HD44780 LCD Driver","description":"","frontmatter":{},"headers":[],"relativePath":"feature_hd44780.md","filePath":"feature_hd44780.md"}');
const _sfc_main = { name: "feature_hd44780.md" };
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="hd44780-lcd-driver" tabindex="-1">HD44780 LCD Driver <a class="header-anchor" href="#hd44780-lcd-driver" aria-label="Permalink to &quot;HD44780 LCD Driver {#hd44780-lcd-driver}&quot;"></a></h1><h2 id="supported-hardware" tabindex="-1">Supported Hardware <a class="header-anchor" href="#supported-hardware" aria-label="Permalink to &quot;Supported Hardware {#supported-hardware}&quot;"></a></h2><p>LCD modules using <a href="https://www.sparkfun.com/datasheets/LCD/HD44780.pdf" target="_blank" rel="noreferrer">HD44780U</a> IC or equivalent, communicating in 4-bit mode.</p><table><thead><tr><th>Module</th><th>Size</th><th>Notes</th></tr></thead><tbody><tr><td>1602A</td><td>16x2, 5x8 dots</td><td></td></tr><tr><td>2004A</td><td>20x4, 5x8 dots</td><td>Untested, not currently supported</td></tr></tbody></table><p>To run these modules at 3.3V, an additional MAX660 voltage converter IC must be soldered on, along with two 10µF capacitors. See <a href="https://www.codrey.com/electronic-circuits/hack-your-16x2-lcd/" target="_blank" rel="noreferrer">this page</a> for more details.</p><h2 id="usage" tabindex="-1">Usage <a class="header-anchor" href="#usage" aria-label="Permalink to &quot;Usage {#usage}&quot;"></a></h2><p>Add the following to your <code>rules.mk</code>:</p><div class="language-make vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">make</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">HD44780_ENABLE = yes</span></span></code></pre></div><h2 id="basic-configuration" tabindex="-1">Basic Configuration <a class="header-anchor" href="#basic-configuration" aria-label="Permalink to &quot;Basic Configuration {#basic-configuration}&quot;"></a></h2><p>Add the following to your <code>config.h</code>:</p><table><thead><tr><th>Define</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>HD44780_DATA_PINS</code></td><td><em>Not defined</em></td><td>(Required) An array of four GPIO pins connected to the display&#39;s D4-D7 pins, eg. <code>{ B1, B3, B2, B6 }</code></td></tr><tr><td><code>HD44780_RS_PIN</code></td><td><em>Not defined</em></td><td>(Required) The GPIO connected to the display&#39;s RS pin</td></tr><tr><td><code>HD44780_RW_PIN</code></td><td><em>Not defined</em></td><td>(Required) The GPIO connected to the display&#39;s RW pin</td></tr><tr><td><code>HD44780_E_PIN</code></td><td><em>Not defined</em></td><td>(Required) The GPIO connected to the display&#39;s E pin</td></tr><tr><td><code>HD44780_DISPLAY_COLS</code></td><td><code>16</code></td><td>The number of visible characters on a single line of the display</td></tr><tr><td><code>HD44780_DISPLAY_LINES</code></td><td><code>2</code></td><td>The number of visible lines on the display</td></tr><tr><td><code>HD44780_WRAP_LINES</code></td><td><em>Not defined</em></td><td>If defined, input characters will wrap to the next line</td></tr></tbody></table><h2 id="examples" tabindex="-1">Examples <a class="header-anchor" href="#examples" aria-label="Permalink to &quot;Examples {#examples}&quot;"></a></h2><h3 id="example-hello-world" tabindex="-1">Hello World <a class="header-anchor" href="#example-hello-world" aria-label="Permalink to &quot;Hello World {#example-hello-world}&quot;"></a></h3><p>Add the following to your <code>keymap.c</code>:</p><div class="language-c vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> keyboard_post_init_user</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">void</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>\n<span class="line"><span style="--shiki
const _hoisted_118 = [
_hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", null, _hoisted_118);
}
const feature_hd44780 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
__pageData,
feature_hd44780 as default
};