Skip to contentSkip to conversation

HD44780 LCD Controller

PATCH In review Filip Navara 1 participant 1 message Jul 15, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 14/14 HD44780 LCD Controller

Only very simple emulation of the LCD controller is included.

The controller features the standard HD44780 interface and supports character output on four lines using a static 5x7 font and optional backlight controlled by signal on a separate pin.

Capabilities such as custom characters, cursor and 5x10 fonts are not implemented. Saving/loading of device state is not implemented either.

---
 Makefile.target |    2 +-
 hw/at91pes.c    |   10 ++
 hw/hd44780.c    |  418 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 429 insertions(+), 1 deletions(-)
 create mode 100644 hw/hd44780.c
Makefile.target +1 -1
index dca5340..74d7d5e 100644
@@ -668,7 +668,7 @@ obj-y += syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o
 obj-y += syborg_virtio.o
 obj-y += at91_aic.o at91_dbgu.o at91_pio.o at91_pit.o at91_pmc.o at91_rtt.o
 obj-y += at91_rstc.o at91_intor.o at91_tc.o at91_emac.o at91pes.o
-obj-y += gpio_rotary.o gpio_keypad.o
+obj-y += gpio_rotary.o gpio_keypad.o hd44780.o
 CPPFLAGS += -DHAS_AUDIO
 endif
 ifeq ($(TARGET_BASE_ARCH), sh4)
hw/at91pes.c +10 -0
index 544eaaf..b58cc25 100644
@@ -95,6 +95,16 @@ static void at91pes_init(ram_addr_t ram_size,
     sysbus_mmio_map(sysbus_from_qdev(dev), 0, 0xFFFDC000);
     sysbus_connect_irq(sysbus_from_qdev(dev), 0, pic[16]);
 
+    dev = qdev_create(NULL, "gpio,hd44780");
+    qdev_init(dev);
+    for (i = 0; i < 3; i++)
+        qdev_connect_gpio_out(pioa, 15 - i, qdev_get_gpio_in(dev, 8 + i));
+    qdev_connect_gpio_out(piob, 28, qdev_get_gpio_in(dev, 11));
+    for (i = 0; i < 4; i++) {
+        qdev_connect_gpio_out(pioa, 5 + i, qdev_get_gpio_in(dev, 4 + i));
+        qdev_connect_gpio_out(dev, 4 + i, qdev_get_gpio_in(pioa, 5 + i));
+    }
+
     dev = qdev_create(NULL, "gpio,keypad");
     qdev_set_prop_ptr(dev, "keys", keys);
     qdev_init(dev);
hw/hd44780.c new file +418 -0

418 lines not on this page · raw message

Signature · 1 line
1.6.3.msysgit.0