CHAPTER 28:LCD Controller
1082
S6J3200 Series Hardware Manual Document Number: 002-04852 Rev. *G
8.
Sample Program
This section shows sample program.
Setting procedure 1
Program 1
With the 1/2 duty drive method, make the LCD display a four-digit
number, "0 1 2 3".
void LCD_sample_1(void)
{
Initial setting (LCDC)
LCDC_initial();
}
<Initial setting>
void LCDC_initial(void)
1.
- Port
Register name
{
COM, SEG output setting for
the port
See 6.8. and 6.9.
PORT_SETTING_LCDC_OUT();
/* Set the LCD controller pin to */
/* peripheral output. */
2.
- Setting of VRAM
Register name
Setting of VRAM
VRAM00-VRAM07
IO_VRAM00 = 0x31;
IO_VRAM01 = 0x32;
IO_VRAM02 = 0x00;
IO_VRAM03 = 0x22;
IO_VRAM04 = 0x32;
IO_VRAM05 = 0x30;
IO_VRAM06 = 0x22;
IO_VRAM07 = 0x32;
3.
- Setting of control register
Register name
Fixed value
LCR1
IO_LCR1.byte = 0xFF;
/* Set to FF. */
Bias setting
LCDCMR
IO_LCDCMR. byte = 0x0F;
/* 1/2 bias */
Setting of control register
LCR0
IO_LCR0.byte = 0x04;
/* Setting value =0000_0100 */
/* bit7 = 0 Clock selection Main clock */
.
LCEN
/* bit6 = 0 LCEN Display stopped with PSS mode */
.
VSEL
/* bit5 = 0 VSEL Internal division resistor disconnected
*/
.
BK
/* bit4 = 0 BK Blanking selection bit */
.
MS[1:0]
/* bit3-2 = 01 MS[1:0]
1/2 duty mode */
.
FP[1:0]
/* bit1-0 = 00 FP[1:0] */
}
<Others>
(Note)
Clock-related setting and setting of _set_il (numerical value)
in advance are required. See chapter of "CLOCK SYSTEM"
and chapter of "INTERRUPT CONTROLLER" for details.
Содержание S6J3200 Series
Страница 1041: ...CHAPTER 28 LCD Controller 1040 S6J3200 Series Hardware Manual Document Number 002 04852 Rev G...
Страница 1044: ...CHAPTER 28 LCD Controller S6J3200 Series Hardware Manual Document Number 002 04852 Rev G 1043...
Страница 1047: ...CHAPTER 28 LCD Controller 1046 S6J3200 Series Hardware Manual Document Number 002 04852 Rev G...
Страница 1050: ...CHAPTER 28 LCD Controller S6J3200 Series Hardware Manual Document Number 002 04852 Rev G 1049...
Страница 1084: ...CHAPTER 28 LCD Controller S6J3200 Series Hardware Manual Document Number 002 04852 Rev G 1083...
Страница 1086: ...CHAPTER 28 LCD Controller S6J3200 Series Hardware Manual Document Number 002 04852 Rev G 1085...
Страница 1088: ...CHAPTER 28 LCD Controller S6J3200 Series Hardware Manual Document Number 002 04852 Rev G 1087...