Subversion Repositories svn.mios

Rev

Rev 919 | Rev 1001 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
163 tk 1
HEADER 3 MBHP LCD Module
2
 
3
<H1>MIDIbox Hardware Platform, LCD Infos</H1>
4
 
5
<P><CENTER><IMG SRC="mbhp/mbhp_lcd.jpg" width=500 height=117></CENTER></P>
6
 
810 tk 7
<P CLASS=INFO>J15 of the core module allows to connect one or more LCDs. Following table gives you informations on the supported types and connection diagrams. Additional LCD types could be supported in future. The driver concept is modular; the source code is located under $MIOS_PATH/modules/app_lcd/* (resp. $MIOS32_PATH/modules/app_lcd).</P>
163 tk 8
 
810 tk 9
<P CLASS=INFO>Please note that there are some additional hints at the <A HREF="http://www.midibox.org/dokuwiki/doku.php?id=home:mbhp:module:lcd" TARGET="_blank">MIDIbox Wiki</A> page!</P>
163 tk 10
 
11
<DL>
12
   <DT><H2> <IMG SRC="images/bullet.gif" ALT=""> Supported LCD options </H2></DT>
13
   <DD>
14
   <DD><TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
15
    <TR>
810 tk 16
      <TD COLSPAN=2 CLASS=TABCOLOR1><FONT SIZE=3><STRONG>Character LCD</STRONG></FONT></TD>
163 tk 17
    </TR>
18
    <TR>
810 tk 19
      <TD COLSPAN=2 CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Description</STRONG></FONT></TD>
163 tk 20
    </TR>
21
    <TR>
883 tk 22
      <TD COLSPAN=2 CLASS=TABCOLOR2>Character LCDs are available for few money in many different variants, most of them comply to the HD44780 industrial standard from <A HREF="http://semiconductor.hitachi.com" TARGET="_blank">Hitachi</A>. 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 <A HREF="http://forum.midibox.org">MIDIbox forum</A> if you are unsure.<BR><B>Availability:</B>At every <A HREF="http://www.midibox.org/dokuwiki/doku.php?id=where_to_order_components">good sorted electronic store</A> and especially at <A HREF="http://www.ebay.de" TARGET="_blank">EBay</A> (search for <I>2x16 lcd</I> or similar). Order numbers for <A HREF="http://www.reichelt.de" TARGET="_blank">Reichelt</A>: 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)<BR>
163 tk 23
    </TR>
810 tk 24
    <TR>
25
      <TD CLASS=TABCOLOR2><B>MIOS8 Connectivity:</B> 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.<BR>Following schematic show, how to connect a LCD 162C display from <A HREF="http://www.displaytech.com.hk/" TARGET="_blank">Displaytech</A> to the interface. <I>Please note, that the pin assignments are different on some other displays!</I> 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 <A HREF="http://www.google.com" TARGET="_blank">www.google.com</A>, keywords: "displayname datasheet".<BR>
26
<B>Wiring Diagram:</B> <A HREF="mbhp/mbhp_lcd_mios8.pdf">mbhp_lcd_mios8.pdf</A><BR>
27
If a PIC18F4685 is used in the project (-> <A HREF="midibox_sid.html">MIDIbox SID V2</A>), 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 <A HREF="mbhp/mbhp_lcd_4bit_mios8.pdf">mbhp_lcd_4bit_mios8.pdf</A></TD>
883 tk 28
      <TD CLASS=TABCOLOR2><B>MIOS32 Connectivity:</B> thanks to the double sided PCB layout, the pinning is 1:1 (*)!<BR>Following schematic shows, how to connect a LCD 162C display from <A HREF="http://www.displaytech.com.hk/" TARGET="_blank">Displaytech</A> to the interface. <I>Please note, that the pin assignments are different on some other displays!</I> 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 <A HREF="http://www.google.com" TARGET="_blank">www.google.com</A>, keywords: "displayname datasheet".<BR>
29
<B>Wiring Diagram:</B> <A HREF="mbhp/mbhp_lcd_mios32.pdf">mbhp_lcd_mios32.pdf</A><BR>
30
<B>(*) it's 1:1 and mirrored</B> to simplify the cabling of common 2x40 displays (and partly due to historical reasons - it's originated from the so called "UltraPCB").<BR> Pictures of LCD cable for 2x40 displays:</B> <A HREF="mbhp/mbhp_core_stm32_lcd_cable1.jpg">Image1</A> <A HREF="mbhp/mbhp_core_stm32_lcd_cable2.jpg">Image2</A></TD>
810 tk 31
    </TR>
163 tk 32
 
33
    <TR>
810 tk 34
      <TD COLSPAN=2 CLASS=TABCOLOR1><FONT SIZE=3><STRONG>2 x Character LCDs</STRONG></FONT></TD>
163 tk 35
    </TR>
36
    <TR>
810 tk 37
      <TD COLSPAN=2 CLASS=TABCOLOR2>Two character LCDs are natively supported by <A HREF="mios.html">MIOS</A>, 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).</TD>
38
    </TR>
39
    <TR>
40
      <TD CLASS=TABCOLOR2>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.<BR>
41
<B>Wiring Diagram:</B> <A HREF="mbhp/mbhp_2xclcd_mios8.pdf">mbhp_2xclcd_mios8.pdf</A></TD>
42
      <TD CLASS=TABCOLOR2>MIOS32 Connectivity: the <A HREF="mbhp_core_stm32.html">MBHP_CORE_STM32</A> module provides two LCD ports (J15A and J15B) where displays can be directly plugged in without the need for an adapter cable.</TD>
43
    </TR>
44
    </TR>
45
    <TR>
46
      <TD COLSPAN=2 CLASS=TABCOLOR2><B>Photo:</B> <A HREF="http://www.midibox.org/midibox_gallery/axel15.jpg">follow this link</A></TD></TD>
47
    </TR>
163 tk 48
 
49
    <TR>
810 tk 50
      <TD COLSPAN=2 CLASS=TABCOLOR1><FONT SIZE=3><STRONG>Multiple Character LCDs</STRONG></FONT></TD>
163 tk 51
    </TR>
52
    <TR>
810 tk 53
      <TD CLASS=TABCOLOR2>MIOS8: A special driver module is available which allows to connect up to 8 CLCDs to a single core (<A HREF="http://svnmios.midibox.org/listing.php?repname=svn.mios&path=%2Ftrunk%2Fmodules%2Fapp_lcd%2Fclcd_multi%2F" TARGET="_blank">clcd_multi</A>). Displays have to be selected with the USER_LCD_Select function by the application.<BR>
54
<B>Connectivity:</B> 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.<BR>
55
<B>Wiring Diagram:</B> <A HREF="mbhp/mbhp_nxclcd_mios8.pdf">mbhp_nxclcd_mios8.pdf</A><BR></TD>
56
      <TD CLASS=TABCOLOR2>MIOS32: the standard CLCD driver is prepared for controlling up to 256 enable lines selected via MIOS32_LCD_DeviceSet().<BR>
57
<B>Connectivity:</B> any free pin of the STM32 can be used for the enable line. For instance, if your application doesn't use the analog pins at J5A/B/C of the core module, you are able to connect 12 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.<BR>
58
<B>Wiring Diagram:</B> <A HREF="mbhp/mbhp_nxclcd_mios32.pdf">mbhp_nxclcd_mios32.pdf</A><BR></TD>
163 tk 59
    </TR>
60
 
61
    <TR>
810 tk 62
      <TD COLSPAN=2 CLASS=TABCOLOR1><FONT SIZE=3><STRONG>EA DOGM26xx-A LCDs</STRONG></FONT></TD>
433 TK 63
    </TR>
64
    <TR>
810 tk 65
      <TD COLSPAN=2 CLASS=TABCOLOR2>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.<BR>
66
    </TR>
67
    <TR>
68
      <TD CLASS=TABCOLOR2><B>MIOS8 Wiring Diagram:</B> <A HREF="mbhp/mbhp_lcd_dog_mios8.pdf">mbhp_lcd_dog_mios8.pdf</A></TD>
69
      <TD CLASS=TABCOLOR2><B>MIOS32 Wiring Diagram:</B> <A HREF="mbhp/mbhp_lcd_dog_mios32.pdf">mbhp_lcd_dog_mios32.pdf</A></TD>
70
    </TR>
71
    <TR>
72
      <TD COLSPAN=2 CLASS=TABCOLOR2)<B>Photos:</B> <A HREF="mbhp/mbhp_lcd7_dog_3.jpg">3 lines</A>, <A HREF="mbhp/mbhp_lcd7_dog_2b.jpg">One small, one big line</A>, <A HREF="mbhp/mbhp_lcd7_dog_side.jpg">Sideview</A>, <A HREF="mbhp/mbhp_lcd7_dog_below.jpg">additional ICs can be stuffed under LCD, e.g. a DINX1</A>.</TD>
73
    </TR>
433 TK 74
 
75
    <TR>
810 tk 76
      <TD COLSPAN=2 CLASS=TABCOLOR1><FONT SIZE=3><STRONG>KS0107/KS0108 or HD61202 based graphical LCD</STRONG></FONT></TD>
163 tk 77
    </TR>
78
    <TR>
810 tk 79
      <TD COLSPAN=2 CLASS=TABCOLOR2>
919 tk 80
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.<BR>
810 tk 81
The performance of the KS0107 and HD61202 controller is perfect, as the pixel information is stored in the <A HREF="mbhp/mbhp_glcd_vertical.gif">vertical direction</A>. 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).<BR>Note that currently only the MIDIbox LC applications gets use of customized fonts and icons.</TD>
82
    </TR>
83
    <TR>
84
      <TD CLASS=TABCOLOR2><B>MIOS8 Connectivity:</B> the bus interface is similar to a character based LCD, but every 128x64 block 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.<BR>
163 tk 85
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.<BR>
810 tk 86
<B>Wiring Diagram:</B> <A HREF="mbhp/mbhp_lcd_ks0108_mios8.pdf">mbhp_lcd_ks0108_mios8.pdf</A> and <A HREF="mbhp/mbhp_lcd_64240a_mios8.pdf">mbhp_lcd_64240a_mios8.pdf</A> (Displaytech 64240A)</TD>
87
      <TD CLASS=TABCOLOR2><B>MIOS32 Connectivity:</B> the bus interface is similar to a character based LCD, but every 128x64 block needs a CS (chip select) line which is available at J5C by default, but can optionally be changed to other pins.<BR>
88
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.<BR>
89
<B>Wiring Diagram:</B> <A HREF="mbhp/mbhp_lcd_ks0108_mios32.pdf">mbhp_lcd_ks0108_mios32.pdf</A></TD>
163 tk 90
    </TR>
810 tk 91
    <TR>
92
      <TD COLSPAN=2 CLASS=TABCOLOR2><B>Photos:</B> <A HREF="mbhp/mbhp_glcd0_photo.jpg">follow this link</A><BR>or see the MIDIbox LC in Action: <A HREF="midibox_lc/mblc_lcd_page1.jpg">[1]</A> <A HREF="midibox_lc/mblc_lcd_page2.jpg">[2]</A> <A HREF="midibox_lc/mblc_lcd_page3.jpg">[3]</A></TD>
93
    </TR>
163 tk 94
 
95
    <TR>
810 tk 96
      <TD COLSPAN=2 CLASS=TABCOLOR1><FONT SIZE=3><STRONG>T6963C based graphical LCD, horizontal screen</STRONG></FONT></TD>
163 tk 97
    </TR>
98
    <TR>
931 tk 99
      <TD COLSPAN=2 CLASS=TABCOLOR2>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 <A HREF="mbhp/mbhp_glcd_horizontal.gif">horizontal direction</A>, 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!</TD>
810 tk 100
    </TR>
101
    <TR>
102
      <TD CLASS=TABCOLOR2><B>MIOS8:</B> 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.<BR>
163 tk 103
<B>Connectivity:</B> the bus interface is similar to a character based LCD.<BR>
104
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.<BR>
810 tk 105
<B>Wiring Diagram:</B> <A HREF="mbhp/mbhp_lcd_t6963c_mios8.pdf">mbhp_lcd_t6963c_mios8.pdf</A></TD>
106
      <TD CLASS=TABCOLOR2><B>MIOS32:</B> 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! :-)<BR>
107
<B>Wiring Diagram:</B> <A HREF="mbhp/mbhp_lcd_t6963c_mios32.pdf">mbhp_lcd_t6963c_mios32.pdf</A></TD>
163 tk 108
    </TR>
810 tk 109
    <TR>
110
      <TD COLSPAN=2 CLASS=TABCOLOR2><B>Photo:</B> <A HREF="mbhp/mbhp_lcd7_t6963c_h_photo.jpg">follow this link</A></TD>
111
    </TR>
163 tk 112
 
113
    <TR>
810 tk 114
      <TD COLSPAN=2 CLASS=TABCOLOR1><FONT SIZE=3><STRONG>T6963C based graphical LCD, vertical screen</STRONG></FONT></TD>
163 tk 115
    </TR>
116
    <TR>
810 tk 117
      <TD COLSPAN=2 CLASS=TABCOLOR2>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.</TD>
163 tk 118
    </TR>
810 tk 119
    <TR>
120
      <TD CLASS=TABCOLOR2><B>MIOS8 Wiring Diagram:</B> <A HREF="mbhp/mbhp_lcd_t6963c_mios8.pdf">mbhp_lcd_t6963c_mios8.pdf</A></TD>
121
      <TD CLASS=TABCOLOR2><B>MIOS32 Wiring Diagram:</B> <A HREF="mbhp/mbhp_lcd_t6963c_mios32.pdf">mbhp_lcd_t6963c_mios32.pdf</A></TD>
122
    </TR>
123
    <TR>
124
      <TD COLSPAN=2 CLASS=TABCOLOR2><B>Photo:</B> <A HREF="mbhp/mbhp_lcd7_t6963c_v_photo.jpg">follow this link</A></TD>
125
    </TR>
163 tk 126
 
127
    <TR>
810 tk 128
      <TD COLSPAN=2 CLASS=TABCOLOR1><FONT SIZE=3><STRONG>PCD8544 based graphical LCD</STRONG></FONT></TD>
163 tk 129
    </TR>
130
    <TR>
810 tk 131
      <TD COLSPAN=2 CLASS=TABCOLOR2>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 <A HREF="midibox_lc.html.gen">MIDIbox LC</A>, 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).<BR>
132
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!</TD>
163 tk 133
    </TR>
810 tk 134
    <TR>
135
      <TD CLASS=TABCOLOR2><B>MIOS8 Wiring Diagrams:</B> <A HREF="mbhp/mbhp_lcd_pcd8544_single_mios8.pdf">mbhp_lcd_pcd8544_single_mios8.pdf</A>, <A HREF="mbhp/mbhp_lcd_pcd8544_multiple_mios8.pdf">mbhp_lcd_pcd8544_multiple_mios8.pdf</A></TD>
136
      <TD CLASS=TABCOLOR2><B>MIOS8 Wiring Diagrams:</B> <A HREF="mbhp/mbhp_lcd_pcd8544_single_mios32.pdf">mbhp_lcd_pcd8544_single_mios32.pdf</A>, <A HREF="mbhp/mbhp_lcd_pcd8544_multiple_mios32.pdf">mbhp_lcd_pcd8544_multiple_mios32.pdf</A></TD>
137
    </TR>
138
    <TR>
139
      <TD COLSPAN=2 CLASS=TABCOLOR2><B>Photo:</B> <A HREF="mbhp/mbhp_glcd_pcd5844.jpg">follow this link</A><BR>
140
      <B>More informations:</B> see <A HREF="http://serdisplib.sourceforge.net/ser/pcd8544.html" TARGET="_blank">this sourceforge page</A>.</TD>
141
    </TR>
163 tk 142
 
143
    <TR>
810 tk 144
      <TD COLSPAN=2 CLASS=TABCOLOR1><FONT SIZE=3><STRONG>Custom LCD driver</STRONG></FONT></TD>
163 tk 145
    </TR>
146
    <TR>
811 tk 147
      <TD CLASS=TABCOLOR2><B>MIOS8:</B> 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.<BR>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.<BR>
810 tk 148
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 <A HREF="mbhp/mbhp_lcd_iic_mios8.pdf">this schematic</A>.</TD>
811 tk 149
      <TD CLASS=TABCOLOR2><B>MIOS32:</B> 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 <A HREF="http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fmodules%2Fapp_lcd%2F">repository</A>.</TD>
163 tk 150
    </TR>
151
 
152
  </TABLE></DD>
153
  </DD>
154
</DL>
155
 
156
 
157
<DL>
158
  <DT><H2> <IMG SRC="images/bullet.gif" ALT=""> Soldering Guide </H2></DT>
159
  <DD>
160
  <DD>
810 tk 161
<P CLASS=DESC>Jim Henry wrote a superb guide which can be downloaded from the MIDIbox server: <A HREF="http://www.midibox.org/users/jim_henry/building_a_midibox_lcd_cable.pdf">building_a_midibox_lcd_cable.pdf</A>. It has been written for the pinning of the <A HREF="mbhp_core.html">MBHP_CORE</A> module.<BR>
162
The <A HREF="mbhp_core_stm32.html">MBHP_CORE_STM32</A> module uses a 1:1 pinning instead which simplifies the wiring a bit.</P>
163 tk 163
 
810 tk 164
<P CLASS=DESC>Please note that there are some additional hints at the <A HREF="http://www.midibox.org/dokuwiki/doku.php?id=home:mbhp:module:lcd" TARGET="_blank">MIDIbox Wiki</A> page!</P>
163 tk 165
  </DD>
166
</DL>
167
 
168
FOOTER