Download Print this page

Program Listings - Renesas H8S Series User Manual

Lcd display using 1/4 duty drive (lcd controller/driver)
Hide thumbs Also See for H8S Series:

Advertisement

6.

Program Listings

SRC program listing
INIT.
.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
#define LCR *(volatile unsigned char *)0xFFFC31
#define LCR2 *(volatile unsigned char *)0xFFFC32
#define LCD RAM (volatile unsigned char *)0xFFFC40
#define MSTPCRD *(volatile unsigned char *)0xFFFC60
/*******************************************************************/
/* Function define
/*******************************************************************/
extern void INIT ( void );
void main ( void );
/*******************************************************************/
/* Vector Address
/*******************************************************************/
#pragma section V1
void (*const VEC_TBL1[])(void) = {
INIT
};
#pragma section
REJ06B0486-0100/Rev.1.00
LCD Display Using 1/4 Duty Drive (LCD Controller/Driver)
March 2005
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
/* LCD Port Control Register
/* LCD Control Register
/* LCD Control Register 2
/* LCD RAM
/* Module Stop Control Registers D
*/
/* SP Set
*/
/* VECTOR SECTOIN SET
/* 0x00 - 0x0f
/* 00 Reset
/* P
H8S Family
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
Page 16 of 19

Advertisement

loading