H8S Family
LCD Display Using 1/4 Duty Drive (LCD Controller/Driver)
REJ06B0486-0100/Rev.1.00
March 2005
Page 16 of 19
6. Program
Listings
INIT.
SRC program listing
.export _INIT
.import _main
;
.section P,CODE,ALIGN=2
_INIT:
mov.l #h'ffefc0,er7
ldc.b #b'10000000,ccr
ldc.b #0,exr
jmp @_main
;
.end
/*******************************************************************/
/*
*/
/* H8S/2000 Series -H8S/2268-
*/
/* Application Note
*/
/*
*/
/* 'Liquid Crystal Display
*/
/* -1/4 Duty Drive, Internal Driver-'
*/
/*
*/
/* Function
*/
/* : LCD Controller / Driver
*/
/*
*/
/* External Clock : 10MHz
*/
/* Internal Clock : 10MHz
*/
/* Sub Clock : 32.768kHz
*/
/*
*/
/*******************************************************************/
#include <machine.h>
/*******************************************************************/
/* Symbol Definition
*/
/*******************************************************************/
#define LPCR *(volatile unsigned char *)0xFFFC30
/* LCD Port Control Register
*/
#define LCR *(volatile unsigned char *)0xFFFC31
/* LCD Control Register
*/
#define LCR2 *(volatile unsigned char *)0xFFFC32
/* LCD Control Register 2
*/
#define LCD RAM (volatile unsigned char *)0xFFFC40
/* LCD RAM
*/
#define MSTPCRD *(volatile unsigned char *)0xFFFC60
/* Module Stop Control Registers D
*/
/*******************************************************************/
/* Function define
*/
/*******************************************************************/
extern void INIT ( void );
/* SP Set
*/
void main ( void );
/*******************************************************************/
/* Vector Address
*/
/*******************************************************************/
#pragma section V1
/* VECTOR SECTOIN SET
*/
void (*const VEC_TBL1[])(void) = {
/* 0x00 - 0x0f
*/
INIT
/*
00
Reset
*/
};
#pragma
section
/*
P
*/