/***************************************************************************//**
* 修改于TI公司源码
* MspF5529 102*64 LCd 驱动
* 修改于2012.8.17
******************************************************************************/
#include “msp430f5529.h”
#include “Dogs102x6.h”
// 宏命令
#ifndef abs
# define abs(n) (((n) 《 0) ? -(n) : (n))
#endif
// For all commands, CD signal must = 0
#define SET_COLUMN_ADDRESS_MSB 0x10 //Set SRAM col. addr. before write, last 4 bits =
// ca4-ca7
#define SET_COLUMN_ADDRESS_LSB 0x00 //Set SRAM col. addr. before write, last 4 bits =
// ca0-ca3
#define SET_POWER_CONTROL 0x2F //Set Power control - booster, regulator, and follower
// on
#define SET_SCROLL_LINE 0x40 //Scroll image up by SL rows (SL = last 5 bits),
// range:0-63
#define SET_PAGE_ADDRESS 0xB0 //Set SRAM page addr (pa = last 4 bits), range:0-8
#define SET_VLCD_RESISTOR_RATIO 0x27 //Set internal resistor ratio Rb/Ra to adjust contrast
#define SET_ELECTRONIC_VOLUME_MSB 0x81 //Set Electronic Volume “PM” to adjust contrast
#define SET_ELECTRONIC_VOLUME_LSB 0x0F //Set Electronic Volume “PM” to adjust contrast (PM =
// last 5 bits)
#define SET_ALL_PIXEL_ON 0xA4 //Disable all pixel on (last bit 1 to turn on all pixels
// - does not affect memory)
#define SET_INVERSE_DISPLAY 0xA6 //Inverse display off (last bit 1 to invert display -
// does not affect memory)
#define SET_DISPLAY_ENABLE 0xAF //Enable display (exit sleep mode & restore power)
#define SET_SEG_DIRECTION 0xA1 //Mirror SEG (column) mapping (set bit0 to mirror
// display)
#define SET_COM_DIRECTION 0xC8 //Mirror COM (row) mapping (set bit3 to mirror display)
#define SYSTEM_RESET 0xE2 //Reset the system. Control regs reset, memory not
// affected
#define NOP 0xE3 //No operation
#define SET_LCD_BIAS_RATIO 0xA2 //Set voltage bias ratio (BR = bit0)
#define SET_CURSOR_UPDATE_MODE 0xE0 //Column address will increment with write operation
// (but no wrap around)
#define RESET_CURSOR_UPDATE_MODE 0xEE //Return cursor to column address from before cursor
// update mode was set
#define SET_ADV_PROGRAM_CONTROL0_MSB 0xFA //Set temp. compensation curve to -0.11%/C
#define SET_ADV_PROGRAM_CONTROL0_LSB 0x90
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
全部0条评论
快来发表一下你的评论吧 !