Character LCD |
Description |
Character LCDs are available for few money in many different variants, most of them comply to the HD44780 industrial standard from Hitachi. Regardless of the number of provided characters (2x16, 2x20, 4x16, 4x20, 2x40), they are communicating over the same bus interface with the core. But note, that the supported display types depend on the firmware or MIOS application. For instance, if you connect a 2x20 characters display to the MIDIbox64, the 2x4 field at the right side will stay blank. MIOS applications are mostly more flexible and allow you to customize the screen by enhancing the source code, therefore a general statement - which LCD is the best for your MIDIbox - cannot be given here. Please search on the project pages for more informations regarding the supported display sizes or ask in the MIDIbox forum if you are unsure. Availability:At every good sorted electronic store and especially at EBay (search for 2x16 lcd or similar). Order numbers for Reichelt: LCD 162C LED (2x16 with backlight, 12.70 EUR), LCD 164A LED (4x16 with backlight, 20.90 EUR), LCD 202A LED (2x20 with backlight, 13.10 EUR), LCD 204A LED (4x20 with backlight, 27.20 EUR)
|
MIOS8 Connectivity: During the design phase of the core module I took focus on easy soldering and tried to place as less bridges as possible on the board. As an side effect, the pin assignments of the LCD interface J15 unfortunately aren't 1:1. So, you have to take special care for the interconnections. Following schematic show, how to connect a LCD 162C display from Displaytech to the interface. Please note, that the pin assignments are different on some other displays! Sometimes the pins are mirrored, sometimes the backlight pads are on another place. Fortunately the order of the bus pins is the same on every display! So, before you buy one, try also to get a datasheet from the display: consult www.google.com, keywords: "displayname datasheet".
Wiring Diagram: mbhp_lcd_mios8.pdf
If a PIC18F4685 is used in the project (-> MIDIbox SID V2), the LCD is accessed in 4bit mode. Accordingly, the data pins D0/D1/D2 and D3 should be left open at core and LCD side (don't connect them to ground!) - see mbhp_lcd_4bit_mios8.pdf |
MIOS32 Connectivity: thanks to the double sided PCB layout, the pinning is 1:1 (*)! Following schematic shows, how to connect a LCD 162C display from Displaytech to the interface. Please note, that the pin assignments are different on some other displays! Sometimes the pins are mirrored, sometimes the backlight pads are on another place. Fortunately the order of the bus pins is the same on every display! So, before you buy one, try also to get a datasheet from the display: consult www.google.com, keywords: "displayname datasheet".
Wiring Diagram for 2x16: mbhp_lcd_mios32.pdf
Wiring Diagram for 2x20 (and 2x40): mbhp_lcd_2x20_mios32.pdf
(*) it's 1:1 and mirrored to simplify the cabling of common 2x40 displays (and partly due to historical reasons - it's originated from the so called "UltraPCB"). Pictures of LCD cable for 2x40 displays: Image1 Image2 |
2 x Character LCDs |
Two character LCDs are natively supported by MIOS, but only two applications are using this option yet: MIDIbox LC and MIDIbox SEQ. However, people with programming skills are free to add this option also to their own MIOS application (the second display can be addressed by adding 0x80 to the cursor position). |
MIOS8 Connectivity: Both displays have to be connected to the same data and control pins at J15, only the E (enable) input of the second LCD requires a dedicated output (pin C.4, J10:RC) which is not routed to J15 and therefore has to be soldered directly to the core module.
Wiring Diagram: mbhp_2xclcd_mios8.pdf |
MIOS32 Connectivity: the MBHP_CORE_STM32 and MBHP_CORE_LPC17 module provides two LCD ports (J15A and J15B) where displays can be directly plugged in without the need for an adapter cable. |
Photo: follow this link |
Multiple Character LCDs |
MIOS8: A special driver module is available which allows to connect up to 8 CLCDs to a single core (clcd_multi). Displays have to be selected with the USER_LCD_Select function by the application.
Connectivity: any free pin of the PIC can be used for the enable line. For instance, if your application doesn't use the analog pins at J5 of the core module, you are able to connect 8 additional LCDs. You could also program a multiplexer interface in order to address even more LCDs by routing the enable line to one PIC pin.
Wiring Diagram: mbhp_nxclcd_mios8.pdf
|
MIOS32: the standard CLCD driver is prepared for controlling up to 256 devices selected via MIOS32_LCD_DeviceSet(). Please understand this value as a theoretical possibility, physical parameters (like cable capacities) have to be considered as well. ;-)
Connectivity: see this MIDIbox NG Manual Chapter.
Wiring Diagram: mbhp_nxclcd_mios32.pdf
|
EA DOGM26xx-A LCDs |
These modern character LCDs are easy to mount on a PCB, and faster than HD44780 based displays, although they are almost compatible. A special configuration sequence is required, which is provided by the driver module under modules/app_lcd/dog.
|
MIOS8 Wiring Diagram: mbhp_lcd_dog_mios8.pdf |
MIOS32 Wiring Diagram: mbhp_lcd_dog_mios32.pdf |
Photos: 3 lines, One small, one big line, Sideview, additional ICs can be stuffed under LCD, e.g. a DINX1. |
KS0107/KS0108 or HD61202 based graphical LCD |
GLCDs which are KS0107/KS0108 or HD61202 compatible are the preferred displays when using the graphic LCD option of MIOS8 (for MIOS32 the access performance doesn't matter). GLCDs are handled like character LCDs, that means that you can use the same MIOS_LCD_* functions to set the cursor and to print characters, strings and values. By default 5x8 characters are used, but you are also able to change the font in order to print bigger or smaller characters, icons or pictures.
The performance of the KS0107 and HD61202 controller is perfect, as the pixel information is stored in the vertical direction. This means, that only 5 bus accesses are required to print a 5x8 character (however, the Y position must be aligned to 8 pixels in the vertical direction). Note that currently only the MIDIbox LC applications gets use of customized fonts and icons. |
MIOS8 Connectivity: the bus interface is similar to a character based LCD, but every 64x64 segment needs a CS (chip select) line. Since these lines are gated through the E (enable) pin, it was possible to share the CS lines with other PIC outputs. The MIOS driver takes care for possible conflicts.
All graphical LCDs require a negative voltage to drive the Liquid Crystal cells. Some LCDs provide an inbuild DC converter, some others not. The schematic below shows a MAX759 voltage converter which can be used if a Vout pin is not provided by the GLCD.
Wiring Diagram: mbhp_lcd_ks0108_mios8.pdf and mbhp_lcd_64240a_mios8.pdf (Displaytech 64240A) |
MIOS32 Connectivity: the bus interface is similar to a character based LCD, but every 64x64 segment needs a CS (chip select) line which is available at J28 (MBHP_CORE_STM32: J5C).
All graphical LCDs require a negative voltage to drive the Liquid Crystal cells. Some LCDs provide an inbuild DC converter, some others not. The schematic below shows a MAX759 voltage converter which can be used if a Vout pin is not provided by the GLCD.
Wiring Diagram: mbhp_lcd_ks0108_mios32.pdf |
Photos: follow this link or see the MIDIbox LC in Action: [1] [2] [3] |
SED1520 based graphical LCD |
GLCDs which are SED1520 compatible are an inexpensive alternative solution for KS0108 based displays.
E.g. the "Wintek WD-G1203T" with 122x32 pixel resolution available at Pollin is sold for only 2 EUR!
Please note that not every SED1520 based GLCD at Pollin is recommendable. E.g. the "LCD Datavision DG-12232" didn't work at my side. It would also need a negative display voltage and 50V AC (!) to supply the EL backlight - forget this display! ;-)
SED1520 displays are only supported by MIOS32!
|
MIOS8 Connectivity: not supported |
MIOS32 Connectivity: the bus interface is similar to a character based LCD, but every 61x32 segment needs a CS (chip select) line which is available at J28 (MBHP_CORE_STM32: J5C).
Wiring Diagram: mbhp_lcd_sed1520_mios32.pdf |
Photos: follow this link |
T6963C based graphical LCD, horizontal screen |
T6963C based displays are cheap and popular, but the performance is extreme poor compared to KS0108 which has been introduced above, therefore the use of such displays is not recommended for MIOS8, although a "custom driver" is provided. The driver ensures that the display can be accessed in the same way like a KS0108 based LCD, but since the pixel information is stored in the horizontal direction, MIOS has to rotate every character, icon and picture by 90 degress. And it has to take care that only the shape of the character will be overwritten (-> in worst case two Read-Modify-Write transfers have to be performed for every 8-bit word). This means, that 2*5*8 = 80 bus accesses are required to print a 5x8 character! |
MIOS8: this display should only be used for applications which don't rely on realtime behaviour. This display is not qualified for MIOS8 applications which receive MIDI data as there is a potential risk of buffer overruns.
Connectivity: the bus interface is similar to a character based LCD.
All graphical LCDs require a negative voltage to drive the Liquid Crystal cells. Some LCDs provide an inbuild DC converter, some others not. The schematic below shows a MAX759 voltage converter which can be used if a Vout pin is not provided by the GLCD.
Wiring Diagram: mbhp_lcd_t6963c_mios8.pdf |
MIOS32: the situation is much more relaxed for MIOS32, as the driver uses an internal graphical buffer to avoid read-modify-write accesses. And thanks to the capability of RTOS to run the LCD output task at low priority, the performance of higher priority tasks (such as MIDI receiver) is not affected! :-)
Wiring Diagram: mbhp_lcd_t6963c_mios32.pdf |
Photo: follow this link |
T6963C based graphical LCD, vertical screen |
There is an alternative driver for T6963C based display available which doesn't rotate the T6963C screen output by 90 degress, therefore the performance is much better compared to the "horizontal" driver (realtime behaviour is given again). However, such variations are only practicable for very customized applications and only usefull for experienced people with programming skills. |
MIOS8 Wiring Diagram: mbhp_lcd_t6963c_mios8.pdf |
MIOS32 Wiring Diagram: mbhp_lcd_t6963c_mios32.pdf |
Photo: follow this link |
PCD8544 based graphical LCD |
PCD8544 LCDs are very small and providing only a resolution of 84x48. But they are connected via a serial interface with a small number of wires to the MIOS core, therefore up to 8 LCDs can be handled by the driver w/o performance loss. It's possible to use three of the displays as KS0108 replacement for MIDIbox LC, but you can also use it with any other MIDIbox --- also a completely new designed MIDIbox application could be programmed which gets use of all 8 displays (e.g. for 8 control channels) --- but please keep in mind, that due to the low resolution only 14x6 characters are displayed by default. A smaller font could be used to display 21 or 28 characters per line, but the appr. program modifications won't be supported from my side (you have to write the appr. code into the application by yourself).
Note: regardless of the serial interface, the performance of this display is even better than the performance of a KS0108. I whished the manufacturers would produce larger displays with this perfect interface! |
MIOS8 Wiring Diagrams: mbhp_lcd_pcd8544_single_mios8.pdf, mbhp_lcd_pcd8544_multiple_mios8.pdf |
MIOS32 Wiring Diagrams: mbhp_lcd_pcd8544_single_mios32.pdf, mbhp_lcd_pcd8544_multiple_mios32.pdf |
Photo: follow this link
More informations: see this sourceforge page. |
DOGM and DOGL Displays |
This 128x64 graphical LCD allows to add a touchscreen panel which can be scanned with two ADC channels as demonstrated in this application.
Up to 8 DOGM displays can be (natively) controlled by a MIOS32 based core, they are accessed via 4-wire serial interface.
MIDIbox NG even supports up to 64 SSD1306 displays!
IMPORTANT: please power-cycle the MBHP_CORE_LPC17 module whenever the lcd_type has been changed, otherwise the GLCD won't be initialized correctly (it has to be reset!) |
MIOS8 Wiring Diagrams: not adapted (yet) |
MIOS32 Wiring Diagrams: mbhp_lcd_dogm128_mios32.pdf |
Photo: follow this link
|
SSD1306 based OLED |
The tiny OLEDs which are available today provide high resolution and nice looking colours for an attractive price of typically 4..8 EUR. If you are searching for OLEDs, take care that they come with a breakout board, because soldering the pads on a veroboard is almost impossible, and some caps for the integrated DCDC to generate higher voltages have to be added as well... no fun! I found an attractive OLED/PCB combination from Alientek at Taobao which is recommendable. Buy it via Yoybuy for easier handling if you don't like shops w/o english translations.
Up to 8 OLEDs can be (natively) controlled by a MIOS32 based core, they are accessed via 4-wire serial interface.
MIDIbox NG even supports up to 64 SSD1306 displays!
IMPORTANT: please power-cycle the MBHP_CORE_LPC17 module whenever the lcd_type has been changed, otherwise the GLCD won't be initialized correctly (it has to be reset!) |
MIOS8 Wiring Diagrams: not adapted (yet) |
MIOS32 Wiring Diagrams: mbhp_lcd_ssd1306_single_mios32.pdf, mbhp_lcd_ssd1306_multiple_mios32.pdf |
Photo: follow this link and this link
|
Custom LCD driver |
MIOS8: since MIOS V1.3 it is possible to integrate a custom LCD driver into the application. This allows programmers to write low-level drivers not only for GLCDs, but also for IIC or LED digit displays, without "touching" the operating system. And they are able to use the same MIOS_LCD_* functions like for other displays. Two examples are already mentioned above - the T6963C driver has been removed from the main MIOS8 release and is now available as separate driver (module/app_lcd/app_lcd.inc) which can be linked into every application.
Another example is given with the IIC driver which accesses Magic Orbital LCDs via the IIC interface. This interface is normaly used by the BankStick, but can also be used to access other IIC devices (all IIC devices are connected to port CORE:J4 in parallel like shown in this schematic. |
MIOS32: each LCD has a separate driver which is selelected from the Makefile with an environment variable: modules/app_lcd/$MIOS32_LCD - the source code of all drivers is stored in the repository. The "universal" driver is used by default (to developers: 'export MIOS32_LCD=universal') and allows to select the most favourite LCDs during boot phase (and runtime). Users would typically specify the LCD type and dimensions with the bootloader update application which is available in the MIOS 32 download section. |