?? lcd.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 + -