Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: LCD.h
- Revision:
- 0:ded1a1350d0d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LCD.h Sat Oct 04 04:00:38 2014 +0000 @@ -0,0 +1,52 @@ +#ifndef _LCD_H +#define _LCD_H +//------------------------------LCD RAM Set----------------- +//Function Set (H=0/1) +#define Function 0x20//设置 +#define PowerDown 0x04 +#define PowerUp 0x00 +#define EntryHor 0x00//水平寻址模式 +#define EntryVer 0x02//垂直寻址模式 +#define InstrucExtern 0x01//扩展指令 +#define InstrucBasic 0x00//基本指令 +//Display Contorl (H=0) +#define DispCtrl 0x08//显示设置 +#define Blank 0x00//全空 +#define Normal 0x04//正常显示 +#define Black 0x01//全黑显示 +#define Inv 0x05//反显 +//x position (H=0) +#define AddressX(x) (0x80 | x)//X地址 +//y position (H=0) +#define AddressY(y) (0x40 | y)//Y地址 +//Temperature (H=1) +#define Temper 0x04//温度系数(一般设为0,低温时需要修改) +//Bias System +#define Bias 0x10//偏压或混合率(影响对比度) +//Set Vop +#define Vop 0x80//操作电压(影响亮度) + +#define Ver_Basic Function|EntryVer|InstrucBasic +#define Ver_Extern Function|EntryVer|InstrucExtern +#define Hor_Basic Function|EntryHor|InstrucBasic +#define Hor_Extern Function|EntryHor|InstrucExtern +//----------------------------------the end-------------------------------- + +//---------------------------------sys clock set--------------------------- +#define SYSTEM_CLK_FREQ_16MHz 0xF<<3 +#define SYSTEM_CLK_FREQ_8MHz 0xE<<3 +#define SYSTEM_CLK_FREQ_4MHz 0xD<<3 +#define SYSTEM_CLK_FREQ_2MHz 0xC<<3 +#define SYSTEM_CLK_FREQ_1MHz 0xB<<3 +#define SYSTEM_CLK_FREQ_500kHz 0x7<<3 +#define SYSTEM_CLK_FREQ_250kHz 0x6<<3 +#define SYSTEM_CLK_FREQ_125kHz 0x5<<3 +#define SYSTEM_CLK_FREQ_62kHz 0x4<<3 +#define SYSTEM_CLK_FREQ_32kHz 0x3<<3 + +#define SYSTEM_CLK_SCS_INTOSC 0x02 +#define SYSTEM_CLK_SCS_EXTOSC 0x02 + + +#endif +