?? lcd1.c
字號:
/** ###################################################################
** THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
** Filename : LCD1.C
** Project : le4
** Processor : MC9RS08LE4CPC
** Beantype : Init_LCD
** Version : Bean 01.041, Driver 01.03, CPU db: 3.00.000
** Compiler : CodeWarrior RS08 C Compiler
** Date/Time : 19/2/2009, 18:21
** Abstract :
** This file implements the Liquid Crystal Display (LCD)
** module initialization according to the Peripheral
** Initialization Bean settings, and defines interrupt service
** routines prototypes.
** Settings :
** Bean name : LCD1
** Device : LCD
** Settings :
** Clock settings :
** Clock source select : Alternate clock source
** Base clock prescaler : 7
** LCD module clock : 32.7 kHz
** Base clock : 36.495 Hz
** Charge pump clock adjust : Intermediate (faster) clock
** Charge pump clock : 2.725 kHz
** Blink rate bits value : 0
** Blink rate : 7.983 Hz
** Frame frequency : 36.495 Hz
** Duty : 1/1
** Stop in Wait mode : no
** Stop in Stop3 mode : no
** Charge pump : Disabled
** Voltage supply control : Drive VLL3 from Vdd internally
** Blink mode select : Alternate Display
** Data register mode select : On/Off control
** Display mode : 1 backplane
** Pins :
** Frontplane pin 0 :
** Frontplane pin : PTB5_ADP3_LCD18
** Frontplane pin signal : A1
** Frontplane pin 1 :
** Frontplane pin : PTB4_ADP2_LCD19
** Frontplane pin signal : B1
** Frontplane pin 2 :
** Frontplane pin : PTD4_ADP4_LCD4
** Frontplane pin signal : C1
** Frontplane pin 3 :
** Frontplane pin : PTB7_TPM1CH1_LCD16
** Frontplane pin signal : D1
** Frontplane pin 4 :
** Frontplane pin : PTB6_TPM1CH0_LCD17
** Frontplane pin signal : E1
** Frontplane pin 5 :
** Frontplane pin : PTD2_KBIP6_LCD2
** Frontplane pin signal : F1
** Frontplane pin 6 :
** Frontplane pin : PTD3_KBIP7_LCD3
** Frontplane pin signal : G1
** Frontplane pin 7 :
** Frontplane pin : PTB3_ADP1_LCD20
** Frontplane pin signal : A2
** Frontplane pin 8 :
** Frontplane pin : PTA0_RxD_LCD15
** Frontplane pin signal : B2
** Frontplane pin 9 :
** Frontplane pin : PTA1_TxD_LCD14
** Frontplane pin signal : C2
** Frontplane pin 10 :
** Frontplane pin : PTA2_TPM2CH1_LCD13
** Frontplane pin signal : D2
** Frontplane pin 11 :
** Frontplane pin : PTA3_TPM2CH0_LCD12
** Frontplane pin signal : E2
** Frontplane pin 12 :
** Frontplane pin : PTB2_ADP0_LCD21
** Frontplane pin signal : F2
** Frontplane pin 13 :
** Frontplane pin : PTD1_KBIP5_LCD1
** Frontplane pin signal : G2
** Frontplane pin 14 :
** Frontplane pin : PTA5_KBIP1_LCD10
** Frontplane pin signal : LOBAT
** Frontplane pin 15 :
** Frontplane pin : PTD6_ADP6_LCD6
** Frontplane pin signal : CINCO
** Frontplane pin 16 :
** Frontplane pin : PTA6_KBIP2_LCD9
** Frontplane pin signal : ZERO
** Frontplane pin 17 :
** Frontplane pin : PTD7_ADP7_LCD7
** Frontplane pin signal : G3
** Backplane pin 0 :
** Backplane pin : PTA7_KBIP3_LCD8
** Backplane pin signal : COM
** Backplane pin 1 :
** Backplane pin 2 :
** Backplane pin 3 :
** Backplane pin 4 :
** Backplane pin 5 :
** Backplane pin 6 :
** Backplane pin 7 :
** Interrupts :
** Interrupt :
** LCD Interrupt : Disabled
** ISR name :
** Initialization :
** Enable LCD module : Enabled
** Contents :
** Init - void LCD1_Init(void);
**
** (c) Copyright UNIS, a.s. 1997-2008
** UNIS, a.s.
** Jundrovska 33
** 624 00 Brno
** Czech Republic
** http : www.processorexpert.com
** mail : info@processorexpert.com
** ###################################################################*/
/* MODULE LCD1. */
#include "LCD1.h"
/*
** ===================================================================
** Method : LCD1_Init (bean Init_LCD)
**
** Description :
** This method initializes registers of the LCD module
** according to this Peripheral Initialization Bean settings.
** Call this method in the user code to initialize the
** module. By default, the method is called by PE
** automatically; see "Call Init method" property of the
** bean for more details.
** Parameters : None
** Returns : Nothing
** ===================================================================
*/
void LCD1_Init(void)
{
/* LCDC0: SOURCE=1 */
setReg8Bits(LCDC0, 0x40);
/* LCDSUPPLY: ??=0,??=0,LADJ1=0,LADJ0=1,??=0,??=1,VSUPPLY1=0,VSUPPLY0=1 */
setReg8(LCDSUPPLY, 0x15);
/* LCDC1: LCDIEN=0,??=0,??=0,??=0,??=0,FCDEN=0,LCDWAI=0,LCDSTP=0 */
setReg8(LCDC1, 0x00);
/* LCDC0: LCDEN=0,SOURCE=1,LCLK2=0,LCLK1=1,LCLK0=1,DUTY2=0,DUTY1=0,DUTY0=0 */
setReg8(LCDC0, 0x58);
/* LCDBCTL: BLINK=0,ALT=0,BLANK=0,??=0,BMODE=1,BRATE2=0,BRATE1=0,BRATE0=0 */
setReg8(LCDBCTL, 0x08);
/* LCDPEN0: PEN7=1,PEN6=1,PEN5=0,PEN4=1,PEN3=1,PEN2=1,PEN1=1,PEN0=0 */
setReg8(LCDPEN0, 0xDE);
/* LCDBPEN0: BPEN7=0,BPEN6=0,BPEN5=0,BPEN4=0,BPEN3=0,BPEN2=0,BPEN1=0,BPEN0=0 */
setReg8(LCDBPEN0, 0x00);
/* LCDPEN1: PEN15=1,PEN14=1,PEN13=1,PEN12=1,PEN11=0,PEN10=1,PEN9=1,PEN8=1 */
setReg8(LCDPEN1, 0xF7);
/* LCDBPEN1: BPEN15=0,BPEN14=0,BPEN13=0,BPEN12=0,BPEN11=0,BPEN10=0,BPEN9=0,BPEN8=1 */
setReg8(LCDBPEN1, 0x01);
/* LCDPEN2: ??=0,??=0,PEN21=1,PEN20=1,PEN19=1,PEN18=1,PEN17=1,PEN16=1 */
setReg8(LCDPEN2, 0x3F);
/* LCDBPEN2: ??=0,??=0,BPEN21=0,BPEN20=0,BPEN19=0,BPEN18=0,BPEN17=0,BPEN16=0 */
setReg8(LCDBPEN2, 0x00);
/* LCDS: LCDIF=1,??=0,??=0,??=0,??=0,??=0,??=0,??=0 */
setReg8(LCDS, 0x80);
/* LCDC0: LCDEN=1 */
setReg8Bits(LCDC0, 0x80);
}
/* END LCD1. */
/*
** ###################################################################
**
** This file was created by UNIS Processor Expert 3.04 [04.19]
** for the Freescale RS08 series of microcontrollers.
**
** ###################################################################
*/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -