qmk_firmware/assets/features_hd44780.md.-3NTUiv7.js

16 lines
24 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.B9AX-CPi.js";
const __pageData = JSON.parse('{"title":"HD44780 LCD Driver","description":"","frontmatter":{},"headers":[],"relativePath":"features/hd44780.md","filePath":"features/hd44780.md"}');
const _sfc_main = { name: "features/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-light:#6F42C1;--shiki-dark:#B392F0;"> hd44780_init</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Show blinking cursor</span></span>\n<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> hd44780_puts_P</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">PSTR</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Hello, world!</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">));</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h3 id="example-custom-character" tabindex="-1">Custom Character Definition <a class="header-anchor" href="#example-custom-character" aria-label="Permalink to &quot;Custom Character Definition {#example-custom-character}&quot;"></a></h3><p>Up to eight custom characters can be defined. This data is stored in the Character Generator RAM (CGRAM), and is not persistent across power cycles.</p><p>This example defines the QMK Psi as the first custom character. The first 16 positions in the character set are reserved for the eight custom characters duplicated.</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>Byte | 16 8 4 2 1</span></span>\n<span class="line"><span> 1 | x x x ■ □ ■ □ ■</span></span>\n<span class="line"><span> 2 | x x x ■ □ ■ □ ■</span></span>\n<span class="line"><span> 3 | x x x ■ □ ■ □ ■</span></span>\n<span class="line"><span> 4 | x x x □ ■ ■ ■ □</span></span>\n<span class="line"><span> 5 | x x x □ □ ■ □ □</span></span>\n<span class="line"><span> 6 | x x x □ □ ■ □ □</span></span>\n<span class="line"><span> 7 | x x x □ □ ■ □ □</span></span>\n<span class="line"><span> 8 | x x x □ □ □ □ □</span></span></code></pre></div><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;">const</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> uint8_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PROGMEM </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">psi</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">8</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">0x</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">15</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">0x</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">15</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">0x</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">15</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">0x</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0E</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">0x</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">04</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">0x</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">04</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">0x</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">04</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">0x</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">00</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> };</span></span>\n<span class="line"></span>\n<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-light:#6F42C1;--shiki-dark:#B392F0;"> hd44780_init</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>\n<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> hd44780_define_char_P</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, psi);</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Cursor is incremented while defining characters so must be reset</span></span>\n<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> hd44780_home</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 0x08 to avoid null terminator</span></span>\n<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> hd44780_puts_P</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">PSTR</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\x08</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> QMK Firmware&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">));</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="api" tabindex="-1">API <a class="header-anchor" href="#api" aria-label="Permalink to &quot;API {#api}&quot;"></a></h2><h3 id="api-hd44780-init" tabindex="-1"><code>void hd44780_init(bool cursor, bool blink)</code> <a class="header-anchor" href="#api-hd44780-init" aria-label="Permalink to &quot;`void hd44780_init(bool cursor, bool blink)` {#api-hd44780-init}&quot;"></a></h3><p>Initialize the display.</p><p>This function should be called only once, before any of the other functions can be called.</p><h4 id="api-hd44780-init-arguments" tabindex="-1">Arguments <a class="header-anchor" href="#api-hd44780-init-arguments" aria-label="Permalink to &quot;Arguments {#api-hd44780-init-arguments}&quot;"></a></h4><ul><li><code>bool cursor</code><br> Whether to show the cursor.</li><li><code>bool blink</code><br> Whether to blink the cursor, if shown.</li></ul><hr><h3 id="api-hd44780-clear" tabindex="-1"><code>void hd44780_clear(void)</code> <a class="header-anchor" href="#api-hd44780-clear" aria-label="Permalink to &quot;`void hd44780_clear(void)` {#api-hd44780-clear}&quot;"></a></h3><p>Clear the display.</p><p>This function is called on init.</p><hr><h3 id="api-hd44780-home" tabindex="-1"><code>void hd44780_home(void)</code> <a class="header-anchor" href="#api-hd44780-home" aria-label="Permalink to &quot;`void hd44780_home(void)` {#api-hd44780-home}&quot;"></a></h3><p>Move the cursor to the home position.</p><p>This function is called on init.</p><hr><h3 id="api-hd44780-on" tabindex="-1"><code>void hd44780_on(bool cursor, bool blink)</code> <a class="header-anchor" href="#api-hd44780-on" aria-label="Permalink to &quot;`void hd44780_on(bool cursor, bool blink)` {#api-hd44780-on}&quot;"></a></h3><p>Turn the display on, and/or set the cursor properties.</p><p>This function is called on init.</p><h4 id="api-hd44780-on-arguments" tabindex="-1">Arguments <a class="header-anchor" href="#api-hd44780-on-arguments" aria-label="Permalink to &quot;Arguments {#api-hd44780-on-arguments}&quot;"></a></h4><ul><li><code>bool cursor</code><br> Whether to show the cursor.</li><li><code>bool blink</code><br> Whether to blink the cursor, if shown.</li></ul><hr><h3 id="api-hd44780-off" tabindex="-1"><code>void hd44780_off(void)</code> <a class="header-anchor" href="#api-hd44780-off" aria-label="Permalink to &quot;`void hd44780_off(void)` {#api-hd44780-off}&quot;"></a></h3><p>Turn the display off.</p><hr><h3 id="api-hd44780-set-cursor" tabindex="-1"><code>void hd44780_set_cursor(uint8_t col, uint8_t line)</code> <a class="header-anchor" href="#api-hd44780-set-cursor" aria-label="Permalink to &quot;`void hd44780_set_cursor(uint8_t col, uint8_t line)` {#api-hd44780-set-cursor}&quot;"></a></h3><p>Move the cursor to the specified position on the display.</p><h4 id="api-hd44780-set-cursor-arguments" tabindex="-1">Arguments <a class="header-anchor" href="#api-hd44780-set-cursor-arguments" aria-label="Permalink to &quot;Arguments {#api-hd44780-set-cursor-arguments}&quot;"></a></h4><ul><li><code>uint8_t col</code><br> The column number to move to, from 0 to 15 on 16x2 displays.</li><li><code>bool line</code><br> The line number to move to, either 0 or 1 on 16x2 displays.</li></ul><hr><h3 id="api-hd44780-putc" tabindex="-1"><code>void hd44780_putc(char c)</code> <a class="header-anchor" href="#api-hd44780-putc" aria-label="Permalink to &quot;`void hd44780_putc(char c)` {#api-hd44780-putc}&quot;"></a></h3><p>Print a character to the display. The newline character <code>\\n</code> will move the cursor to the start of the next line.</p><p>The exact character shown may depend on the ROM code of your particular display - refer to the datasheet for the full character set.</p><h4 id="api-hd44780-putc-arguments" tabindex="-1">Arguments <a class="header-anchor" href="#api-hd44780-putc-arguments" aria-label="Permalink to &quot;Arguments {#api-hd44780-putc-arguments}&quot;"></a></h4><ul><li><code>char c</code><br> The character to print.</li></ul><hr><h3 id="api-hd44780-puts" tabindex="-1"><code>void hd44780_puts(const char *s)</code> <a class="header-anchor" href="#api-hd44780-puts" aria-label="Permalink to &quot;`void hd44780_puts(const char *s)` {#api-hd44780-puts}&quot;"></a></h3><p>Print a string of characters to the display.</p><h4 id="api-hd44780-puts-arguments" tabindex="-1">Arguments <a class="header-anchor" href="#api-hd44780-puts-arguments" aria-label="Permalink to &quot;Arguments {#api-hd44780-puts-arguments}&quot;"></a></h4><ul><li><code>const char *s</code><br> The string to print.</li></ul><hr><h3 id="api-hd44780-puts-p" tabindex="-1"><code>void hd44780_puts_P(const char *s)</code> <a class="header-anchor" href="#api-hd44780-puts-p" aria-label="Permalink to &quot;`void hd44780_puts_P(const char *s)` {#api-hd44780-puts-p}&quot;"></a></h3><p>Print a string of characters from PROGMEM to the display.</p><p>On ARM devices, this function is simply an alias of <code>hd44780_puts()</code>.</p><h4 id="api-hd44780-puts-p-arguments" tabindex="-1">Arguments <a class="header-anchor" href="#api-hd44780-puts-p-arguments" aria-label="Permalink to &quot;Arguments {#api-hd44780-puts-p-arguments}&quot;"></a></h4><ul><li><code>const char *s</code><br> The PROGMEM string to print (ie. <code>PSTR(&quot;Hello&quot;)</code>).</li></ul><hr><h3 id="api-hd44780-define-char" tabindex="-1"><code>void hd44780_define_char(uint8_t index, uint8_t *data)</code> <a class="header-anchor" href="#api-hd44780-define-char" aria-label="Permalink to &quot;`void hd44780_define_char(uint8_t index, uint8_t *data)` {#api-hd44780-define-char}&quot;"></a></h3><p>Define a custom character.</p><h4 id="api-hd44780-define-char-arguments" tabindex="-1">Arguments <a class="header-anchor" href="#api-hd44780-define-char-arguments" aria-label="Permalink to &quot;Arguments {#api-hd44780-define-char-arguments}&quot;"></a></h4><ul><li><code>uint8_t index</code><br> The index of the custom character to define, from 0 to 7.</li><li><code>uint8_t *data</code><br> An array of 8 bytes containing the 5-bit row data of the character, where the first byte is the topmost row, and the least significant bit of each byte is the rightmost column.</li></ul><hr><h3 id="api-hd44780-define-char-p" tabindex="-1"><code>void hd44780_define_char_P(uint8_t index, const uint8_t *data)</code> <a class="header-anchor" href="#api-hd44780-define-char-p" aria-label="Permalink to &quot;`void hd44780_define_char_P(uint8_t index, const uint8_t *data)` {#api-hd44780-define-char-p}&quot;"></a></h3><p>Define a custom character from PROGMEM.</p><p>On ARM devices, this function is simply an alias of <code>hd44780_define_char()</code>.</p><h4 id="api-hd44780-define-char-p-arguments" tabindex="-1">Arguments <a class="header-anchor" href="#api-hd44780-define-char-p-arguments" aria-label="Permalink to &quot;Arguments {#api-hd44780-define-char-p-arguments}&quot;"></a></h4><ul><li><code>uint8_t index</code><br> The index of the custom character to define, from 0 to 7.</li><li><code>const uint8_t *data</code><br> A PROGMEM array of 8 bytes containing the 5-bit row data of the character, where the first byte is the topmost row, and the least significant bit of each byte is the rightmost column.</li></ul><hr><h3 id="api-hd44780-busy" tabindex="-1"><code>bool hd44780_busy(void)</code> <a class="header-anchor" href="#api-hd44780-busy" aria-label="Permalink to &quot;`bool hd44780_busy(void)` {#api-hd44780-busy}&quot;"></a></h3><p>Indicates whether the display is currently processing, and cannot accept instructions.</p><h4 id="api-hd44780-busy-arguments" tabindex="-1">Return Value <a class="header-anchor" href="#api-hd44780-busy-arguments" aria-label="Permalink to &quot;Return Value {#api-hd44780-busy-arguments}&quot;"></a></h4><p><code>true</code> if the display is busy.</p><hr><h3 id="api-hd44780-write" tabindex="-1"><code>void hd44780_write(uint8_t data, bool isData)</code> <a class="header-anchor" href="#api-hd44780-write" aria-label="Permalink to &quot;`void hd44780_write(uint8_t data, bool isData)` {#api-hd44780-write}&quot;"></a></h3><p>Write a byte to the display.</p><h4 id="api-hd44780-write-arguments" tabindex="-1">Arguments <a class="header-anchor" href="#api-hd44780-write-arguments" aria-label="Permalink to &quot;Arguments {#api-hd44780-write-arguments}&quot;"></a></h4><ul><li><code>uint8_t data</code><br> The byte to send to the display.</li><li><code>bool isData</code><br> Whether the byte is an instruction or character data.</li></ul><hr><h3 id="api-hd44780-read" tabindex="-1"><code>uint8_t hd44780_read(bool isData)</code> <a class="header-anchor" href="#api-hd44780-read" aria-label="Permalink to &quot;`uint8_t hd44780_read(bool isData)` {#api-hd44780-read}&quot;"></a></h3><p>Read a byte from the display.</p><h4 id="api-hd44780-read-arguments" tabindex="-1">Arguments <a class="header-anchor" href="#api-hd44780-read-arguments" aria-label="Permalink to &quot;Arguments {#api-hd44780-read-arguments}&quot;"></a></h4><ul><li><code>bool isData</code><br> Whether to read the current cursor position, or the character at the cursor.</li></ul><h4 id="api-hd44780-read-return" tabindex="-1">Return Value <a class="header-anchor" href="#api-hd44780-read-return" aria-label="Permalink to &quot;Return Value {#api-hd44780-read-return}&quot;"></a></h4><p>If <code>isData</code> is <code>true</code>, the returned byte will be the character at the current DDRAM address. Otherwise, it will be the current DDRAM address and the busy flag.</p><hr><h3 id="api-hd44780-command" tabindex="-1"><code>void hd44780_command(uint8_t command)</code> <a class="header-anchor" href="#api-hd44780-command" aria-label="Permalink to &quot;`void hd44780_command(uint8_t command)` {#api-hd44780-command}&quot;"></a></h3><p>Send a command to the display. Refer to the datasheet and <code>hd44780.h</code> for the valid commands and defines.</p><p>This function waits for the display to clear the busy flag before sending the command.</p><h4 id="api-hd44780-command-arguments" tabindex="-1">Arguments <a class="header-anchor" href="#api-hd44780-command-arguments" aria-label="Permalink to &quot;Arguments {#api-hd44780-command-arguments}&quot;"></a></h4><ul><li><code>uint8_t command</code><br> The command to send.</li></ul><hr><h3 id="api-hd44780-data" tabindex="-1"><code>void hd44780_data(uint8_t data)</code> <a class="header-anchor" href="#api-hd44780-data" aria-label="Permalink to &quot;`void hd44780_data(uint8_t data)` {#api-hd44780-data}&quot;"></a></h3><p>Send a byte of data to the display.</p><p>This function waits for the display to clear the busy flag before sending the data.</p><h4 id="api-hd44780-data-arguments" tabindex="-1">Arguments <a class="header-anchor" href="#api-hd44780-data-arguments" aria-label="Permalink to &quot;Arguments {#api-hd44780-data-arguments}&quot;"></a></h4><ul><li><code>uint8_t data</code><br> The byte of data to send.</li></ul><hr><h3 id="api-hd44780-set-cgram-address" tabindex="-1"><code>void hd44780_set_cgram_address(uint8_t address)</code> <a class="header-anchor" href="#api-hd44780-set-cgram-address" aria-label="Permalink to &quot;`void hd44780_set_cgram_address(uint8_t address)` {#api-hd44780-set-cgram-address}&quot;"></a></h3><p>Set the CGRAM address.</p><p>This function is used when defining custom characters.</p><h4 id="api-hd44780-set-cgram-address-arguments" tabindex="-1">Arguments <a class="header-anchor" href="#api-hd44780-set-cgram-address-arguments" aria-label="Permalink to &quot;Arguments {#api-hd44780-set-cgram-address-arguments}&quot;"></a></h4><ul><li><code>uint8_t address</code><br> The CGRAM address to move to, from <code>0x00</code> to <code>0x3F</code>.</li></ul><hr><h3 id="api-hd44780-set-ddram-address" tabindex="-1"><code>void hd44780_set_ddram_address(uint8_t address)</code> <a class="header-anchor" href="#api-hd44780-set-ddram-address" aria-label="Permalink to &quot;`void hd44780_set_ddram_address(uint8_t address)` {#api-hd44780-set-ddram-address}&quot;"></a></h3><p>Set the DDRAM address.</p><p>This function is used when printing characters to the display, and setting the cursor.</p><h4 id="api-hd44780-set-ddram-address-arguments" tabindex="-1">Arguments <a class="header-anchor" href="#api-hd44780-set-ddram-address-arguments" aria-label="Permalink to &quot;Arguments {#api-hd44780-set-ddram-address-arguments}&quot;"></a></h4><ul><li><code>uint8_t address</code><br> The DDRAM address to move to, from <code>0x00</code> to <code>0x7F</code>.</li></ul>', 117);
const _hoisted_118 = [
_hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", null, _hoisted_118);
}
const hd44780 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
__pageData,
hd44780 as default
};