十分钟搞定SSD1963液晶屏驱动

SSD1963简介

• Display feature
− Built-in 1215K bytes frame buffer. Support up to 864 x 480 at 24bpp display
− Support TFT 18/24-bit generic RGB interface panel
− Support 8-bit serial RGB interface
− Hardware rotation of 0, 90, 180, 270 degree
− Hardware display mirroring
− Hardware windowing
− Programmable brightness, contrast and saturation control
− Dynamic Backlight Control (DBC) via PWM signal
• MCU connectivity
− 8/9/16/18/24-bit MCU interface
− Tearing effect signal
• I/O Connectivity
− 4 GPIO pins
• Built-in clock generator
• Deep sleep mode for power saving
• Core supply power (VDDPLL and VDDD): 1.2V±0.1V
• I/O supply power(VDDIO): 1.65V to 3.6V
• LCD interface supply power (VDDLCD): 1.65V to 3.6V
规格书:链接: http://pan.baidu.com/s/1eR8dHUM 密码: 7jih

硬件

此程序所对应的硬件信息如下:
1. MCU :LPC1768
2. 液晶屏:4.3寸TFT液晶
3. 驱动方式:8线驱动

SSD1963驱动代码

SSD1963.h

#ifndef _SSD1963_H_
#define _SSD1963_H_

#include "lpc17xx.h"
#include "Common.h"

#define LCD_XSIZE          (480)                //设置液晶屏的分辨率 长
#define LCD_YSIZE          (272)                //设置液晶屏的分辨率 宽
#define LCD_CONTROLLER     (1963)               //设置液晶屏的驱动芯片型号

#define SSD1963_RESET_LOW()                 LPC_GPIO0->FIOCLR = _BV(6)
#define SSD1963_RESET_HIGH()                LPC_GPIO0->FIOSET = _BV(6)

#define SSD1963_WR_LOW()                    LPC_GPIO1->FIOCLR = _BV(27)
#define SSD1963_WR_HIGH()                   LPC_GPIO1->FIOSET = _BV(27)

#define SSD1963_RD_LOW()                    LPC_GPIO1->FIOCLR = _BV(28)
#define SSD1963_RD_HIGH()                   LPC_GPIO1->FIOSET = _BV(28)

#define SSD1963_CS_LOW()                    LPC_GPIO0->FIOCLR = _BV(5)
#define SSD1963_CS_HIGH()                   LPC_GPIO0->FIOSET = _BV(5)

#define SSD1963_DC_LOW()                    LPC_GPIO0->FIOCLR = _BV(4)
#define SSD1963_DC_HIGH()                   LPC_GPIO0->FIOSET = _BV(4)

#define SSD1963_DATA_IN()                   LPC_GPIO2->FIODIR0 = 0x00
#define SSD1963_DATA_OUT()                  LPC_GPIO2->FIODIR0 = 0xff

#define SSD1963_Write8BitData(d)            SSD1963_CS_LOW(); SSD1963_DC_HIGH(); SSD1963_WR_LOW(); LPC_GPIO2->FIOPIN0 = (d); NOP(); SSD1963_WR_HIGH(); SSD1963_CS_HIGH()
#define SSD1963_Read8BitData(d)             SSD1963_DATA_IN(); SSD1963_CS_LOW(); SSD1963_DC_HIGH(); SSD1963_RD_LOW(); NOP(); (d) = LPC_GPIO2->FIOPIN0; SSD1963_RD_HIGH(); SSD1963_CS_HIGH(); SSD1963_DATA_OUT()
#define SSD1963_WriteCMD(d)                 SSD1963_CS_LOW(); SSD1963_DC_LOW(); SSD1963_WR_LOW(); LPC_GPIO2->FIOPIN0 = (d); NOP(); SSD1963_WR_HIGH(); SSD1963_CS_HIGH()

#define SSD1963_CMD_Nop                     0x00
#define SSD1963_CMD_Reset                   0x01
#define SSD1963_CMD_GPM                     0x0A
#define SSD1963_CMD_GAM                     0x0B
#define SSD1963_CMD_GDM                     0x0D
#define SSD1963_CMD_EnSM         
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值