Motor de Búsqueda de Datasheet de Componentes Electrónicos |
|
AN2687 Datasheet(PDF) 10 Page - STMicroelectronics |
|
AN2687 Datasheet(HTML) 10 Page - STMicroelectronics |
10 / 22 page Example of a quadruplex LCD driver with STM8 AN2687 10/22 Doc ID 14296 Rev 1 3 Example of a quadruplex LCD driver with STM8 The following example describes a drive for a quadruplex mode (4 COM) LCD using the STM8S20xxx (QFP64 package 10 × 10 mm). The only external components needed for driving the LCD are eight resistors (refer to Figure 5). The resistor value of 470 k is used to reach a low current consumption. One I/O port per segment and one I/O port for each COM line are needed to drive the LCD. In our example, to drive a quadruplex LCD that has 128 segments (with 32 segment lines and 4 COM lines) 36 I/O ports are required. In the example program, the PG0-PG7, PE0-PE7, PD0-PD7 and PB0-PB7 port pins are connected to the 32 segment lines and are used to generate the segment signals. As PE1 and PE2 are true open drain I/Os (I2C alternate function), two 10 k pull-up resistors have been added. Port G segments control the display of LCD digits 1 and 2, port E segments control digits 3 and 4, port D segments controls digits 5 and 6 and port B segments control the display of LCD digits 7 and 8. Ports PC4 through PC7 are connected to the 4 COM lines (COM 4, 3, 2 and 1, respectively) and are used to generate the COM signals. The LCD driver consists of: ● one initialization function (LCD_ON) that correctly configures the required I/Os and the Timer 2 resource (to get the 2 real-time clock interrupts) for the first method, or the AWU mode one for the second method. ● one display function (LCD_Display) that enables the user to easily enter the string of characters (8 characters maximum) to be displayed on the 8-digit LCD screen. ● one LCD RAM part that contains the coding of the numbers or letters to be displayed on the LCD (refer to Table 1). This LCD RAM table is filled automatically each time LCD_Display function is called, depending on the characters composing the string to display. ● a generic.h file containing: – the different possible configurations in terms of numbers of COM and SEG (one configuration has to be selected, knowing that the default configuration is 4 COM and 32 SEG) – the clock (HSI with one possible prescaler or LSI) – the values put in the Timer 2 compare and autoreload registers depending on the chosen LCD frame rate for the first method ● the letter and number constant coding tables which are contained in the lcd.c file. The file can be easily modified by the user depending on the LCD type used. When the LSI clock is used, in order to speed up the I/O toggling execution, the program switches to the HSI clock, and returns to the LSI clock once this is done. For more information regarding the software architecture, please refer to the lcd_awu.pdf and lcd_timer2.pdf files attached with the source codes in the zip file associated with this application note. |
Número de pieza similar - AN2687 |
|
Descripción similar - AN2687 |
|
|
Enlace URL |
Política de Privacidad |
ALLDATASHEET.ES |
¿ALLDATASHEET es útil para Ud.? [ DONATE ] |
Todo acerca de Alldatasheet | Publicidad | Contáctenos | Política de Privacidad | Intercambio de Enlaces | Lista de Fabricantes All Rights Reserved©Alldatasheet.com |
Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
Family Site : ic2ic.com |
icmetro.com |