<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.ethersex.de/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Michaelb</id>
		<title>Ethersex_Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://www.ethersex.de/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Michaelb"/>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php/Special:Contributions/Michaelb"/>
		<updated>2026-05-25T05:07:36Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1788</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1788"/>
				<updated>2017-01-21T16:18:40Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
== Supported LC-Displays ==&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|text top|HD44780 module test]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Displaytech 404b charconv.jpg|thumb|400px|right|text top|Displaytech 404b 4x40 LCD with output of ECMD lcd print charset 0 128 and selected HD44780_Compat charset conversion]]&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
== Pinning ==&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimming potentiometer that allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection for the LCD: '''Direct''', '''I2C''', '''Serial''' and '''2-Wire'''.&lt;br /&gt;
&lt;br /&gt;
=== Direct ===&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== I2C ===&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin connected to the PCF8574x instead of the backlight control pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection from the PCF8574x to the 16 pin header to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the BL pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
Connection type I2C is Readback-capable with both types of I2C Port Expanders.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl HD44780 LCD to I2C Port Expander mapping&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Serial (using 74HCT164) ===&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2-Wire (using 74HCT4094) ===&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.sparkfun.com/datasheets/LCD/HD44780.pdf Original HD44780 Datasheet at sparkfun]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller wikipedia:Hitachi_HD44780_LCD_controller]&lt;br /&gt;
* [https://www.mikrocontroller.net/articles/HD44780 mikrocontroller.net:HD44780]&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1786</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1786"/>
				<updated>2016-12-09T23:53:48Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* I2C */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS AND REFLECTS UPCOMING CHANGES'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
== Supported LC-Displays ==&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|text top|HD44780 module test]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Displaytech 404b charconv.jpg|thumb|400px|right|text top|Displaytech 404b 4x40 LCD with output of ECMD lcd print charset 0 128 and selected HD44780_Compat charset conversion]]&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
== Pinning ==&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimming potentiometer that allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection for the LCD: '''Direct''', '''I2C''', '''Serial''' and '''2-Wire'''.&lt;br /&gt;
&lt;br /&gt;
=== Direct ===&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== I2C ===&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin connected to the PCF8574x instead of the backlight control pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection from the PCF8574x to the 16 pin header to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the BL pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
Connection type I2C is Readback-capable with both types of I2C Port Expanders.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl HD44780 LCD to I2C Port Expander mapping&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Serial (using 74HCT164) ===&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2-Wire (using 74HCT4094) ===&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.sparkfun.com/datasheets/LCD/HD44780.pdf Original HD44780 Datasheet at sparkfun]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller wikipedia:Hitachi_HD44780_LCD_controller]&lt;br /&gt;
* [https://www.mikrocontroller.net/articles/HD44780 mikrocontroller.net:HD44780]&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1785</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1785"/>
				<updated>2016-12-09T23:51:15Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* I2C */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS AND REFLECTS UPCOMING CHANGES'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
== Supported LC-Displays ==&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|text top|HD44780 module test]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Displaytech 404b charconv.jpg|thumb|400px|right|text top|Displaytech 404b 4x40 LCD with output of ECMD lcd print charset 0 128 and selected HD44780_Compat charset conversion]]&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
== Pinning ==&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimming potentiometer that allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection for the LCD: '''Direct''', '''I2C''', '''Serial''' and '''2-Wire'''.&lt;br /&gt;
&lt;br /&gt;
=== Direct ===&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== I2C ===&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection from the PCF8574x to the 16 pin header to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the BL pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
Connection type I2C is Readback-capable with both types of I2C Port Expanders.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl HD44780 LCD to I2C Port Expander mapping&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Serial (using 74HCT164) ===&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2-Wire (using 74HCT4094) ===&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.sparkfun.com/datasheets/LCD/HD44780.pdf Original HD44780 Datasheet at sparkfun]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller wikipedia:Hitachi_HD44780_LCD_controller]&lt;br /&gt;
* [https://www.mikrocontroller.net/articles/HD44780 mikrocontroller.net:HD44780]&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1784</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1784"/>
				<updated>2016-12-09T23:48:22Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS AND REFLECTS UPCOMING CHANGES'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
== Supported LC-Displays ==&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|text top|HD44780 module test]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Displaytech 404b charconv.jpg|thumb|400px|right|text top|Displaytech 404b 4x40 LCD with output of ECMD lcd print charset 0 128 and selected HD44780_Compat charset conversion]]&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
== Pinning ==&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimming potentiometer that allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection for the LCD: '''Direct''', '''I2C''', '''Serial''' and '''2-Wire'''.&lt;br /&gt;
&lt;br /&gt;
=== Direct ===&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== I2C ===&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the BL pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
Connection type I2C is Readback-capable with both types of I2C Port Expanders.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl HD44780 LCD to I2C Port Expander mapping&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Serial (using 74HCT164) ===&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2-Wire (using 74HCT4094) ===&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.sparkfun.com/datasheets/LCD/HD44780.pdf Original HD44780 Datasheet at sparkfun]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller wikipedia:Hitachi_HD44780_LCD_controller]&lt;br /&gt;
* [https://www.mikrocontroller.net/articles/HD44780 mikrocontroller.net:HD44780]&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1783</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1783"/>
				<updated>2016-12-09T23:46:48Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* Pinning */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
== Supported LC-Displays ==&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|text top|HD44780 module test]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Displaytech 404b charconv.jpg|thumb|400px|right|text top|Displaytech 404b 4x40 LCD with output of ECMD lcd print charset 0 128 and selected HD44780_Compat charset conversion]]&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
== Pinning ==&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimming potentiometer that allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection for the LCD: '''Direct''', '''I2C''', '''Serial''' and '''2-Wire'''.&lt;br /&gt;
&lt;br /&gt;
=== Direct ===&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== I2C ===&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the BL pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
Connection type I2C is Readback-capable with both types of I2C Port Expanders.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl HD44780 LCD to I2C Port Expander mapping&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Serial (using 74HCT164) ===&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2-Wire (using 74HCT4094) ===&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.sparkfun.com/datasheets/LCD/HD44780.pdf Original HD44780 Datasheet at sparkfun]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller wikipedia:Hitachi_HD44780_LCD_controller]&lt;br /&gt;
* [https://www.mikrocontroller.net/articles/HD44780 mikrocontroller.net:HD44780]&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1782</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1782"/>
				<updated>2016-12-09T23:45:59Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
== Supported LC-Displays ==&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|text top|HD44780 module test]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Displaytech 404b charconv.jpg|thumb|400px|right|text top|Displaytech 404b 4x40 LCD with output of ECMD lcd print charset 0 128 and selected HD44780_Compat charset conversion]]&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
== Pinning ==&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimming potentiometer that allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection for the LCD: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
=== Direct ===&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== I2C ===&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the BL pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
Connection type I2C is Readback-capable with both types of I2C Port Expanders.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl HD44780 LCD to I2C Port Expander mapping&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Serial (using 74HCT164) ===&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2-Wire (using 74HCT4094) ===&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.sparkfun.com/datasheets/LCD/HD44780.pdf Original HD44780 Datasheet at sparkfun]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller wikipedia:Hitachi_HD44780_LCD_controller]&lt;br /&gt;
* [https://www.mikrocontroller.net/articles/HD44780 mikrocontroller.net:HD44780]&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1781</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1781"/>
				<updated>2016-12-09T23:45:02Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
== Supported LC-Displays ==&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|text top|HD44780 module test]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Displaytech 404b charconv.jpg|thumb|400px|right|text top|Displaytech 404b 4x40 LCD with output of ECMD lcd print charset 0 128 and selected HD44780_Compat charset conversion]]&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
== Pinning ==&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimming potentiometer that allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection for the LCD: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
=== Direct ===&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== I2C ===&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the BL pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
Connection type I2C is Readback-capable with both types of I2C Port Expanders.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl HD44780 LCD to I2C Port Expander mapping&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Serial (using 74HCT164) ===&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2-Wire (using 74HCT4094) ===&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
 * [https://www.sparkfun.com/datasheets/LCD/HD44780.pdf Original HD44780 Datasheet at sparkfun]&lt;br /&gt;
 * [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller wikipedia:Hitachi_HD44780_LCD_controller]&lt;br /&gt;
 * [https://www.mikrocontroller.net/articles/HD44780 mikrocontroller.net:HD44780]&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1780</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1780"/>
				<updated>2016-12-09T23:38:11Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
== Supported LC-Displays ==&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|text top|HD44780 module test]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Displaytech 404b charconv.jpg|thumb|400px|right|text top|Displaytech 404b 4x40 LCD with output of ECMD lcd print charset 0 128 and selected HD44780_Compat charset conversion]]&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
== Pinning ==&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimming potentiometer that allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection for the LCD: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
=== Direct ===&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== I2C ===&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the BL pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
Connection type I2C is Readback-capable with both types of I2C Port Expanders.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl HD44780 LCD to I2C Port Expander mapping&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Serial (using 74HCT164) ===&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2-Wire (using 74HCT4094) ===&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
[https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller wikipedia:Hitachi_HD44780_LCD_controller]&lt;br /&gt;
[https://www.mikrocontroller.net/articles/HD44780 mikrocontroller.net:HD44780]&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1779</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1779"/>
				<updated>2016-12-09T23:34:40Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
== Supported LC-Displays ==&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|text top|HD44780 module test]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Displaytech 404b charconv.jpg|thumb|400px|right|text top|Displaytech 404b 4x40 LCD with output of ECMD lcd print charset 0 128 and selected HD44780_Compat charset conversion]]&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
== Pinning ==&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimming potentiometer that allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection for the LCD: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
=== Direct ===&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== I2C ===&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the BL pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
Connection type I2C is Readback-capable with both types of I2C Port Expanders.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl HD44780 LCD to I2C Port Expander mapping&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Serial (using 74HCT164) ===&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2-Wire (using 74HCT4094) ===&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1778</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1778"/>
				<updated>2016-12-09T23:24:23Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* Pinning */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|text top|HD44780 module test]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Displaytech 404b charconv.jpg|thumb|400px|right|text top|Displaytech 404b 4x40 LCD with output of ECMD lcd print charset 0 128 and selected HD44780_Compat charset conversion]]&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimming potentiometer that allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection for the LCD: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the BL pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
Connection type I2C is Readback-capable with both types of I2C Port Expanders.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl HD44780 LCD to I2C Port Expander mapping&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1777</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1777"/>
				<updated>2016-12-09T23:15:22Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* Direct */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|text top|HD44780 module test]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Displaytech 404b charconv.jpg|thumb|400px|right|text top|Displaytech 404b 4x40 LCD with output of ECMD lcd print charset 0 128 and selected HD44780_Compat charset conversion]]&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimmer which allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the BL pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
Connection type I2C is Readback-capable with both types of I2C Port Expanders.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl HD44780 LCD to I2C Port Expander mapping&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1776</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1776"/>
				<updated>2016-12-09T23:14:46Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* I2C */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|text top|HD44780 module test]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Displaytech 404b charconv.jpg|thumb|400px|right|text top|Displaytech 404b 4x40 LCD with output of ECMD lcd print charset 0 128 and selected HD44780_Compat charset conversion]]&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimmer which allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the BL pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
Connection type I2C is Readback-capable with both types of I2C Port Expanders.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl HD44780 LCD to I2C Port Expander mapping&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1775</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1775"/>
				<updated>2016-12-09T23:12:09Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* I2C */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|text top|HD44780 module test]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Displaytech 404b charconv.jpg|thumb|400px|right|text top|Displaytech 404b 4x40 LCD with output of ECMD lcd print charset 0 128 and selected HD44780_Compat charset conversion]]&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimmer which allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the BL pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
Connection type I2C is Readback-capable with both types of I2C Port Expanders.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1774</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1774"/>
				<updated>2016-12-09T23:10:10Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* I2C */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|text top|HD44780 module test]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Displaytech 404b charconv.jpg|thumb|400px|right|text top|Displaytech 404b 4x40 LCD with output of ECMD lcd print charset 0 128 and selected HD44780_Compat charset conversion]]&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimmer which allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
Connection type I2C is Readback-capable with both types of I2C Port Expanders.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1773</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1773"/>
				<updated>2016-12-09T23:08:52Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* I2C */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|text top|HD44780 module test]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Displaytech 404b charconv.jpg|thumb|400px|right|text top|Displaytech 404b 4x40 LCD with output of ECMD lcd print charset 0 128 and selected HD44780_Compat charset conversion]]&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimmer which allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
LCDs connected via I2C may be read back.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1772</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1772"/>
				<updated>2016-12-09T23:06:58Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|text top|HD44780 module test]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Displaytech 404b charconv.jpg|thumb|400px|right|text top|Displaytech 404b 4x40 LCD with output of ECMD lcd print charset 0 128 and selected HD44780_Compat charset conversion]]&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimmer which allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1771</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1771"/>
				<updated>2016-12-09T23:03:01Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|text top|HD44780 module test]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Displaytech 404b charconv.jpg|thumb|400px|right|text top|Displaytech 404b 4x40 showing output of ECMD lcd print charset 0 128 with selected HD44780_Compat charset conversion]]&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimmer which allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1770</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1770"/>
				<updated>2016-12-09T22:58:32Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|text top|HD44780 module test]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
[[File:Displaytech 404b charconv.jpg|thumb|400px|right|text top|Displaytech 404b showing output of ECMD lcd print charset 0 128 with selected HD44780_Compat charset conversion]]&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimmer which allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1769</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1769"/>
				<updated>2016-12-09T22:49:21Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|HD44780 module test]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimmer which allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
[[FILE:foo.jpg|thumb|400px|right|Displaytech 404b showing ECMD lcd print charset 0 128 with activated charset conversion]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=File:Displaytech_404b_charconv.jpg&amp;diff=1768</id>
		<title>File:Displaytech 404b charconv.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=File:Displaytech_404b_charconv.jpg&amp;diff=1768"/>
				<updated>2016-12-09T22:47:16Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: Displaytech 404b showing ECMD lcd print charset 0 128 with activated charset conversion
(C) 2016 by M.Brakemeier
CC-BY-SA&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Displaytech 404b showing ECMD lcd print charset 0 128 with activated charset conversion&lt;br /&gt;
(C) 2016 by M.Brakemeier&lt;br /&gt;
CC-BY-SA&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1767</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1767"/>
				<updated>2016-12-09T20:52:46Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* Supported LC-Displays */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
&lt;br /&gt;
[[File:HD44780 Testbed.jpg|thumb|400px|right|HD44780 module test]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimmer which allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=File:HD44780_Testbed.jpg&amp;diff=1766</id>
		<title>File:HD44780 Testbed.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=File:HD44780_Testbed.jpg&amp;diff=1766"/>
				<updated>2016-12-09T20:46:31Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: (C) 2016 by M.Brakemeier
CC-BY-SA&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(C) 2016 by M.Brakemeier&lt;br /&gt;
CC-BY-SA&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1765</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1765"/>
				<updated>2016-12-09T20:24:05Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimmer which allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1764</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1764"/>
				<updated>2016-12-09T20:20:09Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimmer which allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)4094 shift register. Refer to [http://www.cczwei.de/atm18_downloads/071148-D%20CC2-AVR-board-2.pdf this] paper for an explanation and example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection using a 4094 shift register requires two AVR port pins&lt;br /&gt;
 ifdef(`HD44780_2WIRE', `&lt;br /&gt;
   pin(HD44780_2WIRE_D, PC0)&lt;br /&gt;
   pin(HD44780_2WIRE_CLK, PC1)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1763</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1763"/>
				<updated>2016-12-09T20:12:34Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* I2C */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimmer which allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCF8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown in the examples below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals. The driver exclusively controls the pin specified, the other 7 port pins may be used for different purposes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1762</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1762"/>
				<updated>2016-12-09T20:06:36Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* I2C */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimmer which allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
The I2C connection type supports either the 8 Bit PCF8574x, as it is found on the Pollin AVR Net-IO Add-On board, or the 16 Bit MCP23017 I2C Port Expander.&lt;br /&gt;
&lt;br /&gt;
LCDs up to 80 characters and only one HD44780 controller may be connected to a PCD8574x including the backlight control pin. LCDs with more than 80 characters require a second enable pin. The address of the port expander and the pinning for the LCD has to be specified for your hardware using the macros shown below. The macro HD44780_PCF8574x_MAPPING defines the pinning for displays with only one enable signal and backlight control, the macro HD44780_PCF8574x_MULTI_MAPPING for displays with two enable signals. Note that backlight control is not supported when using the HD44780_PCF8574x_MULTI_MAPPING macro. The pinning shown below matches the pinning found on the Pollin AVR Net-IO Add-On board. Remember that you have to replace the inverting backlight control circuitry with a direct connection to connect displays with two enable signals to this board.&lt;br /&gt;
&lt;br /&gt;
The macros HD44780_MCP23017_MAPPING and HD44780_MCP23017_MULTI_MAPPING are used to map the LCD pins to one port of the MCP23017. Note that you have to specify either port A or B as shown below, mapping using mixed pins of both ports is not supported by the driver. The additional macro HD44780_MCP23017_MULTI_MAPPING_BL may be used to specify a backlight control signal on another MCP23017 port when the first port is occupied by a display with two enable signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1761</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1761"/>
				<updated>2016-12-07T23:56:04Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimmer which allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * HD44780-Display über PCF8574 ansteuern.&lt;br /&gt;
 * Belegung Pollin Add-On-Board:&lt;br /&gt;
 *&lt;br /&gt;
 * Pin PCF8574 Pin am LCD&lt;br /&gt;
 * 4 (P0) -&amp;gt; 11 (DB4)&lt;br /&gt;
 * 5 (P1) -&amp;gt; 12 (DB5)&lt;br /&gt;
 * 6 (P2) -&amp;gt; 13 (DB6)&lt;br /&gt;
 * 7 (P3) -&amp;gt; 14 (DB7)&lt;br /&gt;
 * 9 (P4) -&amp;gt; 4 (RS)&lt;br /&gt;
 * 10 (P5) -&amp;gt; 5 (R/W) nicht benutzt !&lt;br /&gt;
 * 11 (P6) -&amp;gt; 6 (EN)&lt;br /&gt;
 * 12 (P7) -&amp;gt; 15 (Beleuchtung)&lt;br /&gt;
 *&lt;br /&gt;
 * Die LCD-Beleuchtung an Pin 12 wird über einen&lt;br /&gt;
 * PNP-Transistor geschaltet.&lt;br /&gt;
 * Beleuchtung an: Bit 7=0&lt;br /&gt;
 * Beleuchtung aus: Bit 7=1&lt;br /&gt;
 * Die Address-Eingänge A0 bis A2 des PCF8574 liegen alle auf GND.&lt;br /&gt;
 * Die Basis-Addresse des Chips ist daher immer 0x20.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Pinning:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1760</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1760"/>
				<updated>2016-12-07T23:45:39Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* Serial (using 74HCT164) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Allmost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimmer which allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * HD44780-Display über PCF8574 ansteuern.&lt;br /&gt;
 * Belegung Pollin Add-On-Board:&lt;br /&gt;
 *&lt;br /&gt;
 * Pin PCF8574 Pin am LCD&lt;br /&gt;
 * 4 (P0) -&amp;gt; 11 (DB4)&lt;br /&gt;
 * 5 (P1) -&amp;gt; 12 (DB5)&lt;br /&gt;
 * 6 (P2) -&amp;gt; 13 (DB6)&lt;br /&gt;
 * 7 (P3) -&amp;gt; 14 (DB7)&lt;br /&gt;
 * 9 (P4) -&amp;gt; 4 (RS)&lt;br /&gt;
 * 10 (P5) -&amp;gt; 5 (R/W) nicht benutzt !&lt;br /&gt;
 * 11 (P6) -&amp;gt; 6 (EN)&lt;br /&gt;
 * 12 (P7) -&amp;gt; 15 (Beleuchtung)&lt;br /&gt;
 *&lt;br /&gt;
 * Die LCD-Beleuchtung an Pin 12 wird über einen&lt;br /&gt;
 * PNP-Transistor geschaltet.&lt;br /&gt;
 * Beleuchtung an: Bit 7=0&lt;br /&gt;
 * Beleuchtung aus: Bit 7=1&lt;br /&gt;
 * Die Address-Eingänge A0 bis A2 des PCF8574 liegen alle auf GND.&lt;br /&gt;
 * Die Basis-Addresse des Chips ist daher immer 0x20.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Pinning:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. The connection is uni-directional, so no Readback. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1759</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1759"/>
				<updated>2016-12-07T23:43:56Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* Serial (using 74HCT164) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Allmost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimmer which allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * HD44780-Display über PCF8574 ansteuern.&lt;br /&gt;
 * Belegung Pollin Add-On-Board:&lt;br /&gt;
 *&lt;br /&gt;
 * Pin PCF8574 Pin am LCD&lt;br /&gt;
 * 4 (P0) -&amp;gt; 11 (DB4)&lt;br /&gt;
 * 5 (P1) -&amp;gt; 12 (DB5)&lt;br /&gt;
 * 6 (P2) -&amp;gt; 13 (DB6)&lt;br /&gt;
 * 7 (P3) -&amp;gt; 14 (DB7)&lt;br /&gt;
 * 9 (P4) -&amp;gt; 4 (RS)&lt;br /&gt;
 * 10 (P5) -&amp;gt; 5 (R/W) nicht benutzt !&lt;br /&gt;
 * 11 (P6) -&amp;gt; 6 (EN)&lt;br /&gt;
 * 12 (P7) -&amp;gt; 15 (Beleuchtung)&lt;br /&gt;
 *&lt;br /&gt;
 * Die LCD-Beleuchtung an Pin 12 wird über einen&lt;br /&gt;
 * PNP-Transistor geschaltet.&lt;br /&gt;
 * Beleuchtung an: Bit 7=0&lt;br /&gt;
 * Beleuchtung aus: Bit 7=1&lt;br /&gt;
 * Die Address-Eingänge A0 bis A2 des PCF8574 liegen alle auf GND.&lt;br /&gt;
 * Die Basis-Addresse des Chips ist daher immer 0x20.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Pinning:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type. This connection type is not capable of reading the displays busy-flag, no Readback possible. Don't use if speed is important, especially not for larger displays. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1758</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1758"/>
				<updated>2016-12-07T23:37:23Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function-level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Allmost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
HD44780-based alphanumeric LCDs are connected via 8 databus-lines (D0..D7) and 3 control-lines (RS, EN, R/W). Displays with more than 80 characters usually utilize a second controller and require two EN-signals EN1 and EN2. Another signal BL is needed if backlight control ist required. To save some i/o-pins the HD44780 controller also supports a 4 Bit mode, using only D4..D7. The HD44780 module supports this 4 Bit mode only. Note that in general the signals D0..D3 should not be left open, use a pull-down or tie them to ground.&lt;br /&gt;
&lt;br /&gt;
Most displays use 14, 16 or 18-pin connectors with common pinouts but there are sometimes subtle differences. Beside the control- and data-signals all displays require a supply voltage Vdd, usually +5 V, for the logic circuits and another voltage Vo for the display itself. The later is usually derived using a trimmer which allows for contrast adjustment. Some displays require a ''negative'' voltage for the display.&lt;br /&gt;
&lt;br /&gt;
Please refer to the datasheet of '''your''' display! Wrong connections may lead to a permanent damage.&lt;br /&gt;
&lt;br /&gt;
The HD44780 module supports four different types of connection: Direct, I2C, Serial and 2-Wire.&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The LCD signals RS, RW, EN (resp. EN1 and EN2), D4..D7 and BL are directly connected to AVR port pins. The driver makes no assumptions about the pin mapping, arbitrary pins from different ports may be used to drive the LCD signals. This connection type is Readback-capable.&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * HD44780-Display über PCF8574 ansteuern.&lt;br /&gt;
 * Belegung Pollin Add-On-Board:&lt;br /&gt;
 *&lt;br /&gt;
 * Pin PCF8574 Pin am LCD&lt;br /&gt;
 * 4 (P0) -&amp;gt; 11 (DB4)&lt;br /&gt;
 * 5 (P1) -&amp;gt; 12 (DB5)&lt;br /&gt;
 * 6 (P2) -&amp;gt; 13 (DB6)&lt;br /&gt;
 * 7 (P3) -&amp;gt; 14 (DB7)&lt;br /&gt;
 * 9 (P4) -&amp;gt; 4 (RS)&lt;br /&gt;
 * 10 (P5) -&amp;gt; 5 (R/W) nicht benutzt !&lt;br /&gt;
 * 11 (P6) -&amp;gt; 6 (EN)&lt;br /&gt;
 * 12 (P7) -&amp;gt; 15 (Beleuchtung)&lt;br /&gt;
 *&lt;br /&gt;
 * Die LCD-Beleuchtung an Pin 12 wird über einen&lt;br /&gt;
 * PNP-Transistor geschaltet.&lt;br /&gt;
 * Beleuchtung an: Bit 7=0&lt;br /&gt;
 * Beleuchtung aus: Bit 7=1&lt;br /&gt;
 * Die Address-Eingänge A0 bis A2 des PCF8574 liegen alle auf GND.&lt;br /&gt;
 * Die Basis-Addresse des Chips ist daher immer 0x20.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Pinning:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
&lt;br /&gt;
The LCD is connected using a 74HC(T)164 shift register. Refer to Ulrich Radig's [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software avr-webserver] for an example of this connection type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl serial connection requires three AVR port pins&lt;br /&gt;
 pin(HD44780_SER_D, PD4)&lt;br /&gt;
 pin(HD44780_SER_CLK, PD3)&lt;br /&gt;
 pin(HD44780_SER_EN1, PD2)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1757</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1757"/>
				<updated>2016-12-07T21:24:02Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table [[#Supported LC-Displays]] above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function- level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Allmost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * HD44780-Display über PCF8574 ansteuern.&lt;br /&gt;
 * Belegung Pollin Add-On-Board:&lt;br /&gt;
 *&lt;br /&gt;
 * Pin PCF8574 Pin am LCD&lt;br /&gt;
 * 4 (P0) -&amp;gt; 11 (DB4)&lt;br /&gt;
 * 5 (P1) -&amp;gt; 12 (DB5)&lt;br /&gt;
 * 6 (P2) -&amp;gt; 13 (DB6)&lt;br /&gt;
 * 7 (P3) -&amp;gt; 14 (DB7)&lt;br /&gt;
 * 9 (P4) -&amp;gt; 4 (RS)&lt;br /&gt;
 * 10 (P5) -&amp;gt; 5 (R/W) nicht benutzt !&lt;br /&gt;
 * 11 (P6) -&amp;gt; 6 (EN)&lt;br /&gt;
 * 12 (P7) -&amp;gt; 15 (Beleuchtung)&lt;br /&gt;
 *&lt;br /&gt;
 * Die LCD-Beleuchtung an Pin 12 wird über einen&lt;br /&gt;
 * PNP-Transistor geschaltet.&lt;br /&gt;
 * Beleuchtung an: Bit 7=0&lt;br /&gt;
 * Beleuchtung aus: Bit 7=1&lt;br /&gt;
 * Die Address-Eingänge A0 bis A2 des PCF8574 liegen alle auf GND.&lt;br /&gt;
 * Die Basis-Addresse des Chips ist daher immer 0x20.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Pinning:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1756</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1756"/>
				<updated>2016-12-07T21:21:44Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
'''Configuration options:'''&lt;br /&gt;
&lt;br /&gt;
;LCD size/type&lt;br /&gt;
:  Select one of the defined display sizes and address configurations shown in the table above.&lt;br /&gt;
:&lt;br /&gt;
:  Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function- level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Allmost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
:  Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * HD44780-Display über PCF8574 ansteuern.&lt;br /&gt;
 * Belegung Pollin Add-On-Board:&lt;br /&gt;
 *&lt;br /&gt;
 * Pin PCF8574 Pin am LCD&lt;br /&gt;
 * 4 (P0) -&amp;gt; 11 (DB4)&lt;br /&gt;
 * 5 (P1) -&amp;gt; 12 (DB5)&lt;br /&gt;
 * 6 (P2) -&amp;gt; 13 (DB6)&lt;br /&gt;
 * 7 (P3) -&amp;gt; 14 (DB7)&lt;br /&gt;
 * 9 (P4) -&amp;gt; 4 (RS)&lt;br /&gt;
 * 10 (P5) -&amp;gt; 5 (R/W) nicht benutzt !&lt;br /&gt;
 * 11 (P6) -&amp;gt; 6 (EN)&lt;br /&gt;
 * 12 (P7) -&amp;gt; 15 (Beleuchtung)&lt;br /&gt;
 *&lt;br /&gt;
 * Die LCD-Beleuchtung an Pin 12 wird über einen&lt;br /&gt;
 * PNP-Transistor geschaltet.&lt;br /&gt;
 * Beleuchtung an: Bit 7=0&lt;br /&gt;
 * Beleuchtung aus: Bit 7=1&lt;br /&gt;
 * Die Address-Eingänge A0 bis A2 des PCF8574 liegen alle auf GND.&lt;br /&gt;
 * Die Basis-Addresse des Chips ist daher immer 0x20.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Pinning:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1755</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1755"/>
				<updated>2016-12-07T21:18:43Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuration options: ===&lt;br /&gt;
;LCD size/type&lt;br /&gt;
: Select one of the defined display sizes and address configurations shown in the table above.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function- level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Allmost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
: Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
: '''Note:''' Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
:  You '''definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * HD44780-Display über PCF8574 ansteuern.&lt;br /&gt;
 * Belegung Pollin Add-On-Board:&lt;br /&gt;
 *&lt;br /&gt;
 * Pin PCF8574 Pin am LCD&lt;br /&gt;
 * 4 (P0) -&amp;gt; 11 (DB4)&lt;br /&gt;
 * 5 (P1) -&amp;gt; 12 (DB5)&lt;br /&gt;
 * 6 (P2) -&amp;gt; 13 (DB6)&lt;br /&gt;
 * 7 (P3) -&amp;gt; 14 (DB7)&lt;br /&gt;
 * 9 (P4) -&amp;gt; 4 (RS)&lt;br /&gt;
 * 10 (P5) -&amp;gt; 5 (R/W) nicht benutzt !&lt;br /&gt;
 * 11 (P6) -&amp;gt; 6 (EN)&lt;br /&gt;
 * 12 (P7) -&amp;gt; 15 (Beleuchtung)&lt;br /&gt;
 *&lt;br /&gt;
 * Die LCD-Beleuchtung an Pin 12 wird über einen&lt;br /&gt;
 * PNP-Transistor geschaltet.&lt;br /&gt;
 * Beleuchtung an: Bit 7=0&lt;br /&gt;
 * Beleuchtung aus: Bit 7=1&lt;br /&gt;
 * Die Address-Eingänge A0 bis A2 des PCF8574 liegen alle auf GND.&lt;br /&gt;
 * Die Basis-Addresse des Chips ist daher immer 0x20.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Pinning:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1754</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1754"/>
				<updated>2016-12-07T21:17:45Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are mainly distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LC-Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
Although it is technically possible to connect more than one display, the HD44780 module supports only one LC-Display at a time.&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
  │ │          Network ---&amp;gt;&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              ADC / DAC  ---&amp;gt;                                                                &lt;br /&gt;
  │ │              LCD Displays  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] HD44780 module driver (Character-LCD)  ---&amp;gt;&lt;br /&gt;
  │ │                  [-] HR20-style LCD Display&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                      (16_Characters_2_Lines) LCD size/type&lt;br /&gt;
  │ │                      (HD44780_Compat) LCD controller type&lt;br /&gt;
  │ │                      (None) LCD charset conversion&lt;br /&gt;
  │ │                      (I2C) Connection type&lt;br /&gt;
  │ │                      (PCF8574) I2C Port Expander&lt;br /&gt;
  │ │                      [*] Readback support&lt;br /&gt;
  │ │                      [*] Backlight support&lt;br /&gt;
  │ │                      [*] Backlight on at power-on&lt;br /&gt;
  │ │                      [*] Invert Backlight switch&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuration options: ===&lt;br /&gt;
;LCD size/type&lt;br /&gt;
: Select one of the defined display sizes and address configurations shown in the table above.&lt;br /&gt;
;LCD controller type&lt;br /&gt;
:  Select LCD controller circuit:&lt;br /&gt;
:&lt;br /&gt;
:*  HD44780_Compat - most controllers are compatible to Hitachis HD44780&lt;br /&gt;
:*  KS0066U - Samsungs KS0066U requires a different init routine&lt;br /&gt;
:&lt;br /&gt;
:  Almost all controllers for alphanumeric character LCDs are more or less HD44780-compatible at least at the feature- and function- level required by e6.&lt;br /&gt;
:&lt;br /&gt;
:  If in doubt, choose HD44780_Compat.&lt;br /&gt;
;LCD charset conversion&lt;br /&gt;
:  Select charset conversion used while writing to the lcd:&lt;br /&gt;
:&lt;br /&gt;
:*  None - use no charset conversion at all (safes program mem)&lt;br /&gt;
:*  HD44780_Compat - map characters from ISO8859-1 to the original HD44780 charset&lt;br /&gt;
:&lt;br /&gt;
:  Allmost all controllers use their own non-ISO-compatible charset, varying between manufacturers, rom versions, etc. that provides characters from western languages as well as japanese, chinese and graphical glyphs.&lt;br /&gt;
:&lt;br /&gt;
: Charset conversion might become useful if you have to display messages and texts from external resources that uses standard encodings for their charset like ISO8859-1.&lt;br /&gt;
:&lt;br /&gt;
: '''Note:''' Charset conversion uses a lookup table and requires about 272 byte program memory (flash rom).&lt;br /&gt;
;Connection type&lt;br /&gt;
:  Select the connection type for the LCD:&lt;br /&gt;
:&lt;br /&gt;
:*  Direct - direct connection using avr io-pins&lt;br /&gt;
:*  I2C - uses sub-selection of I2C port expander&lt;br /&gt;
:*  SER_LCD(74hct164) - serial connection using HCT164 shift register&lt;br /&gt;
:*  2WIRE(74hct4094) - serial connection using HCT4094 shift register&lt;br /&gt;
:&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
:&lt;br /&gt;
;I2C Port Expander&lt;br /&gt;
:  Select I2C Port Expander to use:&lt;br /&gt;
:&lt;br /&gt;
:*  PCF8574 - use PCF8574x as I2C port expander&lt;br /&gt;
:*  MCP23017 -  use MCP23017 as I2C port expander&lt;br /&gt;
:&lt;br /&gt;
:  Note: automatically enables I2C_MASTER_SUPPORT and I2C_PCF8574X_SUPPORT resp. I2C_MCP23017_SUPPORT when selected.&lt;br /&gt;
:&lt;br /&gt;
:  Note: Selection is only valid when '''I2C''' was selected under '''Connection type'''.&lt;br /&gt;
:  See section [[#Pinning]] below for further explanations.&lt;br /&gt;
;Readback support&lt;br /&gt;
:  Enable support for bi-directional lcd bus to read LCDs busy flag. Supported by direct and I2C connection only.&lt;br /&gt;
:&lt;br /&gt;
: '''You definitly should use a readback capable hardware and enable this feature''', saves lots of delays.&lt;br /&gt;
;Backlight support&lt;br /&gt;
:  Backlight support for LCDs based on the HD44780 controller.&lt;br /&gt;
:&lt;br /&gt;
:  Enable backlight on/off control via API and ECMD.&lt;br /&gt;
;Backlight on at power-on&lt;br /&gt;
:  Switch on backlight at power-on/reset.&lt;br /&gt;
;Invert Backlight switch&lt;br /&gt;
:  Invert backlight logic for low active backlight circuits e.g. found on Pollin AVR NET-IO Add-on.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * HD44780-Display über PCF8574 ansteuern.&lt;br /&gt;
 * Belegung Pollin Add-On-Board:&lt;br /&gt;
 *&lt;br /&gt;
 * Pin PCF8574 Pin am LCD&lt;br /&gt;
 * 4 (P0) -&amp;gt; 11 (DB4)&lt;br /&gt;
 * 5 (P1) -&amp;gt; 12 (DB5)&lt;br /&gt;
 * 6 (P2) -&amp;gt; 13 (DB6)&lt;br /&gt;
 * 7 (P3) -&amp;gt; 14 (DB7)&lt;br /&gt;
 * 9 (P4) -&amp;gt; 4 (RS)&lt;br /&gt;
 * 10 (P5) -&amp;gt; 5 (R/W) nicht benutzt !&lt;br /&gt;
 * 11 (P6) -&amp;gt; 6 (EN)&lt;br /&gt;
 * 12 (P7) -&amp;gt; 15 (Beleuchtung)&lt;br /&gt;
 *&lt;br /&gt;
 * Die LCD-Beleuchtung an Pin 12 wird über einen&lt;br /&gt;
 * PNP-Transistor geschaltet.&lt;br /&gt;
 * Beleuchtung an: Bit 7=0&lt;br /&gt;
 * Beleuchtung aus: Bit 7=1&lt;br /&gt;
 * Die Address-Eingänge A0 bis A2 des PCF8574 liegen alle auf GND.&lt;br /&gt;
 * Die Basis-Addresse des Chips ist daher immer 0x20.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Pinning:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1753</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1753"/>
				<updated>2016-12-07T20:40:21Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
The '''HD44780 module''' provides support for common '''alphanumeric character LCDs''' using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HD44780 module drivers supports '''alphanumeric character LCDs''' only. Ethersex also has limited support for some graphical displays. Have a look at the LCD Display configuration.&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * HD44780-Display über PCF8574 ansteuern.&lt;br /&gt;
 * Belegung Pollin Add-On-Board:&lt;br /&gt;
 *&lt;br /&gt;
 * Pin PCF8574 Pin am LCD&lt;br /&gt;
 * 4 (P0) -&amp;gt; 11 (DB4)&lt;br /&gt;
 * 5 (P1) -&amp;gt; 12 (DB5)&lt;br /&gt;
 * 6 (P2) -&amp;gt; 13 (DB6)&lt;br /&gt;
 * 7 (P3) -&amp;gt; 14 (DB7)&lt;br /&gt;
 * 9 (P4) -&amp;gt; 4 (RS)&lt;br /&gt;
 * 10 (P5) -&amp;gt; 5 (R/W) nicht benutzt !&lt;br /&gt;
 * 11 (P6) -&amp;gt; 6 (EN)&lt;br /&gt;
 * 12 (P7) -&amp;gt; 15 (Beleuchtung)&lt;br /&gt;
 *&lt;br /&gt;
 * Die LCD-Beleuchtung an Pin 12 wird über einen&lt;br /&gt;
 * PNP-Transistor geschaltet.&lt;br /&gt;
 * Beleuchtung an: Bit 7=0&lt;br /&gt;
 * Beleuchtung aus: Bit 7=1&lt;br /&gt;
 * Die Address-Eingänge A0 bis A2 des PCF8574 liegen alle auf GND.&lt;br /&gt;
 * Die Basis-Addresse des Chips ist daher immer 0x20.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Pinning:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1752</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1752"/>
				<updated>2016-12-07T20:34:29Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
The HD44780 module provides support for common alphanumeric character LCDs using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters - most displays with more characters use two independent controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * HD44780-Display über PCF8574 ansteuern.&lt;br /&gt;
 * Belegung Pollin Add-On-Board:&lt;br /&gt;
 *&lt;br /&gt;
 * Pin PCF8574 Pin am LCD&lt;br /&gt;
 * 4 (P0) -&amp;gt; 11 (DB4)&lt;br /&gt;
 * 5 (P1) -&amp;gt; 12 (DB5)&lt;br /&gt;
 * 6 (P2) -&amp;gt; 13 (DB6)&lt;br /&gt;
 * 7 (P3) -&amp;gt; 14 (DB7)&lt;br /&gt;
 * 9 (P4) -&amp;gt; 4 (RS)&lt;br /&gt;
 * 10 (P5) -&amp;gt; 5 (R/W) nicht benutzt !&lt;br /&gt;
 * 11 (P6) -&amp;gt; 6 (EN)&lt;br /&gt;
 * 12 (P7) -&amp;gt; 15 (Beleuchtung)&lt;br /&gt;
 *&lt;br /&gt;
 * Die LCD-Beleuchtung an Pin 12 wird über einen&lt;br /&gt;
 * PNP-Transistor geschaltet.&lt;br /&gt;
 * Beleuchtung an: Bit 7=0&lt;br /&gt;
 * Beleuchtung aus: Bit 7=1&lt;br /&gt;
 * Die Address-Eingänge A0 bis A2 des PCF8574 liegen alle auf GND.&lt;br /&gt;
 * Die Basis-Addresse des Chips ist daher immer 0x20.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Pinning:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1751</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1751"/>
				<updated>2016-12-07T20:32:51Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
The HD44780 module provides support for common alphanumeric character LCDs using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
The vast majority of all alphanumeric LC-Displays use Hitachis [https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller HD44780]&lt;br /&gt;
dot matrix liquid crystal display (LCD) controller. The e6 HD44780 module supports displays of many different sizes utilizing the&lt;br /&gt;
original HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
Alphanumeric LCDs are distinguished by their size, the start-address of the per line Display Data-RAM (DDRAM) and the controller type.&lt;br /&gt;
The original HD44780 controllers can drive up to 80 characters, most displays with more characters simply use two controllers.&lt;br /&gt;
&lt;br /&gt;
The following table lists the LC-displays supported by the e6 HD44780 module by size and per line DDRAM start-address:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|Menuconfig&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Size&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|DDRAM Startaddress&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Note:&lt;br /&gt;
|-&lt;br /&gt;
!LCD size/type||Characters||Lines||Line 1||Line 2||Line 3||Line 4&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_1_Line||8||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line||16||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_1_Line_Mux16||16||1||0x00||n/a||n/a||n/a||organized as 8 chars, 2 lines&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_1_Line||20||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_1_Line||40||1||0x00||n/a||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|8_Characters_2_Lines||8||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|12_Characters_2_Lines||12||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_2_Lines||16||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_2_Lines||20||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|24_Characters_2_Lines||24||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_2_Lines||40||2||0x00||0x40||n/a||n/a||&lt;br /&gt;
|-&lt;br /&gt;
|16_Characters_4_Lines||16||4||0x00||0x40||0x10||0x50||&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines||20||4||0x00||0x40||0x14||0x54||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|20_Characters_4_Lines_KS0073||20||4||0x00||0x20||0x40||0x60||Note DDRAM addresses&lt;br /&gt;
|-&lt;br /&gt;
|27_Characters_4_Lines_2_EN||27||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|-&lt;br /&gt;
|40_Characters_4_Lines_2_EN||40||4||0x00||0x40||0x00||0x40||Two Enable-Pins/Controllers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * HD44780-Display über PCF8574 ansteuern.&lt;br /&gt;
 * Belegung Pollin Add-On-Board:&lt;br /&gt;
 *&lt;br /&gt;
 * Pin PCF8574 Pin am LCD&lt;br /&gt;
 * 4 (P0) -&amp;gt; 11 (DB4)&lt;br /&gt;
 * 5 (P1) -&amp;gt; 12 (DB5)&lt;br /&gt;
 * 6 (P2) -&amp;gt; 13 (DB6)&lt;br /&gt;
 * 7 (P3) -&amp;gt; 14 (DB7)&lt;br /&gt;
 * 9 (P4) -&amp;gt; 4 (RS)&lt;br /&gt;
 * 10 (P5) -&amp;gt; 5 (R/W) nicht benutzt !&lt;br /&gt;
 * 11 (P6) -&amp;gt; 6 (EN)&lt;br /&gt;
 * 12 (P7) -&amp;gt; 15 (Beleuchtung)&lt;br /&gt;
 *&lt;br /&gt;
 * Die LCD-Beleuchtung an Pin 12 wird über einen&lt;br /&gt;
 * PNP-Transistor geschaltet.&lt;br /&gt;
 * Beleuchtung an: Bit 7=0&lt;br /&gt;
 * Beleuchtung aus: Bit 7=1&lt;br /&gt;
 * Die Address-Eingänge A0 bis A2 des PCF8574 liegen alle auf GND.&lt;br /&gt;
 * Die Basis-Addresse des Chips ist daher immer 0x20.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Pinning:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1750</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1750"/>
				<updated>2016-12-06T20:09:25Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
The HD44780 module provides support for common alphanumeric character LCDs using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * HD44780-Display über PCF8574 ansteuern.&lt;br /&gt;
 * Belegung Pollin Add-On-Board:&lt;br /&gt;
 *&lt;br /&gt;
 * Pin PCF8574 Pin am LCD&lt;br /&gt;
 * 4 (P0) -&amp;gt; 11 (DB4)&lt;br /&gt;
 * 5 (P1) -&amp;gt; 12 (DB5)&lt;br /&gt;
 * 6 (P2) -&amp;gt; 13 (DB6)&lt;br /&gt;
 * 7 (P3) -&amp;gt; 14 (DB7)&lt;br /&gt;
 * 9 (P4) -&amp;gt; 4 (RS)&lt;br /&gt;
 * 10 (P5) -&amp;gt; 5 (R/W) nicht benutzt !&lt;br /&gt;
 * 11 (P6) -&amp;gt; 6 (EN)&lt;br /&gt;
 * 12 (P7) -&amp;gt; 15 (Beleuchtung)&lt;br /&gt;
 *&lt;br /&gt;
 * Die LCD-Beleuchtung an Pin 12 wird über einen&lt;br /&gt;
 * PNP-Transistor geschaltet.&lt;br /&gt;
 * Beleuchtung an: Bit 7=0&lt;br /&gt;
 * Beleuchtung aus: Bit 7=1&lt;br /&gt;
 * Die Address-Eingänge A0 bis A2 des PCF8574 liegen alle auf GND.&lt;br /&gt;
 * Die Basis-Addresse des Chips ist daher immer 0x20.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Pinning:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   ifelse(value_HD44780_I2C_PORTEXP,`HD44780_I2C_PCF8574',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MULTI_MAPPING(ADR, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_PCF8574x_MULTI_MAPPING(0x20, 4, 5, 6, 7, 0, 1, 2, 3)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_PCF8574x_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)')',&lt;br /&gt;
   value_HD44780_I2C_PORTEXP,`HD44780_I2C_MCP23017',&lt;br /&gt;
   `ifdef(`conf_HD44780_MULTIEN',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MULTI_MAPPING(ADR, PORT, RS, RW, EN1, EN2, DB4, DB5, DB6, DB7)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING(0x24, B, 4, 5, 6, 7, 0, 1, 2, 3)&lt;br /&gt;
        HD44780_MCP23017_MULTI_MAPPING_BL(0x24, A, 7)',&lt;br /&gt;
     `dnl&lt;br /&gt;
        dnl HD44780_MCP23017_MAPPING(ADR, RS, RW, EN, DB4, DB5, DB6, DB7, BL)&lt;br /&gt;
        HD44780_MCP23017_MAPPING(0x24, B, 4, 5, 6, 0, 1, 2, 3, 7)')'&lt;br /&gt;
   )dnl&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1749</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1749"/>
				<updated>2016-12-05T20:18:49Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
The HD44780 module provides support for common alphanumeric character LCDs using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
The following example maps the LCD pins to AVR port pins found on the 25 pin Sub-D connector of the Pollin AVR Net-IO board:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
=== using PCF8574x ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * HD44780-Display über PCF8574 ansteuern.&lt;br /&gt;
 * Belegung Pollin Add-On-Board:&lt;br /&gt;
 *&lt;br /&gt;
 * Pin PCF8574 Pin am LCD&lt;br /&gt;
 * 4 (P0) -&amp;gt; 11 (DB4)&lt;br /&gt;
 * 5 (P1) -&amp;gt; 12 (DB5)&lt;br /&gt;
 * 6 (P2) -&amp;gt; 13 (DB6)&lt;br /&gt;
 * 7 (P3) -&amp;gt; 14 (DB7)&lt;br /&gt;
 * 9 (P4) -&amp;gt; 4 (RS)&lt;br /&gt;
 * 10 (P5) -&amp;gt; 5 (R/W) nicht benutzt !&lt;br /&gt;
 * 11 (P6) -&amp;gt; 6 (EN)&lt;br /&gt;
 * 12 (P7) -&amp;gt; 15 (Beleuchtung)&lt;br /&gt;
 *&lt;br /&gt;
 * Die LCD-Beleuchtung an Pin 12 wird über einen&lt;br /&gt;
 * PNP-Transistor geschaltet.&lt;br /&gt;
 * Beleuchtung an: Bit 7=0&lt;br /&gt;
 * Beleuchtung aus: Bit 7=1&lt;br /&gt;
 * Die Address-Eingänge A0 bis A2 des PCF8574 liegen alle auf GND.&lt;br /&gt;
 * Die Basis-Addresse des Chips ist daher immer 0x20.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Pinning: &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
   dnl HD44780_PCF8574x_MAPPING(ADR,RS,RW,EN,DB4,DB5,DB6,DB7,BL)&lt;br /&gt;
   HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)&lt;br /&gt;
 ')dnl&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== using MCP23017 ===&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1748</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1748"/>
				<updated>2016-12-05T20:11:19Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
The HD44780 module provides support for common alphanumeric character LCDs using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
== Direct ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 dnl Direct connection example&lt;br /&gt;
 dnl map LCD pins to Pollin AVR Net-IO&lt;br /&gt;
 dnl 25 pin extension port&lt;br /&gt;
 ifdef(`conf_HD44780', `&lt;br /&gt;
   pin(HD44780_RS, PC4)&lt;br /&gt;
   pin(HD44780_RW, PC3)&lt;br /&gt;
   pin(HD44780_EN1, PC2)&lt;br /&gt;
   dnl pin(HD44780_EN2, PC5)&lt;br /&gt;
   pin(HD44780_D4, PA0)&lt;br /&gt;
   pin(HD44780_D5, PA1)&lt;br /&gt;
   pin(HD44780_D6, PA2)&lt;br /&gt;
   pin(HD44780_D7, PA3)&lt;br /&gt;
 ')&lt;br /&gt;
 &lt;br /&gt;
 ifdef(`conf_HD44780_BACKLIGHT', `&lt;br /&gt;
   pin(HD44780_BL, PC6, OUTPUT)&lt;br /&gt;
 ')&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
=== using PCF8574x ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * HD44780-Display über PCF8574 ansteuern.&lt;br /&gt;
 * Belegung Pollin Add-On-Board:&lt;br /&gt;
 *&lt;br /&gt;
 * Pin PCF8574 Pin am LCD&lt;br /&gt;
 * 4 (P0) -&amp;gt; 11 (DB4)&lt;br /&gt;
 * 5 (P1) -&amp;gt; 12 (DB5)&lt;br /&gt;
 * 6 (P2) -&amp;gt; 13 (DB6)&lt;br /&gt;
 * 7 (P3) -&amp;gt; 14 (DB7)&lt;br /&gt;
 * 9 (P4) -&amp;gt; 4 (RS)&lt;br /&gt;
 * 10 (P5) -&amp;gt; 5 (R/W) nicht benutzt !&lt;br /&gt;
 * 11 (P6) -&amp;gt; 6 (EN)&lt;br /&gt;
 * 12 (P7) -&amp;gt; 15 (Beleuchtung)&lt;br /&gt;
 *&lt;br /&gt;
 * Die LCD-Beleuchtung an Pin 12 wird über einen&lt;br /&gt;
 * PNP-Transistor geschaltet.&lt;br /&gt;
 * Beleuchtung an: Bit 7=0&lt;br /&gt;
 * Beleuchtung aus: Bit 7=1&lt;br /&gt;
 * Die Address-Eingänge A0 bis A2 des PCF8574 liegen alle auf GND.&lt;br /&gt;
 * Die Basis-Addresse des Chips ist daher immer 0x20.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Pinning: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
 dnl HD44780_PCF8574x_MAPPING(ADR,RS,RW,EN,DB4,DB5,DB6,DB7,BL)&lt;br /&gt;
 HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)&lt;br /&gt;
')dnl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== using MCP23017 ===&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1747</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1747"/>
				<updated>2016-12-04T22:07:33Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''THIS WIKI PAGE IS CURRENTLY WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
The HD44780 module provides support for common alphanumeric character LCDs using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
== Direct ==&lt;br /&gt;
== I2C ==&lt;br /&gt;
=== using PCF8574x ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-/*&lt;br /&gt;
- * HD44780-Display über PCF8574 ansteuern.&lt;br /&gt;
- * Belegung Pollin Add-On-Board:&lt;br /&gt;
- *&lt;br /&gt;
- * Pin PCF8574 Pin am LCD&lt;br /&gt;
- * 4 (P0) -&amp;gt; 11 (DB4)&lt;br /&gt;
- * 5 (P1) -&amp;gt; 12 (DB5)&lt;br /&gt;
- * 6 (P2) -&amp;gt; 13 (DB6)&lt;br /&gt;
- * 7 (P3) -&amp;gt; 14 (DB7)&lt;br /&gt;
- * 9 (P4) -&amp;gt; 4 (RS)&lt;br /&gt;
- * 10 (P5) -&amp;gt; 5 (R/W) nicht benutzt !&lt;br /&gt;
- * 11 (P6) -&amp;gt; 6 (EN)&lt;br /&gt;
- * 12 (P7) -&amp;gt; 15 (Beleuchtung)&lt;br /&gt;
- *&lt;br /&gt;
- * Die LCD-Beleuchtung an Pin 12 wird über einen&lt;br /&gt;
- * PNP-Transistor geschaltet.&lt;br /&gt;
- * Beleuchtung an: Bit 7=0&lt;br /&gt;
- * Beleuchtung aus: Bit 7=1&lt;br /&gt;
- * Die Address-Eingänge A0 bis A2 des PCF8574 liegen alle auf GND.&lt;br /&gt;
- * Die Basis-Addresse des Chips ist daher immer 0x20.&lt;br /&gt;
- */&lt;br /&gt;
-&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Pinning: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
 dnl HD44780_PCF8574x_MAPPING(ADR,RS,RW,EN,DB4,DB5,DB6,DB7,BL)&lt;br /&gt;
 HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)&lt;br /&gt;
')dnl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== using MCP23017 ===&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1746</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1746"/>
				<updated>2016-12-04T22:04:21Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The HD44780 module provides support for common alphanumeric character LCDs using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
== Direct ==&lt;br /&gt;
== I2C ==&lt;br /&gt;
=== using PCF8574x ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-/*&lt;br /&gt;
- * HD44780-Display über PCF8574 ansteuern.&lt;br /&gt;
- * Belegung Pollin Add-On-Board:&lt;br /&gt;
- *&lt;br /&gt;
- * Pin PCF8574 Pin am LCD&lt;br /&gt;
- * 4 (P0) -&amp;gt; 11 (DB4)&lt;br /&gt;
- * 5 (P1) -&amp;gt; 12 (DB5)&lt;br /&gt;
- * 6 (P2) -&amp;gt; 13 (DB6)&lt;br /&gt;
- * 7 (P3) -&amp;gt; 14 (DB7)&lt;br /&gt;
- * 9 (P4) -&amp;gt; 4 (RS)&lt;br /&gt;
- * 10 (P5) -&amp;gt; 5 (R/W) nicht benutzt !&lt;br /&gt;
- * 11 (P6) -&amp;gt; 6 (EN)&lt;br /&gt;
- * 12 (P7) -&amp;gt; 15 (Beleuchtung)&lt;br /&gt;
- *&lt;br /&gt;
- * Die LCD-Beleuchtung an Pin 12 wird über einen&lt;br /&gt;
- * PNP-Transistor geschaltet.&lt;br /&gt;
- * Beleuchtung an: Bit 7=0&lt;br /&gt;
- * Beleuchtung aus: Bit 7=1&lt;br /&gt;
- * Die Address-Eingänge A0 bis A2 des PCF8574 liegen alle auf GND.&lt;br /&gt;
- * Die Basis-Addresse des Chips ist daher immer 0x20.&lt;br /&gt;
- */&lt;br /&gt;
-&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Pinning: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ifelse(value_HD44780_CONNECTION,`HD44780_I2CSUPPORT',`dnl&lt;br /&gt;
 dnl HD44780_PCF8574x_MAPPING(ADR,RS,RW,EN,DB4,DB5,DB6,DB7,BL)&lt;br /&gt;
 HD44780_PCF8574x_MAPPING(0x20, 4, 5, 6, 0, 1, 2, 3, 7)&lt;br /&gt;
')dnl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== using MCP23017 ===&lt;br /&gt;
&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=Porterweiterungen_(Deutsch)&amp;diff=1745</id>
		<title>Porterweiterungen (Deutsch)</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=Porterweiterungen_(Deutsch)&amp;diff=1745"/>
				<updated>2016-12-04T22:01:43Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* 74HC164 als Ausgangserweiterung */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|Porterweiterungen}}&lt;br /&gt;
==Porterweiterungen==&lt;br /&gt;
&lt;br /&gt;
Wenn am AVR schon viele Erweiterungen angeschlossen sind und die freien Ports langsam zur Neige gehen, kann man mit Schieberegistern arbeiten. Zwei dieser Bausteine sind bereits in der SW vorgesehen und können per menuconfig freigeschaltet werden.&lt;br /&gt;
&lt;br /&gt;
=== 74HC165 als Eingangserweiterung ===&lt;br /&gt;
&lt;br /&gt;
Der 74HC165 ist ein 8-bit Parallel-in/Seriell-out Schieberegister. Das kann man z.B. dazu benutzen um mehrere Schalteingänge seriell abzufragen. So könnte man z.B. 8 Taster mit nur 3 Leitungen abfragen und spart in diesem Fall 5 Portleitungen. Diese Schaltung ist kaskadierbar, so daß weitere Eingänge abgefragt werden können ohne mehr Portleitungen zu benötigen.&lt;br /&gt;
&lt;br /&gt;
==== Anschluss ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HC165_DATA: QH (erster 74HC165)&lt;br /&gt;
HC165_CLOCK: CLOCK (alle)&lt;br /&gt;
HC165_LOAD: Shift/Load (alle)&lt;br /&gt;
GND: Clock Inhibit&lt;br /&gt;
&lt;br /&gt;
SERIAL INPUT: QH (zweiter 74HC165)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Schaltbild siehe bei [http://www.mikrocontroller.net/articles/Porterweiterung_mit_SPI#Eing.C3.A4nge www.mikrocontroller.net]&lt;br /&gt;
&lt;br /&gt;
==== Konfiguration ==== &lt;br /&gt;
&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              [*] HC165 input expansion ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [ ] Inverse output&lt;br /&gt;
  │ │                  (1) Number of HC165 registers&lt;br /&gt;
&lt;br /&gt;
In der bei &amp;quot;Hardware/Periphery Class&amp;quot; ausgewählten .m4-Datei muss angegeben werden, wo der erste 74HC165 angeschlossen ist, z.B.:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pin(HC165_DATA, PC3)&lt;br /&gt;
pin(HC165_CLOCK, PC4)&lt;br /&gt;
pin(HC165_LOAD, PC5)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ECMD ====&lt;br /&gt;
{| border=1&lt;br /&gt;
| '''Syntax''' &lt;br /&gt;
| '''Kurze Beschreibung'''&lt;br /&gt;
|- &lt;br /&gt;
| io get pin NUM&lt;br /&gt;
| Liefert als Rückgabewert den Hexadezimalwert vom 74HC165. Pin 4 ist der erste, Pin 5 der zweite etc.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 74HC595 als Ausgangserweiterung ===&lt;br /&gt;
&lt;br /&gt;
Der 74HC595 ist ein 8-bit Seriell-in/Parallel-out Schieberegister mit Latch. Das Latch braucht man, damit beim seriellen reinschieben der Bits diese nicht nacheinander an den Ausgängen erscheinen, sondern erst wenn das ganze Datenwort reingeschoben ist.&lt;br /&gt;
Der 74HC595 ist sogar kaskadierbar, d.h. man kann theoretisch beliebig viele Ausgänge realisieren, ohne weitere Portleitungen zu benötigen.&lt;br /&gt;
&lt;br /&gt;
==== Anschluss ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HC595_DATA: Serial Data Input (SI) (erster 74HC595)&lt;br /&gt;
HC595_CLOCK: SCK (an alle)&lt;br /&gt;
HC595_STORE: RCK (an alle)&lt;br /&gt;
&lt;br /&gt;
QH* bzw. Q7*: Serial Data Input (SI) (zweiter 74HC595)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Hc595_example.png|thumb|Schaltbild 74HC595]]&lt;br /&gt;
&lt;br /&gt;
Weitere Informationen siehe bei [http://www.mikrocontroller.net/articles/Porterweiterung_mit_SPI#Ausg.C3.A4nge www.mikrocontroller.net]&lt;br /&gt;
&lt;br /&gt;
==== Konfiguration ==== &lt;br /&gt;
&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              [*] HC595 output expansion ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  (1) Number of HC595 registers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In der bei &amp;quot;Hardware/Periphery Class&amp;quot; ausgewählten .m4-Datei muss angegeben werden, wo der erste 74HC595 angeschlossen ist, z.B.:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pin(HC595_DATA, PC0)&lt;br /&gt;
pin(HC595_CLOCK, PC1)&lt;br /&gt;
pin(HC595_STORE, PC2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ECMD ====&lt;br /&gt;
{| border=1&lt;br /&gt;
| '''Syntax''' &lt;br /&gt;
| '''Kurze Beschreibung'''&lt;br /&gt;
|- &lt;br /&gt;
| io set port NUM HEXVALUE [MASK]&lt;br /&gt;
| Setzt Port NUM auf den Wert HEXVALUE (ggf. wird die angegebene MASK verwendet). Port 4 ist der erste, Port 5 der zweite 74HC595 etc.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Hinweis zur Portnummer: Die internen Ports (IO_HARD_PORTS) werden soweit vorhanden von 0 .. n nummeriert. Beim ATMega8 also 0..2 ( B,C,D ). Die Porterweiterungen belegen die darauf folgenden Nummern; beim m8 also ab 3.&lt;br /&gt;
&lt;br /&gt;
ECMD funktioniert mit den Porterweiterungen '''NUR WENN''' beim Konfigurieren ( make menuconfig ) unter I/O als &amp;quot;I/O abstraction model&amp;quot; '''Full-featured''' aktiviert wurde.&lt;br /&gt;
&lt;br /&gt;
=== 74HC164 als Ausgangserweiterung ===&lt;br /&gt;
&lt;br /&gt;
Der 74HC164 ist ein 8-bit Seriell-in/Parallel-out Schieberegister. Das kann man z.B. dazu benutzen um ein handelsübliches LCD mit HD44780-Controller mit nur 3 Leitungen anzusteuern (bei direkter Ansteuerung würden 7 Portleitungen benötigt), so wird das bei U. Radig's Webserver gemacht.&amp;lt;br&amp;gt;&lt;br /&gt;
In diesem Fall wird kein Latch benötigt, da das LCD erst beim Schalten seiner &amp;quot;E&amp;quot;-Leitung (enable) die Daten aus dem Schieberegister übernimmt.&lt;br /&gt;
&lt;br /&gt;
Schaltbild siehe bei [http://www.ulrichradig.de/home/index.php/software/avr-webserver-software AVR Webserver Software]&lt;br /&gt;
&lt;br /&gt;
{ ''menuconfig todo'' }&lt;br /&gt;
&lt;br /&gt;
{ ''pinning todo'' }&lt;br /&gt;
&lt;br /&gt;
==D/A-Wandler mit LTC1257==&lt;br /&gt;
&lt;br /&gt;
Der LTC1257 ist ein 12bit Digital-Analog-Wandler mit seriellem Eingang und interner Referenzspannung. Zur Steuerung benötigt er lediglich 3 Portleitungen. Da er laut [http://cds.linear.com/docs/Datasheet/1257fb.pdf Datenblatt] mindestens 4,75 Volt Versorgungsspannung braucht, ist er nicht in Systemen mit 3,3 Volt einsetzbar. &lt;br /&gt;
&lt;br /&gt;
=== Anschluss ===&lt;br /&gt;
&lt;br /&gt;
Für eine einfache Form der Anbindung siehe Schaltbild.&lt;br /&gt;
&lt;br /&gt;
[[File:LTC1257.png|thumb|Schaltbild LTC1257]]&lt;br /&gt;
&lt;br /&gt;
=== Konfiguration ===&lt;br /&gt;
&lt;br /&gt;
  │ │          I/O ---&amp;gt; &lt;br /&gt;
  ...&lt;br /&gt;
  │ │              [*] digital-to-analog converter (DAC)  ---&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  │ │                  [*] LTC1257 Output&lt;br /&gt;
  │ │                  (4) LTC1257: Maximum number of devices&lt;br /&gt;
&lt;br /&gt;
Das nötige Pinning ist für AVR-NET-IO bereits vorhanden, in der Zuordnung&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pin(LTC1257_CLK, PA2, OUTPUT)&lt;br /&gt;
pin(LTC1257_DATA, PA1, OUTPUT)&lt;br /&gt;
pin(LTC1257_LOAD, PA0, OUTPUT)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mit &amp;lt;code&amp;gt;ltc1257_init&amp;lt;/code&amp;gt; werden die Portleitungen passend initialisiert (lt. Datenblatt).&lt;br /&gt;
&lt;br /&gt;
Mit &amp;lt;code&amp;gt;ltc1257_delay&amp;lt;/code&amp;gt; kann die interne Wartezeit in µs gesetzt werden, die zum Erkennen des Flankenwechsels durch den DAC beim Schreiben eines Bits gewartet wird (ist vor allem hilfreich, wenn der LTC1257 über Optopkoppler (z.B. CNY17) entkoppelt ist).&lt;br /&gt;
&lt;br /&gt;
Mit &amp;lt;code&amp;gt;ltc1257_set&amp;lt;/code&amp;gt; werden die tatsächlichen Werte gesetzt, die der LTC1257 dann als Analogsignal ausgibt. Bei der Verwendung von mehreren LTC1257 im Daisy Chain muss die Reihenfolge der Werte für &amp;lt;code&amp;gt;ltc1257_set&amp;lt;/code&amp;gt; in der &amp;lt;b&amp;gt;umgekehrten&amp;lt;/b&amp;gt; Reihenfolge der DACs gesendet werden (d.h. das erste Argument ist für den letzten DAC).&lt;br /&gt;
&lt;br /&gt;
[[Category:Ethersex]]&lt;br /&gt;
[[Category:Hardware]]&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=Features&amp;diff=1744</id>
		<title>Features</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=Features&amp;diff=1744"/>
				<updated>2016-12-04T22:00:00Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* Hardware Drivers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|Features}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supported Network Hardware ==&lt;br /&gt;
&lt;br /&gt;
* Ethernet [[ENC28J60 | Microchip's ENC28J60]] with IEEE 802.1q VLAN tagging&lt;br /&gt;
* [[USB]]&lt;br /&gt;
* [[RFM12]]&lt;br /&gt;
* [[ZBUS]]&lt;br /&gt;
&lt;br /&gt;
== Network Protocols ==&lt;br /&gt;
&lt;br /&gt;
* IPv4, IPv4&lt;br /&gt;
* TCP/IP, UDP/IP and ICMP&lt;br /&gt;
* DNS&lt;br /&gt;
* mDNS (Avahi)&lt;br /&gt;
* [[BOOTP]]&lt;br /&gt;
* [[DHCP]]&lt;br /&gt;
* TFTP (can be used in combination with the [[Ethernet Loader]])&lt;br /&gt;
* SYSLOG&lt;br /&gt;
* [[SNMP]]&lt;br /&gt;
* SMTP&lt;br /&gt;
* [[NTP]] (Client and Server)&lt;br /&gt;
* DynDNS&lt;br /&gt;
* MySQL (Client)&lt;br /&gt;
* IRC (Client)&lt;br /&gt;
* [[XMPP | XMPP / Jabber Client]]&lt;br /&gt;
* MPD (Music Player Daemon)&lt;br /&gt;
* [[SOAP]] / XMLRPC&lt;br /&gt;
* [[UPnP]]&lt;br /&gt;
* [[Artnet]]&lt;br /&gt;
&lt;br /&gt;
== Hardware Drivers ==&lt;br /&gt;
&lt;br /&gt;
* [[Onewire]]&lt;br /&gt;
* [[I2C | I2C Master / Slave]] &lt;br /&gt;
* [[ADC input]]&lt;br /&gt;
* [[PWM Generator]]&lt;br /&gt;
* [[RFM12_FS20]]&lt;br /&gt;
* [[RFM12_ASK]]&lt;br /&gt;
* [[Generic ASK Modules]]&lt;br /&gt;
* [[Bluetooth|Bluetooth SPP]]&lt;br /&gt;
* [[USB]]&lt;br /&gt;
* [[PS/2 Keyboard]]&lt;br /&gt;
* [[Button Input]]&lt;br /&gt;
* [[HC595]]&lt;br /&gt;
* [[HC165]]&lt;br /&gt;
* [[HD44780]] alphanumeric character LCDs&lt;br /&gt;
* [[IRMP | IR Receivers]]&lt;br /&gt;
* [[SRAM]]&lt;br /&gt;
&lt;br /&gt;
== Software Modules ==&lt;br /&gt;
&lt;br /&gt;
* [[Ethersex Lighting Architecture]]&lt;br /&gt;
** [[Starburst]]&lt;br /&gt;
** [[StellaLight]]&lt;br /&gt;
** [[DMX Storage]]&lt;br /&gt;
** [[DMX FXSlot]]&lt;br /&gt;
* [[Cron | Cron Daemon]]&lt;br /&gt;
* [[System Clock | Clock ]]&lt;br /&gt;
* [[VNC Server]]&lt;br /&gt;
* [[lome6]]&lt;br /&gt;
* [[Frequency Counter]]&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1743</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1743"/>
				<updated>2016-12-04T21:58:25Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The HD44780 module provides support for common alphanumeric character LCDs using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
== Direct ==&lt;br /&gt;
== I2C ==&lt;br /&gt;
== Serial (using 74HCT164) ==&lt;br /&gt;
== 2-Wire (using 74HCT4094) ==&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1742</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1742"/>
				<updated>2016-12-04T21:52:54Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|HD44780}}&lt;br /&gt;
&lt;br /&gt;
{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The HD44780 module provides support for common alphanumeric character LCDs using Hitachis HD44780 and compatible controllers.&lt;br /&gt;
&lt;br /&gt;
= Supported LC-Displays =&lt;br /&gt;
&lt;br /&gt;
= Pinning =&lt;br /&gt;
&lt;br /&gt;
= ECMD =&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1741</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1741"/>
				<updated>2016-12-04T21:45:25Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/lcd https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=HD44780&amp;diff=1740</id>
		<title>HD44780</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=HD44780&amp;diff=1740"/>
				<updated>2016-12-04T21:44:54Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: Created page with &amp;quot;{{Module |NAME=HD44780 |MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD) |STATUS={{stable}} |PINNING=yes |ECMD={{has_ecmd}} |CONTROL6={{has_control6}} |...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Module&lt;br /&gt;
|NAME=HD44780&lt;br /&gt;
|MENUCONFIG={{I/O}}-&amp;gt;LCD Displays-&amp;gt;HD44780 module driver (Character-LCD)&lt;br /&gt;
|STATUS={{stable}}&lt;br /&gt;
|PINNING=yes&lt;br /&gt;
|ECMD={{has_ecmd}}&lt;br /&gt;
|CONTROL6={{has_control6}}&lt;br /&gt;
|DEPENDS=[[ECMD]]&lt;br /&gt;
|REQUIRES= -&lt;br /&gt;
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/onewire https://github.com/ethersex/ethersex/tree/master/hardware/lcd]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=Features&amp;diff=1739</id>
		<title>Features</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=Features&amp;diff=1739"/>
				<updated>2016-12-04T19:59:56Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* Hardware Drivers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|Features}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supported Network Hardware ==&lt;br /&gt;
&lt;br /&gt;
* Ethernet [[ENC28J60 | Microchip's ENC28J60]] with IEEE 802.1q VLAN tagging&lt;br /&gt;
* [[USB]]&lt;br /&gt;
* [[RFM12]]&lt;br /&gt;
* [[ZBUS]]&lt;br /&gt;
&lt;br /&gt;
== Network Protocols ==&lt;br /&gt;
&lt;br /&gt;
* IPv4, IPv4&lt;br /&gt;
* TCP/IP, UDP/IP and ICMP&lt;br /&gt;
* DNS&lt;br /&gt;
* mDNS (Avahi)&lt;br /&gt;
* [[BOOTP]]&lt;br /&gt;
* [[DHCP]]&lt;br /&gt;
* TFTP (can be used in combination with the [[Ethernet Loader]])&lt;br /&gt;
* SYSLOG&lt;br /&gt;
* [[SNMP]]&lt;br /&gt;
* SMTP&lt;br /&gt;
* [[NTP]] (Client and Server)&lt;br /&gt;
* DynDNS&lt;br /&gt;
* MySQL (Client)&lt;br /&gt;
* IRC (Client)&lt;br /&gt;
* [[XMPP | XMPP / Jabber Client]]&lt;br /&gt;
* MPD (Music Player Daemon)&lt;br /&gt;
* [[SOAP]] / XMLRPC&lt;br /&gt;
* [[UPnP]]&lt;br /&gt;
* [[Artnet]]&lt;br /&gt;
&lt;br /&gt;
== Hardware Drivers ==&lt;br /&gt;
&lt;br /&gt;
* [[Onewire]]&lt;br /&gt;
* [[I2C | I2C Master / Slave]] &lt;br /&gt;
* [[ADC input]]&lt;br /&gt;
* [[PWM Generator]]&lt;br /&gt;
* [[RFM12_FS20]]&lt;br /&gt;
* [[RFM12_ASK]]&lt;br /&gt;
* [[Generic ASK Modules]]&lt;br /&gt;
* [[Bluetooth|Bluetooth SPP]]&lt;br /&gt;
* [[USB]]&lt;br /&gt;
* [[PS/2 Keyboard]]&lt;br /&gt;
* [[Button Input]]&lt;br /&gt;
* [[HC595]]&lt;br /&gt;
* [[HC165]]&lt;br /&gt;
* [[HD44780]]&lt;br /&gt;
* [[IRMP | IR Receivers]]&lt;br /&gt;
* [[SRAM]]&lt;br /&gt;
&lt;br /&gt;
== Software Modules ==&lt;br /&gt;
&lt;br /&gt;
* [[Ethersex Lighting Architecture]]&lt;br /&gt;
** [[Starburst]]&lt;br /&gt;
** [[StellaLight]]&lt;br /&gt;
** [[DMX Storage]]&lt;br /&gt;
** [[DMX FXSlot]]&lt;br /&gt;
* [[Cron | Cron Daemon]]&lt;br /&gt;
* [[System Clock | Clock ]]&lt;br /&gt;
* [[VNC Server]]&lt;br /&gt;
* [[lome6]]&lt;br /&gt;
* [[Frequency Counter]]&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	<entry>
		<id>http://www.ethersex.de/index.php?title=Features&amp;diff=1738</id>
		<title>Features</title>
		<link rel="alternate" type="text/html" href="http://www.ethersex.de/index.php?title=Features&amp;diff=1738"/>
				<updated>2016-12-04T19:59:34Z</updated>
		
		<summary type="html">&lt;p&gt;Michaelb: /* Hardware Drivers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{i18n|Features}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supported Network Hardware ==&lt;br /&gt;
&lt;br /&gt;
* Ethernet [[ENC28J60 | Microchip's ENC28J60]] with IEEE 802.1q VLAN tagging&lt;br /&gt;
* [[USB]]&lt;br /&gt;
* [[RFM12]]&lt;br /&gt;
* [[ZBUS]]&lt;br /&gt;
&lt;br /&gt;
== Network Protocols ==&lt;br /&gt;
&lt;br /&gt;
* IPv4, IPv4&lt;br /&gt;
* TCP/IP, UDP/IP and ICMP&lt;br /&gt;
* DNS&lt;br /&gt;
* mDNS (Avahi)&lt;br /&gt;
* [[BOOTP]]&lt;br /&gt;
* [[DHCP]]&lt;br /&gt;
* TFTP (can be used in combination with the [[Ethernet Loader]])&lt;br /&gt;
* SYSLOG&lt;br /&gt;
* [[SNMP]]&lt;br /&gt;
* SMTP&lt;br /&gt;
* [[NTP]] (Client and Server)&lt;br /&gt;
* DynDNS&lt;br /&gt;
* MySQL (Client)&lt;br /&gt;
* IRC (Client)&lt;br /&gt;
* [[XMPP | XMPP / Jabber Client]]&lt;br /&gt;
* MPD (Music Player Daemon)&lt;br /&gt;
* [[SOAP]] / XMLRPC&lt;br /&gt;
* [[UPnP]]&lt;br /&gt;
* [[Artnet]]&lt;br /&gt;
&lt;br /&gt;
== Hardware Drivers ==&lt;br /&gt;
&lt;br /&gt;
* [[Onewire]]&lt;br /&gt;
* [[I2C | I2C Master / Slave]] &lt;br /&gt;
* [[ADC input]]&lt;br /&gt;
* [[PWM Generator]]&lt;br /&gt;
* [[RFM12_FS20]]&lt;br /&gt;
* [[RFM12_ASK]]&lt;br /&gt;
* [[Generic ASK Modules]]&lt;br /&gt;
* [[Bluetooth|Bluetooth SPP]]&lt;br /&gt;
* [[USB]]&lt;br /&gt;
* [[PS/2 Keyboard]]&lt;br /&gt;
* [[Button Input]]&lt;br /&gt;
* [[HC595]]&lt;br /&gt;
* [[HC165]]&lt;br /&gt;
* [[HD44780 | alphanumeric LCD]]&lt;br /&gt;
* [[IRMP | IR Receivers]]&lt;br /&gt;
* [[SRAM]]&lt;br /&gt;
&lt;br /&gt;
== Software Modules ==&lt;br /&gt;
&lt;br /&gt;
* [[Ethersex Lighting Architecture]]&lt;br /&gt;
** [[Starburst]]&lt;br /&gt;
** [[StellaLight]]&lt;br /&gt;
** [[DMX Storage]]&lt;br /&gt;
** [[DMX FXSlot]]&lt;br /&gt;
* [[Cron | Cron Daemon]]&lt;br /&gt;
* [[System Clock | Clock ]]&lt;br /&gt;
* [[VNC Server]]&lt;br /&gt;
* [[lome6]]&lt;br /&gt;
* [[Frequency Counter]]&lt;/div&gt;</summary>
		<author><name>Michaelb</name></author>	</entry>

	</feed>