⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lcd.h

📁 AT91RM3400芯片 ROM引导程序
💻 H
字号:
//*----------------------------------------------------------------------------
//*         ATMEL Microcontroller Software Support  -  ROUSSET  -
//*----------------------------------------------------------------------------
//* The software is delivered "AS IS" without warranty or condition of any
//* kind, either express, implied or statutory. This includes without
//* limitation any warranty or condition with respect to merchantability or
//* fitness for any particular purpose, or against the infringements of
//* intellectual property rights of others.
//*----------------------------------------------------------------------------
//* File Name           : Lcd.h
//* Object              : Lcd Definition File.
//*
//* Creation            : FB   26/11/2002
//*----------------------------------------------------------------------------

#ifndef lcd
#define lcd

#include "AT91RM3400.h"
#include "lib_AT91RM3400.h"

#include "Font_5x8_Tianma.h"

#define AT91C_LCD_CLK         				12000000	
#define AT91C_LCD_FONT_WIDTH				8			// width of the font used
#define COMMAND								0
#define DATA								1
#define AT91C_LCD_DRIVER_COMMAND			0x10000		// PCS = 0001 << 16 for SP_MR
#define AT91C_LCD_DRIVER_DATA				0x30000		// PCS = 0011 << 16 for SP_MR
#define	CHAR_MAX_PER_LINE		 			16			// depends of the font, here 16 char

//* --------------------------- Constants definition ------------------------------------
//* General Definition for the LCD */
#define AT91C_NUMBER_OF_COLUMNS 	128
#define AT91C_NUMBER_OF_ROWS 		64
#define AT91C_NUMBER_OF_PAGES 		8
#define AT91C_FIRST_PAGE 			0
#define AT91C_FIRST_COLUMN 			0
#define AT91C_LAST_PAGE 			7
#define AT91C_LAST_COLUMN 			127

/* Turn on/off LCD panel */
#define AT91C_DISPLAY_OFF     			0xAE         /* When DON = 0: display OFF */
#define AT91C_DISPLAY_ON      			0xAF         /* When DON = 1: display ON */
#define AT91C_INITIAL_DISPLAY_LINE_0  	0x40       	 /* Initial Display Line. 0<Addr Line<63 */

/* Page Address of Display Data RAM */
#define AT91C_PAGE_ADDR_0     0xB0        /* Page Address 0 */
#define AT91C_PAGE_ADDR_1     0xB1        /* Page Address 1 */
#define AT91C_PAGE_ADDR_2     0xB2        /* Page Address 2 */
#define AT91C_PAGE_ADDR_3     0xB3        /* Page Address 3 */
#define AT91C_PAGE_ADDR_4     0xB4        /* Page Address 4 */
#define AT91C_PAGE_ADDR_5     0xB5        /* Page Address 5 */
#define AT91C_PAGE_ADDR_6     0xB6        /* Page Address 6 */
#define AT91C_PAGE_ADDR_7     0xB7        /* Page Address 7 */
#define AT91C_PAGE_ADDR_8     0xB8        /* Page Address 8 */

#define AT91C_COLUMN_ADDR_MSB 0x10        /* Column address MSB */
#define AT91C_COLUMN_ADDR_LSB 0x00        /* Set column address LSB */

/* -------------------------------------------------------------------------------*/
/*                                  Status Register                               */
/* -------------------------------------------------------------------------------*/
#define LCD_BUSY_BIT   0x80
#define LCD_BUSY_MASK  0x80        /* The LCD is being Busy : DB7 = 1 */
#define LCD_READY_MASK (0<<7)       /* The LCD is Ready : DB7 = 0 */

/* ADC : Indicates the relationship between RAM column address and segment driver */
#define ADC_STATUS_BIT      0x40
#define ADC_REVERSE_MASK    (0<<6)       /* 0: reverse direction (SEG131 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -