SSD1963驱动板原理图
基于STM32的餐车机器人
• 13•如今,人工智能成为新一轮技术革命和工业变化的核心力量,推动了传统工业的更新换代,各行各业均在积极向智能技术转变,服务行业也是如此。
传统点菜是依靠纯人工方式进行,造成了点餐效率低,服务体验质量差等问题。
因此,在智能化不断普及的背景下,服务行业进入智能服务机器人时代已经是大势所趋。
由于我国铁路的迅速发展,且具有方便、快捷、实惠等特点,使得铁路成为不少人出行的第一选择。
但是传统的铁路运输送餐模式选用人工推车式送餐,这种送餐模式效率低下,不仅不能实现随时点餐的需求而且容易因餐车体积庞大占据车厢过道而造成拥堵问题。
本文设计的餐车机器人将专门应用于铁路运输,其最大特点是缩小了传统餐车的体积,且操作灵活、运输平稳,能从根本上解决车厢拥堵问题,提高了旅客的乘车满意度。
同时,本产品的设计,实现了“随想随点、随点随做、随做随送”的一系列人性化服务,运用智能化服务模式取代人工服务模式,可以大大降低人为缘故的出错概率,有效提高服务质量和效率,更能满足旅客的用餐需求。
1 整体设计结构餐车机器人以STM32F103ZET6作为主控芯片,主要功能有:循迹、避障、显示点餐信息、点评服务以及人机对话。
餐车的循迹功能是通过灰度模块实现,使用超声波模块检测障碍物达到避障效果,利用车内的液晶屏显示用户点餐信息,采用按键输入模块对服务进行评价,添加语音模块实现人机对话,进一步提高人机交互感。
Cortex-M3,最高工作频率为72MHz 。
同时作为STM32F1系列中最高配置的芯片,其拥有:64KB SRAM 、 512KB FLASH 、4个通用定时器、2个基本定时器、2个高级定时器、2个DMA 控制器、2个IIC 、5个串口、1个USB 、3个12 位ADC 以及112个通用IO 口等。
出于项目代码量与需要运行UC/OS-II 操作系统综合考虑后,我们决定选用大容量Flash 的ZET6类型设计本产品,运用到的芯片外设有颜色传感器的ADC 转换,两路特殊的高级定时器产生PWM 控制电机等。
SSD1963开发板使用手册
电源选择开关(USB:选择 USB 供电,E_POWER:选择 DC 电源输入)
2.LCD 背光电压(CON3)
PIN NO. 1 2 3 4 描述 背光负级输入 背光正级输入 GND 电源地 5.0V
如果被测产品背光电压为 5V 直接将 1 和 3,2 和 4 短接即可;否则,分别有 1 和 2 单独给 背光供电。
VSS VDDLCD LDATA17 BPIO0 GPIO1 GPIO2 GPIO3 VDDD VSS VDDLCD LFRAME LLINE LSHIFT VDDD VSS VDDLCD LDEN TE PWM GAMAS0 GAMAS1 VDDLCD VSS VDDD VSS VDDLCD LDATA16 LDATA15 LDATA14 LDATA13 LDATA12 VDDD
1 3 5 7 9
2 4 6 8 10
VDDD VSS VSS VDDIO VSS VDDD D0 D1 D2 D3 D4 VDDIO VSS VDDD CLK VDDIO VSS VDDPLL VSSPLL VSS VDDD XTAL_IN VSS STAL_OUT VDDD VSS VDDLCD LDATA23 LDATA22 LDATA21 LDATA20 VDDD
此开发板支持 SD 卡读写,读写方式采用 C8051 自带的 SPI,速度可高达 (25M) ;支持 USB 驱动,通过 PC 端软件,可直接将需要现实的图片数据下载 到 SD 卡中;陪送底层软件(C8051)源代码,不同的 TFT LCD 只需要修改部分 初始化参数即刻。 三.产品应用介绍 1.电源参数:输入电压 5V。如果工作电流小于 500mA,可 3.3V RSTC2CK 13 C2D 14 D7 15 D6 16 D5 17 D4 18 D3 19 D2 20 D1 21 22 D0 KEY3 23 KEY2 24
SSDOLED驱动芯片中文手册
SSDOLED驱动芯⽚中⽂⼿册简介SSD1306是⼀个单⽚CMOS OLED/PLED驱动芯⽚可以驱动有机/聚合发光⼆极管点阵图形显⽰系统。
由128 segments 和64 Commons组成。
该芯⽚专为共阴极OLED⾯板设计。
SSD1306中嵌⼊了对⽐度控制器、显⽰RAM和晶振,并因此减少了外部器件和功耗。
有256级亮度控制。
数据/命令的发送有三种接⼝可选择:6800/8000串⼝,I2C接⼝或SPI接⼝。
适⽤于多数简介的应⽤,注⼊移动电话的屏显,MP3播放器和计算器等。
特性1.分辨率:128 * 64 点阵⾯板2.电源:a)VDD = 1.65V to 3.3V ⽤于IC逻辑b)VCC = 7V to 15V ⽤于⾯板驱动3.点阵显⽰a)OLED驱动输出电压,最⼤15Vb)Segment最⼤电流:100uAc)常见最⼤反向电流:15mAd)256级对⽐亮度电流控制4.嵌⼊式128 * 64位SRAM显⽰缓存5.引脚选择MCU接⼝a)8位6800/8000串⼝b)3/4线SPI接⼝c)I2C接⼝6.⽔平和垂直两个⽅向的屏幕保存连续滚动功能。
7.RAM写同步信号8.可编程的帧率和多重⽐率9.⾏重映射和列冲映射10.⽚上晶振11.两种封装 COG和COF12.⼯作温度范围⼴:‐40℃ to 85℃订购信息暂不翻译结构⽅框图SSD1306MCU接⼝由8个数据引脚和5个控制引脚组成。
引脚分配由不同的接⼝选择决定,详情如下表。
不同的MCU模块可以通过BS[2:0]引脚的硬件选择设置。
MCU 并⼝ 6800系列接⼝不翻译MCU 并⼝8080系列接⼝不翻译MCU串⼝(4‐wire SPI)不翻译MCU串⼝(3‐wire SPI)不翻译MCU I2C 接⼝I2C通讯接⼝由从机地址为SA0,I2C总线数据信号(SDAout/D2输出和SDAin/D1输⼊)和I2C 总线时钟信号SCL(D0)组成。
数据和时钟信号线都必须接上上拉电阻。
硬盘内部硬件结构和工作原理详解概论
图1-1 硬盘的外观图1-2 控制电路板图1-3 硬盘接口电源插座连接电源,为硬盘工作提供电力保证。
数据接口是硬盘与主板、内存之间进行数据交换的通道,使用一根40针40线(早期)或40针80线(当前)的IDE 接口电缆进行连接。
新增加的40线是信号屏蔽线,用于屏蔽高速高频数据传输过程中的串扰。
中间的主、从盘跳线插座,用以设置主、从硬盘,即设置硬盘驱动器的访问顺序。
其设置方法一般标注在盘体外的标签上,也有一些标注在接口处,早期的硬盘还可能印在电路板上。
此外,在硬盘表面有一个透气孔(见图1-1),它的作用是使硬盘内部气压与外部大气压保持一致。
由于盘体是密封的,所以,这个透气孔不直接和内部相通,而是经由一个高效过滤器和盘体相通,用以保证盘体内部的洁净无尘,使用中注意不要将它盖住。
1.2 硬盘的内部结构硬盘的内部结构通常专指盘体的内部结构。
盘体是一个密封的腔体,里面密封着磁头、盘片(磁片、碟片)等部件,如图1-4所示。
图1-4 硬盘内部结构硬盘的盘片是硬质磁性合金盘片,片厚一般在0.5mm左右,直径主要有1.8in(1in=25.4mm)、2.5in、3.5in和5.25in 4种,其中2.5in和3.5in盘片应用最广。
盘片的转速与盘片大小有关,考虑到惯性及盘片的稳定性,盘片越大转速越低。
一般来讲,2.5in硬盘的转速在5 400 r/min~7 200 r/ min之间;3.5in硬盘的转速在4 500 r/min~5 400 r/min之间;而5.25in硬盘转速则在3 600 r/min~4 500 r/min之间。
随着技术的进步,现在2.5in硬盘的转速最高已达15 000 r/min,3.5in硬盘的转速最高已达12 000 r/min。
有的硬盘只装一张盘片,有的硬盘则有多张盘片。
这些盘片安装在主轴电机的转轴上,在主轴电机的带动下高速旋转。
每张盘片的容量称为单碟容量,而硬盘的容量就是所有盘片容量的总和。
SSD1963_1.2 彩屏TFT液晶驱动芯片 最新原版
6 7
PIN DESCRIPTIONS ................................................................................................................ 13 FUNCTIONAL BLOCK DESCRIPTIONS ............................................................................ 16
7.1 MCU INTERFACE .................................................................................................................................................16 7.1.1 6800 Mode ..................................................................................................................................................16 7.1.2 8080 Mode ..................................................................................................................................................16 7.1.3 Register Pin Mapping .................................................................................................................................16 7.1.4 Pixel Data Format ......................................................................................................................................16 7.1.5 Tearing Effect Signal (TE) ..........................................................................................................................17 7.2 SYSTEM CLOCK GENERATION .............................................................................................................................18 7.3 FRAME BUFFER....................................................................................................................................................19 7.4 SYSTEM CLOCK AND RESET MANAGER ...............................................................................................................19 7.5 LCD CONTROLLER ..............................................................................................................................................20 7.5.1 Display Format ...........................................................................................................................................20 7.5.2 General Purpose Input/Output (GPIO) ......................................................................................................20
基于SSD1963控制器的液晶显示模块设计
基于SSD1963控制器的液晶显示模块设计赵彩虹;刘凯;尹涓【摘要】为了满足嵌入式工业控制系统终端显示的需要,提出了一种基于微处理器R1610和LCD控制器SSD1963的液晶显示模块的设计方法;详细阐述了硬件接口电路的设计和控制软件的编程,重点介绍了R1610、SSD1963以及TFT液晶屏AT070TN83之间的硬件连接方法,分析了SSD1963液晶控制的使用方法以及针对液晶屏显示时序的系统设置;进行了显示控制测试,通过该显示模块实现了图像在液晶屏上的显示;测试结果表明,硬件设计和控制软件设计能够满足显示要求,显示效果良好;文章提出的显示模块设计方法同样适用于其他液晶屏的显示控制,具有一定的应用前景和参考价值.【期刊名称】《计算机测量与控制》【年(卷),期】2015(023)011【总页数】3页(P3797-3799)【关键词】SSD1963;液晶显示模块;R1610;AT070TN83【作者】赵彩虹;刘凯;尹涓【作者单位】南京航空航天大学金城学院机电工程系,南京211156;南京航空航天大学机电学院,南京210016;南京航空航天大学金城学院机电工程系,南京211156【正文语种】中文【中图分类】TN141.9液晶显示模块应用于人机交互过程中的文本及图形信息的显示[1]。
嵌入式工业控制系统中要求实时显示运行状态、系统参数以及相关图表图形等信息,采用液晶屏显示模块作为终端显示设备,显示内容丰富,直观性强[2]。
本文基于金丽科技公司(RDC)的X86系列的微处理器R1610和晶门科技公司(SolomonSystech)的SSD1963液晶显示控制器,采用群创公司(Innolux)的AT070TN83液晶屏,进行相关硬件电路和控制软件的设计,实现液晶屏的图形显示功能。
液晶显示模块结构框图如图1所示。
系统控制器采用微处理器控制,把系统信息以文本、图表的形式发送至LCD控制器;LCD控制器根据接收到的显示指令,通过LCD驱动器,以一定的扫描时序将需要显示的内容传输给液晶屏实时地进行显示。
SSD1963驱动
首页阅览室馆友我的图书馆来自:mcu_mouse > 嵌入式C语言配色:字号SSD1963的样例程序2010-12-01 | 阅:1803 转:28 | 分享//===============================typedef union {unsigned char UByte[2];unsigned int UInt;} UWORD;void SSD1963Data_16(uchar sdataH,uchar sdataL);void SSD1963Data1_16(uint dat);void SSD1963Command_16(uint cmd);void SetPixel(uint Col,uint Page,uint color); //显示一个相素点uint GetPixel(uint Col,uint Page);//得到一个像素点/******************************************************SSD1963的Conf脚,用来控制读写的方式,如果为0 则为6800总线MODE如果位1 ,则为8080总线。
下面的定义是8080 MODE(默认情况下为8080),可以通过修改Conf 跳点来修改读写式。
******************************************************/void SSD1963Command_8(uchar cmd);void SSD1963Data_8(uchar sdata);uchar GetSSD1963Data_8();uint GetSSD1963Data_16();void ReadSSD1963Set();#define SetSSD1963RD() SetBit(P4,4) #define SetSSD1963WR() SetBit(P4,5)#define SetSSD1963CS() SetBit(P4,2)#define SetSSD1963DC() SetBit(P4,3) #define SetSSD1963Reset() SetBit(P4,1) #define SetSSD1963Wait() SetBit(p4,0) #define ClrSSD1963RD() ClrBit(P4,4)#define ClrSSD1963CS() ClrBit(P4,2)#define ClrSSD1963DC() ClrBit(P4,3)#define ClrSSD1963Reset() ClrBit(P4,1)#define ClrSSD1963Wait() ClrBit(p4,0)#define DataPortL P1#define DataPortH P2//UWORD 是一个结构体//注意在给1963写命令时,只能用数据线的低8位来传输数据。
SSD1963初始化
SSD1963初始化/**************************************************************** mili开发板** LCD驱动代码** 版本:V1.0** 论坛:/doc/9fa31eb11a37f111f1855bd2.html** 淘宝:/doc/9fa31eb11a37f111f1855bd2.html /** 技术⽀持群:105339839***************************************************************//* Includes ------------------------------------------------------------------*/#include "stm32f10x.h"#include "hardware.h"#include "ili932x.h"#include "font.h"#includeunsigned int HDP=479;unsigned int HT=531;unsigned int HPS=43;unsigned int LPS=8;unsigned char HPW=10;unsigned int VDP=271;unsigned int VT=288;unsigned int VPS=12;unsigned int FPS=4;unsigned char VPW=10;u32 POINT_COLOR = BLUE,BACK_COLOR = WHITE; /* 分别设置点的颜⾊和底⾊ *//******************************************** 函数名:LCD_GPIO_Config* 描述:根据FSMC配置LCD的I/O*********************************************/void LCD_GPIO_Config(void){GPIO_InitTypeDef GPIO_InitStructure;/* 使能FSMC时钟*/RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC, ENABLE);/* 使能FSMC对应相应管脚时钟 D E */RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC|RCC_APB2Periph_GPIOD|RCC_APB2Periph_GPIOE,ENABLE); GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;/* 配置LCD背光控制管脚*/GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8;GPIO_Init(GPIOC, &GPIO_InitStructure);/* 配置FSMC相对应的数据线,FSMC-D0~D15: PD 14 15 0 1,PE 7 8 9 10 11 12 13 14 15,PD 8 9 10*/GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_8 | GPIO_Pin_9 |GPIO_Pin_10 | GPIO_Pin_14 | GPIO_Pin_15;GPIO_Init(GPIOD, &GPIO_InitStructure);GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10 |GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 |GPIO_Pin_15;GPIO_Init(GPIOE, &GPIO_InitStructure);/* 配置FSMC相对应的控制线* PD4-FSMC_NOE :LCD-RD* PD5-FSMC_NWE :LCD-WR* PD7-FSMC_NE1 :LCD-CS* PD11-FSMC_A16 :LCD-DC*/GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4;GPIO_Init(GPIOD, &GPIO_InitStructure);GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5;GPIO_Init(GPIOD, &GPIO_InitStructure);GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7;GPIO_Init(GPIOD, &GPIO_InitStructure);GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11 ;GPIO_Init(GPIOD, &GPIO_InitStructure);/* TFT control gpio init *///GPIO_SetBits(GPIOC, GPIO_Pin_10); // 背光打开GPIO_SetBits(GPIOD, GPIO_Pin_4); // RD = 1GPIO_SetBits(GPIOD, GPIO_Pin_5); // WR = 1GPIO_SetBits(GPIOD, GPIO_Pin_7); // CS = 1}/******************************************** 函数名:LCD_FSMC_Config* 描述:LCD FSMC 模式配置*********************************************/void LCD_FSMC_Config(void){FSMC_NORSRAMInitTypeDef FSMC_NORSRAMInitStructure;FSMC_NORSRAMTimingInitTypeDef p;p.FSMC_AddressSetupTime = 0x02; //地址建⽴时间p.FSMC_AddressHoldTime = 0x00; //地址保持时间p.FSMC_DataSetupTime = 0x05; //数据建⽴时间p.FSMC_BusTurnAroundDuration = 0x00;p.FSMC_CLKDivision = 0x00;p.FSMC_DataLatency = 0x00;p.FSMC_AccessMode = FSMC_AccessMode_B;// ⼀般使⽤模式B来控制LCDFSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM1;FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_NOR;FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b;FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low;FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable;FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable;FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable;FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable;FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable;FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p;FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p;FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure);/* 使能 FSMC Bank1_SRAM Bank */FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM1, ENABLE);}/******************************************************************************* 函数名称: LCD_Write_Reg** 功能描述: 写指令及数据** 作者: Dream** ⽇期: 2010年12⽉06⽇*****************************************************************************/void LCD_WriteReg(uint16_t LCD_Reg,uint16_t LCD_Dat){Write_Cmd(LCD_Reg);Write_Dat(LCD_Dat);}/******************************************************************************* 函数名称: Write_Cmd** 功能描述: 写指令** 作者: Dream** ⽇期: 2010年12⽉06⽇*****************************************************************************/void Write_Cmd(uint16_t LCD_Reg){// LCD_CS = 0;// LCD_RS = 0;// GPIOC->ODR = (GPIOC->ODR&0xff00)|(LCD_Reg&0x00ff);// GPIOB->ODR = (GPIOB->ODR&0x00ff)|(LCD_Reg&0xff00);// LCD_WR = 0;// LCD_WR = 1;// LCD_CS = 1;((*(__IO u16 *) (Bank1_LCD_C)) = ((u16) LCD_Reg));}/******************************************************************************* 函数名称: Write_Dat**功能描述: 写数据** 作者: Dream** ⽇期: 2010年12⽉06⽇*****************************************************************************/void Write_Dat(uint16_t LCD_Dat){// LCD_CS = 0;// LCD_RS = 1;// GPIOC->ODR = (GPIOC->ODR&0xff00)|(LCD_Dat&0x00ff);// GPIOB->ODR = (GPIOB->ODR&0x00ff)|(LCD_Dat&0xff00);// LCD_WR = 0;// LCD_WR = 1;// LCD_CS = 1;((*(__IO u16 *) (Bank1_LCD_D)) = ((u16)(LCD_Dat)));}/******************************************************************************* 函数名称: LCD_ReadReg** 功能描述: 读指令** 作者: Dream** ⽇期: 2010年12⽉06⽇*****************************************************************************/uint16_t LCD_ReadReg(uint16_t LCD_Reg){// uint16_t temp;// Write_Cmd(LCD_Reg); //写⼊要读的寄存器号//// GPIOB->CRH = (GPIOB->CRH & 0x00000000) | 0x44444444; //将端⼝⾼8位配置成输⼊// GPIOC->CRL = (GPIOC->CRL & 0x00000000) | 0x44444444; //将端⼝低8位配置成输⼊// LCD_CS = 0;// LCD_RS = 1;// LCD_RD = 0;// temp = ((GPIOB->IDR&0xff00)|(GPIOC->IDR&0x00ff)); //读取数据(读寄存器时,并不需要读2次) // LCD_RD = 1;// LCD_CS = 1;// GPIOB->CRH = (GPIOB->CRH & 0x00000000) | 0x33333333; //释放端⼝⾼8位为输出// GPIOC->CRL = (GPIOC->CRL & 0x00000000) | 0x33333333; //释放端⼝低8位为输出// return temp;/* Write 16-bit Index (then Read Reg) */LCD->LCD_REG = LCD_Reg;/* Read 16-bit Reg */return (LCD->LCD_RAM);}/******************************************************************************* 函数名称: LCD_ReadDat** 功能描述: 读数据** 作者: Dream** ⽇期: 2010年12⽉06⽇*****************************************************************************/uint16_t LCD_ReadDat(){// uint16_t temp;//// GPIOE->CRH = (GPIOE->CRH & 0x00000000) | 0x44444444; //将端⼝⾼8位配置成输⼊// GPIOE->CRL = (GPIOE->CRL & 0x00000000) | 0x44444444; //将端⼝低8位配置成输⼊// LCD_CS = 0;// LCD_RS = 1;// LCD_RD = 0;// temp = ((GPIOB->IDR&0xff00)|(GPIOC->IDR&0x00ff)); //读取数据(读寄存器时,并不需要读2次) // LCD_RD = 1;// LCD_CS = 1;// GPIOE->CRH = (GPIOE->CRH & 0x00000000) | 0x33333333; //释放端⼝⾼8位为输出// GPIOE->CRL = (GPIOE->CRL & 0x00000000) | 0x33333333; //释放端⼝低8位为输出//// return temp;u16 tmp_color = 0;u8 Green = 0,Red=0,Black=0;Green = *((__IO u8 *)(Bank1_LCD_D)); /*第⼀个数据⽆效*/Green = *((__IO u8 *)(Bank1_LCD_D));Red = *((__IO u8 *)(Bank1_LCD_D));Black = *((__IO u8 *)(Bank1_LCD_D));tmp_color = (u16)((((u16)Red>>3)<<11)|(((u16)Green>>2)<<5)|((u16)Black>>3));return(tmp_color);}/******************************************************************************* 函数名称: LCD_Configuration** 功能描述: LCD_IO⼝配置** 作者: Dream** ⽇期: 2010年12⽉06⽇*****************************************************************************/void LCD_Configuration(){GPIO_InitTypeDef GPIO_InitStructure;RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC,ENABLE); /* 配置数据IO 连接到GPIOB *********************/GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_11| GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15;GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; // 推挽输出⽅式GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; // 输出IO⼝最⼤最速为50MHZ GPIO_Init(GPIOB, &GPIO_InitStructure);/* 配置控制IO 连接到PD12.PD13.PD14.PD15 *********************/GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7| GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_11;GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; // 推挽输出⽅式GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; // 输出IO⼝最⼤最速为50MHZ GPIO_Init(GPIOC, &GPIO_InitStructure);}/******************************************************************************* 函数名称: LCD_Init** 功能描述: LCD初始化** 作者: Dream** ⽇期: 2010年12⽉06⽇*****************************************************************************/void LCD_Init(void){static uint16_t DeviceCode;//LCD_Configuration();LCD_GPIO_Config();LCD_FSMC_Config();LCD_WriteReg(0x0000,0x0001);LCD_Delay(5); // LCD_Delay 50 msDeviceCode = LCD_ReadReg(0x0000);printf(" ID=0x%x\n",DeviceCode);///////////////////////////////////LCD_Delay(5); // delay 50 msWrite_Dat(0x0023); //N=0x36 for 6.5M, 0x23 for 10M crystalWrite_Dat(0x0002);Write_Dat(0x0004);Write_Cmd(0x00E0); // PLL enableWrite_Dat(0x0001);LCD_Delay(1);Write_Cmd(0x00E0);Write_Dat(0x0003);LCD_Delay(5);Write_Cmd(0x0001); // software resetLCD_Delay(5);Write_Cmd(0x00E6); //PLL setting for PCLK, depends on resolutionWrite_Dat(0x0001);Write_Dat(0x0033);Write_Dat(0x0032);Write_Cmd(0x00B0); //LCD SPECIFICATIONWrite_Dat(0x0020);Write_Dat(0x0000);Write_Dat((HDP>>8)&0X00FF); //Set HDPWrite_Dat(HDP&0X00FF);Write_Dat((VDP>>8)&0X00FF); //Set VDPWrite_Dat(VDP&0X00FF);Write_Dat(0x0000);Write_Cmd(0x00B4); //HSYNCWrite_Dat((HT>>8)&0X00FF); //Set HTWrite_Dat(HT&0X00FF);Write_Dat((HPS>>8)&0X00FF); //Set HPSWrite_Dat(HPS&0X00FF);Write_Dat(HPW); //Set HPWWrite_Dat((LPS>>8)&0X00FF); //Set HPSWrite_Dat(LPS&0X00FF);Write_Dat(0x0000);Write_Cmd(0x00B6); //VSYNCWrite_Dat((VT>>8)&0X00FF); //Set VTWrite_Dat(VT&0X00FF);Write_Dat((VPS>>8)&0X00FF); //Set VPSWrite_Dat(VPS&0X00FF);Write_Dat(VPW); //Set VPWWrite_Dat((FPS>>8)&0X00FF); //Set FPSWrite_Dat(FPS&0X00FF);// Write_Cmd(0x00BA);// Write_Dat(0x000F); //GPIO[3:0] out 1// Write_Cmd(0x00B8);// Write_Dat(0x0007); //GPIO3=input, GPIO[2:0]=output// Write_Dat(0x0001); //GPIO0 normalWrite_Cmd(0x0036); //rotationWrite_Dat(0x0000);Write_Dat(0x0010);//============================================ //============================================ // LCD_WR_REG(0x003A); //rotation// Write_Dat(0x0050);// Write_Cmd(0x0026); //rotation// Write_Dat(0x0003);// Write_Cmd(0x0030); //rotation// Write_Dat(0x0000);//============================================= //============================================= Write_Cmd(0x00F0);//pixel data interfaceWrite_Dat(0x0003);//16位模式//Write_Cmd(0x0021);//进⼊图形颜⾊翻转模式Write_Cmd(0x00BC);//重要Write_Dat(0x0040);//对⽐度Write_Dat(0x0070);//亮度Write_Dat(0x0040);//饱和度值 //// Write_Dat(0x0080);//对⽐度// Write_Dat(0x0080);//亮度// Write_Dat(0x0080);//饱和度值 //Write_Dat(0x0001);//处理机允许Write_Cmd(0x0029); //display on//---------------------------------------------// Write_Cmd(0x0037);//重要// Write_Dat(0x000);// Write_Dat(0);LCD_Clear(WHITE);}//void WR_DATA_Prepare(void)//{// Write_Cmd(0x002c);//}/***************************************************************************** ** 函数名称: LCD_DrawPoint** 功能描述: 写⼀个点** 作者: Dream** ⽇期: 2010年12⽉06⽇*****************************************************************************/ void LCD_DrawPoint(uint16_t x, uint16_t y, uint16_t color){// LCD_SetCursor(x,y); //设置光标位置// LCD_WriteRAM_Prepare(); //开始写⼊GRAM// Write_Dat(color);u32 point = color;unsigned char rcode,gcode,bcode;rcode = (unsigned char)(point >> 16);gcode = (unsigned char)(point >> 8);bcode = (unsigned char)point;Write_Cmd(0x002A);Write_Dat(x>>8);Write_Dat(x&0x00ff);Write_Dat(479>>8);Write_Dat(479&0x00ff);Write_Cmd(0x002b);Write_Dat(y>>8);Write_Dat(y&0x00ff);Write_Dat(271>>8);Write_Dat(271&0x00ff);Write_Cmd(0x002c);Write_Dat(color);// Write_Dat((rcode << 8) | (gcode));// Write_Dat((bcode << 8) | (rcode));// Write_Dat((gcode << 8) | (bcode));}/***************************************************************************** ** 函数名称: LCD_WriteRAM_Prepare** 功能描述: 些准备** 作者: Dream** ⽇期: 2010年12⽉06⽇*****************************************************************************/ void LCD_WriteRAM_Prepare(){Write_Cmd(0x002c);}/***************************************************************************** ** 函数名称: LCD_SetCursor** 功能描述: 设置光标函数** 作者: Dream** ⽇期: 2010年12⽉06⽇*****************************************************************************/ void LCD_SetCursor(uint8_t Xpos,uint16_t Ypos){// Write_Cmd(0x002A);// Write_Dat(Xpos>>8);// Write_Dat(Xpos&0x00ff);// Write_Dat(479>>8);// Write_Dat(479&0x00ff);// Write_Cmd(0x002b);// Write_Dat(Ypos>>8);// Write_Dat(Ypos&0x00ff);// Write_Dat(271>>8);// Write_Dat(271&0x00ff);Write_Cmd(0x002A);Write_Dat(Xpos>>8);Write_Dat(Xpos&0x00ff);Write_Dat(479>>8);Write_Dat(479&0x00ff);Write_Cmd(0x002b);Write_Dat(Ypos>>8);Write_Dat(Ypos&0x00ff);Write_Dat(271>>8);Write_Dat(271&0x00ff);}/***************************************************************************** ** 函数名称: LCD_Clear** 功能描述: 清屏幕函数** 作者: Dream** ⽇期: 2010年12⽉06⽇*****************************************************************************/ //清屏函数//Color:要清屏的填充⾊void LCD_Clear(u32 color){unsigned int l=480,w;Write_Cmd(0x002a);Write_Dat(0);Write_Dat(0);Write_Dat(HDP>>8);Write_Dat(HDP&0x00ff);Write_Cmd(0x002b);Write_Dat(0);Write_Dat(0);Write_Dat(VDP>>8);Write_Dat(VDP&0x00ff);Write_Cmd(0x002c);while(l--){for(w=0;w<272;w++){Write_Dat(color);}}}/***************************************************************************** ** 函数名称: LCD_Delay** 功能描述: ⽤于LCD驱动延时** 作者: Dream** ⽇期: 2010年12⽉06⽇*****************************************************************************/ void LCD_Delay (uint32_t nCount){__IO uint16_t i;for (i=0;i}/***名称:void LCD_WindowMax()*参数:*返回:⽆*功能:设置窗⼝**/void LCD_WindowMax (unsigned int xsta,unsigned int ysta,unsigned int xend,unsigned int yend) {Write_Cmd(0X002A);Write_Dat(xsta>>8);Write_Dat(xsta&0X00FF);Write_Dat(xend>>8);Write_Dat(xend&0X00FF);Write_Cmd(0X002B);Write_Dat(ysta>>8);Write_Dat(ysta&0X00FF);Write_Dat(yend>>8);Write_Dat(yend&0X00FF);}/***名称:void LCD_Fill(uint8_t xsta, uint16_t ysta, uint8_t xend, uint16_t yend, uint16_t colour)*参数:xsta 起始X坐标ysta 起始Y坐标xend 结束X坐标yend 结束Y坐标color 待填充颜⾊*返回:⽆*功能:在指定矩形区域填充指定颜⾊,区域⼤⼩(xend-xsta)*(yend-ysta)*备注:部分区域少⼀⾏像素点**/void LCD_Fill(uint8_t xsta, uint16_t ysta, uint8_t xend, uint16_t yend, uint16_t colour){u32 n;/*设置窗⼝ */LCD_WindowMax (xsta, ysta, xend, yend);LCD_WriteRAM_Prepare(); /*开始写⼊GRAM*/n=(u32)(yend-ysta+1)*(xend-xsta+1);while(n--){Write_Dat(colour);} /*显⽰所填充的颜⾊*/}/***名称:void LCD_DrawLine(uint16_t xsta, uint16_t ysta, uint16_t xend, uint16_t yend)*参数:xsta X起始坐标ysta Y起始坐标xend X终点坐标yend Y终点坐标*返回:⽆*功能:指定坐表(两点),画线*备注:需要添加颜⾊参数**/void LCD_DrawLine(uint16_t xsta, uint16_t ysta, uint16_t xend, uint16_t yend, uint16_t color){u16 x, y, t;if((xsta==xend)&&(ysta==yend))LCD_DrawPoint(xsta, ysta, color);elseif(abs(yend-ysta)>abs(xend-xsta))/*斜率⼤于1 */{if(ysta>yend){t=ysta;yend=t;t=xsta;xsta=xend;xend=t;}for(y=ysta;y{x=(u32)(y-ysta)*(xend-xsta)/(yend-ysta)+xsta;LCD_DrawPoint(x, y, color);}}else /*斜率⼩于等于1 */{if(xsta>xend){t=ysta;ysta=yend;yend=t;t=xsta;xsta=xend;xend=t;}for(x=xsta;x<=xend;x++) /*以x轴为基准*/{y =(u32)(x-xsta)*(yend-ysta)/(xend-xsta)+ysta;LCD_DrawPoint(x, y, color);}}}/***名称:void Draw_Circle(uint16_t x0, uint16_t y0, uint8_t r)*参数:x0 中⼼点横坐标y0 中⼼点纵坐标r 半径*返回:⽆*功能:在指定位置画⼀个指定⼤⼩的圆*备注:加⼊颜⾊参数,是否填充等**/void Draw_Circle(uint16_t x0, uint16_t y0, uint8_t r, uint16_t color) {int a,b;int di;a=0;b=r;di=3-(r<<1); /*判断下个点位置的标志*/while(a<=b){LCD_DrawPoint(x0-b, y0-a, color); //3LCD_DrawPoint(x0+b, y0-a, color); //0LCD_DrawPoint(x0-a, y0+b, color); //1LCD_DrawPoint(x0-b, y0-a, color); //7LCD_DrawPoint(x0-a, y0-b, color); //2LCD_DrawPoint(x0+b, y0+a, color); //4LCD_DrawPoint(x0+a, y0-b, color); //5LCD_DrawPoint(x0+a, y0+b, color); //6LCD_DrawPoint(x0-b, y0+a, color);a++;/*使⽤Bresenham算法画圆*/if(di<0)di +=4*a+6;else{di+=10+4*(a-b);b--;}LCD_DrawPoint(x0+a, y0+b, color);}}/***名称:void LCD_DrawRectangle(uint16_t xsta, uint16_t ysta, uint16_t xend, uint16_t yend)*参数:xsta X起始坐标ysta Y起始坐标xend X结束坐标yend Y结束坐标*返回:⽆*功能:在指定区域画矩形*备注:**/void LCD_DrawRectangle(uint16_t xsta, uint16_t ysta, uint16_t xend, uint16_t yend, uint16_t color) {LCD_DrawLine(xsta, ysta, xend, ysta, color);LCD_DrawLine(xsta, ysta, xsta, yend, color);LCD_DrawLine(xsta, yend, xend, yend, color);LCD_DrawLine(xend, ysta, xend, yend, color);}/***名称:void LCD_ShowChar(u8 x, u16 y, u8 num, u8 size, u16 PenColor, u16 BackColor)*参数:x,y 起始坐标(x:0~234 y:0~308)num 字符ASCII码值size字符⼤⼩,使⽤默认8*16PenColor 字体颜⾊BackColor 字体背景颜⾊*功能:*备注:注意屏幕⼤⼩**/void LCD_ShowChar(u8 x, u16 y, u8 num, u8 size, u16 PenColor, u16 BackColor){#define MAX_CHAR_POSX 232#define MAX_CHAR_POSY 304u8 temp;u8 pos,t;if(x>MAX_CHAR_POSX||y>MAX_CHAR_POSY)return;num=num-' '; /*得到偏移后的值 */for(pos=0;pos{temp=asc2_1608[num][pos]; /*调⽤1608字体 */for(t=0;t{if(temp&0x01) /*从低位开始*/{LCD_DrawPoint(x+t, y+pos, PenColor); /*画字体颜⾊⼀个点*/}elseLCD_DrawPoint(x+t, y+pos, BackColor); /*画背景颜⾊⼀个点*/temp>>=1;}}}//m^n函数u32 mypow(u8 m,u8 n){u32 result=1;while(n--)result*=m;return result;}//显⽰2个数字//x,y :起点坐标//len :数字的位数//size:字体⼤⼩//color:颜⾊//num:数值(0~4294967295);void LCD_ShowNum(u8 x,u8 y,u32 num,u8 len, u16 PenColor, u16 BackColor){u8 size = 16; /* 这⾥使⽤默认的16*8 */u8 t,temp;u8 enshow=0;for(t=0;t{temp=(num/mypow(10,len-t-1))%10;if(enshow==0&&t<(len-1)){if(temp==0){LCD_ShowChar(x+(size/2)*t,y,' ',size, PenColor, BackColor);continue;}else enshow=1;}LCD_ShowChar(x+(size/2)*t,y,temp+'0',size, PenColor, BackColor);}}/**名称:void LCD_ShowCharString(uint16_t x, uint16_t y, const uint8_t *p, uint16_t PenColor, uint16_t BackColor)参数:x,y 起始坐标p 指向字符串起始地址PenColor 字符颜⾊BackColor 背景颜⾊功能:备注:⽤16字体,可以调节此函数不能单独调⽤**/void LCD_ShowCharString(uint16_t x, uint16_t y, const uint8_t *p, uint16_t PenColor, uint16_t BackColor){uint8_t size = 16; /*---字符⼤⼩默认16*8---*/if(x>MAX_CHAR_POSX){x=0;y+=size;} /*超出X轴字体最⼩单位,换⾏*/if(y>MAX_CHAR_POSY){y=x=0;LCD_Clear(WHITE);} /*超出Y轴字体最⼩单位,回到原点,并且清屏*/LCD_ShowChar(x, y, *p, size, PenColor, BackColor); /*0表⽰⾮叠加⽅式*/}/***名称: u16 findHzIndex(u8 *hz)*参数:hz*功能:索引汉字存储的内存地址*备注:**/u16 findHzIndex(u8 *hz) /* 在⾃定义汉字库在查找所要显⽰ *//* 的汉字的位置 */{u16 i=0;FNT_GB16 *ptGb16 = (FNT_GB16 *)GBHZ_16; /*ptGb16指向GBHZ_16*/while(ptGb16[i].Index[0] > 0x80){if ((*hz == ptGb16[i].Index[0]) && (*(hz+1) == ptGb16[i].Index[1])) /*汉字⽤两位来表⽰地址码*/{return i;}i++;if(i > (sizeof((FNT_GB16 *)GBHZ_16) / sizeof(FNT_GB16) - 1)) /* 搜索下标约束 */{break;}}return 0;}/***名称:void WriteOneHz(uint16_t x0, uint16_t y0, uint8_t *pucMsk, uint16_t PenColor, uint16_t BackColor) *参数:x0,y0 起始坐标*pucMsk 指向PenColor 字符颜⾊BackColor 背景颜⾊*功能:*备注:此函数不能单独作为汉字字符显⽰**/void WriteOneHz(u16 x0, u16 y0, u8 *pucMsk, u16 PenColor, u16 BackColor){u16 i,j;u16 mod[16]; /* 当前字模 16*16 */u16 *pusMsk; /* 当前字库地址 */u16 y;pusMsk = (u16 *)pucMsk;for(i=0; i<16; i++) /* 保存当前汉字点阵式字模 */{mod[i] = *pusMsk; /* 取得当前字模,半字对齐访问 */mod[i] = ((mod[i] & 0xff00) >> 8) | ((mod[i] & 0x00ff) << 8);/* 字模交换⾼低字节*/pusMsk = pusMsk+1;}y = y0;for(i=0; i<16; i++) /* 16⾏ */{for(j=0; j<16; j++) /* 16列 */{if((mod[i] << j) & 0x8000) /* 显⽰第i⾏共16个点 */{LCD_DrawPoint(x0+j, y0+i, PenColor);}else{LCD_DrawPoint(x0+j, y0+i, BackColor);}}y++;}}/***名称:void LCD_ShowHzString(u16 x0, u16 y0, u8 *pcStr, u16 PenColor, u16 BackColor)*参数:x0,y0 起始坐标pcStr 指向PenColor 字体颜⾊BackColor 字体背景*功能:显⽰汉字字符串*备注:这个函数不能单独调⽤**/void LCD_ShowHzString(u16 x0, u16 y0, u8 *pcStr, u16 PenColor, u16 BackColor){#define MAX_HZ_POSX 224#define MAX_HZ_POSY 304u16 usIndex;u8 size = 16;FNT_GB16 *ptGb16 = 0;ptGb16 = (FNT_GB16 *)GBHZ_16;if(x0>MAX_HZ_POSX){x0=0;y0+=size;} /*超出X轴字体最⼩单位,换⾏*/if(y0>MAX_HZ_POSY){y0=x0=0;LCD_Clear(WHITE);} /*超出Y轴字体最⼩单位,回到原点,并且清屏*/ usIndex = findHzIndex(pcStr);WriteOneHz(x0, y0, (u8 *)&(ptGb16[usIndex].Msk[0]), PenColor, BackColor); /* 显⽰字符 */}/***名称:void LCD_ShowString(u16 x0, u16 y0, u8 *pcstr, u16 PenColor, u16 BackColor)*参数:x0 y0 起始坐标pcstr 字符串指针PenColor 字体颜⾊BackColor 字体背景⾊*功能:调⽤字符和汉字显⽰函数,实现字符串显⽰*备注:**/void LCD_ShowString(u16 x0, u16 y0, u8 *pcStr, u16 PenColor, u16 BackColor){while(*pcStr!='\0'){if(*pcStr>0x80) /*显⽰汉字*/{LCD_ShowHzString(x0, y0, pcStr, PenColor, BackColor);pcStr += 2;x0 += 16;}else /*显⽰字符*/{LCD_ShowCharString(x0, y0, pcStr, PenColor, BackColor);pcStr +=1;x0+= 8;}}}/***************************************************************************** 名称:u16 ili9320_BGRtoRGB(u16 Color)* 功能:RRRRRGGGGGGBBBBB 改为 BBBBBGGGGGGRRRRR 格式* ⼊⼝参数:Color BRG 颜⾊值* 出⼝参数:RGB 颜⾊值* 说明:内部函数调⽤* 调⽤⽅法:****************************************************************************/u16 LCD_RGBtoBGR(u16 Color){u16 r, g, b, bgr;b = (Color>>0) & 0x1f; /* 提取B */g = (Color>>5) & 0x3f; /* 中间六位 */r = (Color>>11) & 0x1f; /* 提取R */bgr = (b<<11) + (g<<5) + (r<<0);return( bgr );}/***************************************************************************** 名称:void LCD_DrawPicture(u16 StartX,u16 StartY,u16 EndX,u16 EndY,u16 *pic) * 功能:在指定座标范围显⽰⼀副图⽚* ⼊⼝参数:StartX ⾏起始座标* StartY 列起始座标* EndX ⾏结束座标* EndY 列结束座标pic 图⽚头指针* 出⼝参数:⽆* 说明:图⽚取模格式为⽔平扫描,16位颜⾊模式* 调⽤⽅法:LCD_DrawPicture(0,0,100,100,(u16*)demo);****************************************************************************/void LCD_DrawPicture(u16 StartX,u16 StartY,u16 Xend,u16 Yend,u8 *pic){static u16 i=0,j=0;u16 *bitmap = (u16 *)pic;for(j=0; j{for(i=0; iLCD_DrawPoint(StartX+i, StartY+j, *bitmap++);}}//快速ALPHA BLENDING算法.//src:源颜⾊//dst:⽬标颜⾊//alpha:透明程度(0~32)//返回值:混合后的颜⾊.u16 gui_alpha_blend565(u16 src,u16 dst,u8 alpha){u32 src2;u32 dst2;//Convert to 32bit |-----GGGGGG-----RRRRR------BBBBB|src2=((src<<16)|src)&0x07E0F81F;dst2=((dst<<16)|dst)&0x07E0F81F;//Perform blending R:G:B with alpha in range 0..32//Note that the reason that alpha may not exceed 32 is that there are only//5bits of space between each R:G:B value, any higher value will overflow//into the next component and deliver ugly result.dst2=((((dst2-src2)*alpha)>>5)+src2)&0x07E0F81F;return (dst2>>16)|dst2;}。
ssd固态硬盘的原理深层透视
SSD固态硬盘的原理深层透视2012-08-07 10:23:18 来源: 作者: 【大中小】浏览:501次评论:0条目前市场是流通的SSD固态硬盘的工作原理都是大家很好奇的,这里就对SSD的工作原理进行讲解,让大家能更好的进行购买和使用。
SSD固态硬盘的接口规范和定义、功能及使用方法上与普通硬盘的相同,在产品外形和尺寸上也与普通硬盘一致。
由于固态硬盘没有普通硬盘的旋转介质,因而抗震性极佳。
其芯片的工作温度范围很宽(-40~85摄氏度)。
SSD固态硬盘工作原理下面是一个关于NAND闪盘的原理图。
从下图我们可以看到,每一个“单元”就是由一个这样的晶体管组成的。
在单级单元(SLC,single level cell)闪存设备中,一个晶体管可容纳1比特数据。
您通过电子通道将数据写入单元;将足够高的电压加于两端,创造一个足够强大的电场,电子将穿透氧化物进入浮动门。
消除电压,电子将继续停留在浮动门。
将电压穿越通道而不施加到门上,扭转偏压,电子将向另一个方向移动。
简单的说,这就是闪盘的工作原理-你有两种状态,0和1,即使单元没有电了,状态也会维持住,因此对存储设备来说是非常理想的。
编程闪存是一个反复的过程。
该控制器将电压施于门(或通道)上,允许一些电子穿过并检查单元的临界电压。
当临界电压已达到一些预定的值时,就开始编程并储存数据了。
MLC与SLC的区别目前SSD固态硬盘硬盘使用两种形式的NAND闪存:单级单元(SLC)和多级单元(MLC)。
两者之间的差别是每单元存储的数据量,SLC每单元存储1比特而MLC每单元存储2比特。
关键在于,SLC和MLC占据了相同大小的芯片面积。
因此,在同样的价格下,MLC可以有两倍容量的效果。
英特尔的SLC和MLC闪存实际上使用了相同的晶体管,不同之处在于怎样读/写这两个闪存。
SLC只有两个电压符,因为它只有两个状态(0或1)。
MLC却有四个状态(00,01,10 ,11),因此需要花费较长的时间来访问,因为你不想意外写入错误的数据;您已有了相同的最大、最小电压,您现在仅仅有它们两者之间更多的刻度:SLC (left) vs. MLC (right)SLC和MLC的擦除性能是一样的,MLC闪存的读取性能需花费两倍长的时间,写入性能需花费四倍长的时间。
SSD1303T8R1资料
SOLOMON SYSTECHSEMICONDUCTOR TECHNICAL DATAThis document contains information on a new product. Specifications and information herein are subject to change without notice. SSD1303 Rev 1.7 P 1/56 May 2005 Copyright 2005 Solomon Systech LimitedAdvance Information132 x 64 Dot MatrixOLED/PLED Segment/Common Driver with ControllerSSD1303TABLE OF CONTENTS1GENERAL INFORMATION (5)2FEATURES (5)3ORDERING INFORMATION (6)4BLOCK DIAGRAM (7)5DIE PAD FLOOR PLAN (8)6PIN DESCRIPTION (12)7FUNCTIONAL BLOCK DESCRIPTIONS (15)7.1O SCILLATOR C IRCUIT AND D ISPLAY T IME G ENERATOR (15)7.2R ESET C IRCUIT (15)7.3C OMMAND D ECODER AND C OMMAND I NTERFACE (15)7.4MPU P ARALLEL 6800-SERIES I NTERFACE (16)7.5MPU P ARALLEL 8080-SERIES I NTERFACE (16)7.6MPU S ERIAL I NTERFACE (17)7.7G RAPHIC D ISPLAY D ATA RAM (GDDRAM) (17)7.8C URRENT C ONTROL AND V OLTAGE C ONTROL (17)7.9S EGMENT D RIVERS / C OMMON D RIVERS (18)7.10A REA C OLOUR D ECODER (18)7.11DC-DC V OLTAGE C ONVERTER (19)8COMMAND TABLE (21)8.1D ATA R EAD / W RITE (24)9COMMAND DESCRIPTIONS (25)10MAXIMUM RATINGS (32)11DC CHARACTERISTICS (33)12AC CHARACTERISTICS (34)13APPLICATION EXAMPLE (38)14SSD1303T3R1 PACKAGE DETAILS (39)SSD1303T3R1 P IN A SSIGNMENT (39)15SSD1303T6R1 PACKAGE DETAILS (43)SSD1303T6R1 P IN A SSIGNMENT (43)SSD1303T6R1 TAB P ACKAGE D IMENSIONS (45)16SSD1303T8R1 PACKAGE DETAILS (47)SSD1303T8R1 P IN A SSIGNMENT (47)SSD1303T8R1 TAB P ACKAGE D IMENSIONS (49)17SSD1303T9R1 PACKAGE DETAILS (51)SSD1303T9R1 P IN A SSIGNMENT (51)SSD1303T9R1 TAB P ACKAGE D IMENSIONS (53)Solomon Systech May 2005 P 2/56 Rev 1.7 SSD130318SSD1303Z PACKAGE DETAILS (55)SSD1303Rev 1.7 P 3/56 May 2005 Solomon SystechTABLE OF FIGURESFigure 1 - Block Diagram (7)Figure 2 - SSD1303Z Pin Assignment (8)Figure 3 - SSD1303Z Alignment mark dimensions (11)Figure 4 - Oscillator Circuit (15)Figure 5 - Display data read back procedure - insertion of dummy read (16)Figure 6 – Display data write procedure in SPI mode (17)Figure 7 - DC-DC voltage converter circuit (19)Figure 8 - Horizontal scroll direction (25)Figure 9 - Segment current vs Contrast setting (26)Figure 10 - 6800-series MPU parallel interface characteristics (35)Figure 11 - 8080-series MPU parallel interface characteristics (36)Figure 12 - Serial interface characteristics (37)Figure 13 - Application Example (Block Diagram of SSD1303T3) (38)Figure 14 - SSD1303T3R1 pin assignment (Copper view, Normal TAB design) (39)Figure 15 - SSD1303T6R1 pin assignment (Copper view) (43)Figure 16 - SSD1303T9R1 pin assignment (Copper view) (51)LIST OF TABLESTable 1 - Ordering Information (6)Table 2 - SSD1303Z Die Pad Coordinates (9)Table 3 - Passive component selection: (20)Table 4 - Command table (21)Table 5 - Read command table (23)Table 6 - Address increment table (Automatic) (24)Table 7 - Maximum Ratings (32)Table 8 - DC Characteristics (33)Table 9 - AC Characteristics (34)Table 10 - 6800-Series MPU Parallel Interface Timing Characteristics (35)Table 11 - 8080-Series MPU Parallel Interface Timing Characteristics (36)Table 12 - Serial Interface Timing Characteristics (37)Table 13 - SSD1303T3R1 pin assignment (40)Table 14 - SSD1303T6R1 pin assignment (44)Table 15 - SSD1303T8R1 pin assignment (48)Table 16 - SSD1303T9R1 pin assignment (52)Solomon Systech May 2005 P 4/56 Rev 1.7 SSD13031 GENERAL INFORMATIONThe SSD1303 is a single-chip CMOS OLED/PLED driver with controller for organic/polymer light emitting diode dot-matrix graphic display system. It consists of 132 segments, 64 commons that can support a maximum display resolution of 132x64. Besides, there are 4-colour selections to support monochrome or area colour OLED/PLED. This IC is designed for Common Cathode type OLED panel.The SSD1303 embeds with contrast control, display RAM and oscillator, which reduces the number of external components and power consumption. It is suitable for many compact portable applications, such as mobile phone sub-display, calculator and MP3 player, etc.2 FEATURES- Support maximum 132 x 64 dot matrix panel- Area colour support with 4 Colour Selection and 64 steps per colour- Logic voltage supply: V DD = 2.4V - 3.5V- High voltage supply: V CC = 7.0V - 16.0V- Maximum segment output current: 320uA- Maximum common sink current: 45mA- Embedded 132 x 64 bit SRAM display buffer- 256-step Contrast Control on monochrome passive OLED panel- On-ChipOscillator- Programmable Frame Frequency and Multiplexing Ratio- 8-bit 6800-series Parallel Interface, 8-bit 8080-series Parallel Interface, Serial Peripheral Interface- Row Re-mapping and Column Re-mappingScrolling- Vertical- Automatic horizontal scrolling function- Low power consumption- Wide range of operating temperatures: -40 to 90 °CSSD1303Rev 1.7 P 5/56 May 2005 Solomon SystechSolomon SystechMay 2005P 6/56Rev 1.7SSD13033 ORDERING INFORMATIONTable 1 - Ordering InformationOrdering Part NumberSEG COM Package Form Reference RemarkSSD1303Z13264Gold Bump DiePage 8Die size: 9.22mm x 1.55mmPad pitch: COM 51.8µm SEG 52.2µmSSD1303T3R1 96 64 TABPage 39 •35mm film•4 sprocket hole •Folding TAB• 80 / 68 / SPI interface• Output lead pitch 0.12974mm SSD1303T6R1 132 64 TABPage 43 • 35mm film•4 sprocket hole •Folding TAB• 80 / 68 / SPI interface • Output lead pitch 0.11976 SSD1303T8R1 96 64 TABPage 47 • 35mm film•4 sprocket hole •Folding TAB• 80 / 68 / SPI interface• Output lead pitch 0.12974mm SSD1303T9R1 96 64 TABPage 51• 35mm film• 4 sprocket hole •Folding TAB• 80 / 68 / SPI interface• Output lead pitch 0.12974mm4 BLOCK DIAGRAMFigure 1 - Block DiagramSSD1303Rev 1.7 P 7/56 May 2005 Solomon SystechTable 2 - SSD1303Z Die Pad CoordinatesSSD1303Rev 1.7 P 9/56 May 2005 Solomon SystechSolomon SystechMay 2005P 10/56 Rev 1.7SSD1303Figure 3 - SSD1303Z Alignment mark dimensions6 PIN DESCRIPTIONCLThis pin is the system clock input. When internal clock is enabled, this pin should be left open. The internal clock is output from this pin. When internal oscillator is disabled, this pin receives display clock signal from external clock source. CLSThis is the internal clock enable pin. When it is pulled HIGH, internal clock is enabled. When it is pulled LOW, the internal clock is disabled, an external clock source must be connected to the CL pin for normal operation .BS0, BS1, BS2These are MCU interface input selection pins. See the following table for selecting different interfaces:6800-parallel interface 8080-parallel interface SerialinterfaceBS0 0 0 0 BS1 0 1 0 BS2 11CS#This pin is the chip select input. The chip is enabled for MCU communication only when CS# had been pulled low.RES#This is a reset signal input pin. When it is pulled LOW, initialization of the chip is executed.D/CThis is the Data/Command control pin. When it is pulled HIGH, the input at D 7-D 0 is treated as display data. When it is pulled LOW, the input at D 7-D 0 is transferred to the command registers. For detail relationship to MCU interface signals, please refer to the Timing Characteristics Diagrams.R/W (WR#)This is a MCU interface input pin. When 6800-series Parallel Interface mode is selected, this pin is used as Read/Write (R/W) selection input. Pull this pin to HIGH for read mode and pull it to LOW for write mode.When 8080-series Parallel Interface mode is selected, this pin is used as Write (WR#) selection input. Pull this pin to LOW for write mode. Data write operation is initiated when this pin is pulled LOW and the CS# is pulled LOW.E (RD#)This is a MCU interface input pin. When 6800-series Parallel Interface is selected, this pin is used as Enable (E) signal. Read/Write operation is initiated when this pin is pulled HIGH and the CS# pin is pulled LOW. When 8080-series Parallel Interface is selected, this pin is used to receive the Read Data (RD#) signal. Data read operation is initiated when this pin is pulled LOW and CS# pin is pulled LOW.D 7-D 0These are 8-bit bi-directional data bus to be connected to the microprocessor’s data bus. When serial interface mode is selected, D 1 will be the serial data input, SDIN, D 0 will be the serial clock input, SCLK, and D 2 should be left opened.VDDThis is a voltage supply pin. It must be connected to external source.VSSThis is a ground pin. It also acts as a reference for the logic pins and the OLED driving voltages. It must be connected to external ground.BGGNDThis is a ground pin for analog circuits. It must be connected to external groundVCCThis is the most positive voltage supply pin of the chip. It should be supplied externally.VREFThis is a voltage reference pin for pre-charge voltage in driving OLED device. Voltage should be set to match with the OLED driving voltage in current drive phase. It can either be supplied externally or by connecting to VCC.IREFThis is a segment current reference pin. A resistor should be connected between this pin and V SS. Set the current at 10uA.VCOMHThis is an input pin for the voltage output high level for COM signals. A capacitor should be connected between this pin and VSS.VDDB This is a power supply pin for the internal buffer of the DC-DC voltage converter. It must be connected to V DD when the converter is used.VSSBThis is a ground pin for the internal buffer of the DC-DC voltage converter. It must be connected to V SS when the converter is used.GDRThis is an output pin drives the gate of the external NMOS of the booster circuit.RESEThis is a source current pin of the external NMOS of the booster circuit.VB REFThis is an internal voltage reference pin for booster circuit. A stabilization capacitor, typ. 1uF, should be connected to Vss.FBThis is a feedback resistor input pin for the booster circuit. It is used to adjust the booster output voltage level, Vcc.COM0-COM63These are pins provided the Common switch signals to the OLED panel. They are in high impedance state when display is OFF.SEG0-SEG131These are pins provided the Segment switch signals to the OLED panal. They are in high impedance stage when display is OFF.TR0-TR8, GPIO0, GPIO1, ICAS, M and DOF#These are reserved pins. No connection necessary and should be left open individually.VSLThis is a segment voltage reference pin. This pin should be connected to VSS externally.VCLThis is a common voltage reference pin. This pin should be connected to VSS externally.M/SThis pin must be connected to VDD to enable the chip.NCDummy pad. Do not group or short NC pins together.7 FUNCTIONAL BLOCK DESCRIPTIONS7.1 Oscillator Circuit and Display Time GeneratorFigure 4 - Oscillator CircuitThis module is an On-Chip low power RC oscillator circuitry (Figure 4). The oscillator generates the clockfor the Display Timing Generator.7.2 Reset CircuitWhen RES# pin is pulled LOW, the chip is initialized with the following status:1. Display is OFF2. 132 x 64 Display Mode3. Normal segment and display data column address and row address mapping (SEG0 is mapped tocolumn address 00H and COM0 is mapped to row address 00H)4. Shift register data clear in serial interface5. Display start line is set at display RAM address 06. Column address counter is set at 07. Normal scan direction of the COM outputs8. Contrast control register is set at 80H9. DC/DC enable7.3 Command Decoder and Command InterfaceThis module determines whether the input data is interpreted as data or command. When the D/C# pin is pulled HIGH, the inputs at D7-D0 are interpreted as data and be written to Graphic Display Data RAM (GDDRAM). When it is pulled LOW, the inputs at D7-D0 are interpreted as command, they will be decoded and be written to the corresponding command registers.7.4 MPU Parallel 6800-series InterfaceThe parallel interface consists of 8 bi-directional data pins (D7-D0), R/W (WR#), E (RD#), D/C, CS#. When the R/W (WR#) pin is pulled HIGH, Read operation from the Graphic Display Data RAM (GDDRAM) or the status register occurs. When the R/W (WR#) pin is pulled LOW, Write operation to Display Data RAM or Internal Command Registers occurs, depending on the status of D/C input. The E (RD#) input serves as data latch signal (clock) when HIGH provided that CS# is LOW. Refer to Parallel Interface Timing Diagram of 6800-series microprocessors.In order to match the operating frequency of display RAM with that of the microprocessor, some pipeline processing is internally performed, which requires the insertion of a dummy read before the first actual display data read. This is shown in Figure 5 below.Figure 5 - Display data read back procedure - insertion of dummy read7.5 MPU Parallel 8080-series InterfaceThe parallel interface consists of 8 bi-directional data pins (D7-D0), R/W (WR#), E (RD#), D/C, CS#. The E (RD#) input serves as data read latch signal (clock) when it is LOW provided that CS# is LOW. Display data or status register read is controlled by D/C signal.R/W (WR#) input serves as data write latch signal (clock) when it is HIGH and provided that CS# is LOW. Display data or command register write is controlled by D/C. Refer to Parallel Interface Timing Diagram of 8080-series microprocessor. Similar to 6800-series interface, a dummy read is also required before the first actual display data read.7.6 MPU Serial InterfaceThe serial interface consists of serial clock SCLK, serial data SDIN, D/C#, CS#. In SPI mode, D0 acts as SCLK, D1 acts as SDIN. For the unused data pins, D2 should be left open. D3 to D7, E and R/W pins can be connected to external ground.SDIN is shifted into an 8-bit shift register on every rising edge of SCLK in the order of D 7, D 6, ... D 0. D/C# is sampled on every eighth clock and the data byte in the shift register is written to the Display Data RAM or command register in the same clock.During data writing, an additional NOP command should be inserted before the CS# goes high (Refer to Figure 6.Figure 6 – Display data write procedure in SPI modeSCLK(D0)SDIN(D1)CS#D/CSDIN/SCLK7.7 Graphic Display Data RAM (GDDRAM)The GDDRAM is a bit mapped static RAM holding the bit pattern to be displayed. The size of the RAM is 132 x 64 bits. For mechanical flexibility, re-mapping on both Segment and Common outputs can be selected by software.For vertical scrolling of the display, an internal register storing display start line can be set to control the portion of the RAM data to be mapped to the display.7.8 Current Control and Voltage ControlThis block is used to derive the incoming power sources into different levels of internal use voltage and current. VCC and VDD are external power supplies. VREF is reference voltage, which is used to derive the driving voltage for segments and commons. IREF is a reference current source for segment current drivers.7.9 Segment Drivers / Common DriversSegment drivers deliver 132 current sources to drive OLED panel. The driving current can be adjusted from 0 to 300uA with 256 steps. Common drivers generate voltage scanning pulses.7.10 Area Colour DecoderPage 0 and Page 1 of the display are divided into 32 banks. Bank16 and Bank32 comprise of a display area of 12 x 8 pixels. Other banks (0~15 & 17~31) have matrices of 8 x 8 pixels. Each bank can be programmed to any one of the four colours (colour A, B, C, D). Detailed operation can be referred to the Command Table.7.11 D C-DC Voltage ConverterIt is a switching voltage generator circuit, designed for handheld applications. In SSD1303, internal DC-DC voltage converter accompanying with an external application circuit (shown in below figure) can generate a high voltage supply V CC from a low voltage supply input V DD. V CC is the voltage supply to the OLED driver block. Below application circuit is an example for the input voltage of 3V VDD to generate V CC of 12V @0mA ~ 20mA application.Figure 7 - DC-DC voltage converter circuitL1Remark:1. VSSB is tied to VSS on SSD1303T3 package.2. L1, D1, Q1, C5 should be grouped closed together on PCB layout.3. R1, R2, C1, C4 should be grouped closed together on PCB layout.4. The VCC output voltage level can be adjusted by R1and R2, the reference formula is:VCC = 1.2 x (R1+R2) / R2The value of (R1+R2) should be between 500k to 1M Ohm.Table 3 - Passive component selection:Components Typical Value Remark10µH 1AL1 Inductor,D1 Schottky diode 1A, 25V e.g. 1N5822, BAT54 [PhilipsSemiconductors]Q1 MOSFET N-FET with low R DS(on) and low Vth voltage.e.g. MGSF1N02LT1 [ON SEMI]R1, R2 Resistor 1%,1/10WR3 Resistor, 1.2Ω1%, 1/2W1µF 16VC1 Capacitor,C2 Capacitor, 6.8µF Low ESR, 25V1µF 16VC3 Capacitor,16V10nFC4 Capacitor,C5 Capacitor, 1 ~ 10 µF 16VC6 Capacitor, 0.1 ~ 1µF 16V16V15nFC7 Capacitor,8 COMMAND TABLETable 4 - Command table(D/C =0, R/W (WR#)=0, E (RD#)=1)Note: commands marked with “**” are compatible to SSD1301D/C Hex D7 D6 D5 D4 D3 D2 D1 D0Command Description0 0 0 0 0 X 3 X 2 X 1 X 000~0FSet Lower ColumnAddress **Set the lower nibble of the column address register using X 3X 2X 1X 0 as data bits. The initial display line register is reset to 0000b after POR.0 10~1F 0 0 0 1 X 3 X 2 X 1 X 0 Set Higher ColumnAddress ** Set the higher nibble of the column address register using X 3X 2X 1X 0 as data bits. The initial display line register is reset to 0000b after POR.261110 Horizontal scroll setupA[2:0] Set the number of column scroll per step 0 A[2:0] * * * * * A 2 A 1 A 0 Valid value: 001b, 010b, 011b, 100b 0 B[2:0] * * * * * B 2 B 1 B 0 B[2:0] Define start page address0 C[1:0] * * * * * * C 1 C 0 C[1:0] Set time interval between each scroll step in terms of frame frequency 0 D[2:0] * * * * * D 2 D 1 D 000b – 12 frame01b – 64 frames10b – 128 frames 11b – 256 framesD[2:0] Define end page addressSet the value of D[2:0] larger or equal to B[2:0]0 0 0 1 0 1 1 1 12FActivate horizontal scroll Start horizontal scrolling 0 0 0 1 0 1 1 1 02EDeactivate horizontal scrollStop horizontal scrolling0 40-7F 0 1 X 5 X 4 X 3 X 2 X 1 X 0 Set Display Start LineSet display TAM display start line register from 0-63 using X 5X 3X 2X 1X 0.Display start line register is reset to 000000 during POR0 81 1 0 0 0 0 0 0 10 A[7:0] A 7 A 6 A 5 A 4 A 3 A 2 A 1 A 0 Set Contrast Control Register **Double byte command to select 1 out of 256 contrast steps. Contrast increases as the value increases. (POR = 80h)0 82 1 0 0 0 0 0 1 00 A[7:0] A 7 A 6 A 5 A 4 A 3 A 2 A 1 A 0Brightness for color banksDouble byte command to select 1 out of 256brightness steps. Brightness increases as the value increases. (POR = 80h)0 91 1 0 0 1 0 0 01 Set current drive pulse width of Bank 0, Colour A, B and C.0 X[5:0] * * X 5 X 4 X 3 X 2 X 1 X 0 Bank 0: X[5:0] = 0… 63; for pulse width set to 1 ~ 64 clocks (POR = 110001b)0 A[5:0] * * A 5 A 4 A 3 A 2 A 1 A 0 Colour A: A[5:0] same as above (POR = 111111b) 0 B[5:0] * * B 5 B 4 B 3 B 2 B 1 B 0 Colour B: B[5:0] same as above (POR = 111111b) 0 C[5:0] * * C 5 C 4 C 3 C 2 C 1 C 0 Colour C: C[5:0] same as above (POR = 111111b)Set Look Up Table(LUT) for area colourNote: colour D pulse width is fixed at 64 clocks pulse .D/C Hex D7 D6 D5 D4 D3 D2 D1 D0Command Description921110 A[1:0] : 00, 01, 10, or 11 for Colour = A, B, C or D of bank 10 A[7:0] A 7 A 6 A 5 A 4 A 3 A 2 A 1 A 0A[3:2] : 00, 01, 10, or 11 for Colour = A, B, C or D of bank 20 B[7:0] B 7 B 6 B 5 B 4 B 3 B 2 B 1 B 0 : 0 C[7:0] C 7 C 6 C 5 C 4 C 3 C 2 C 1 C 0 :0 D[7:0] D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 D[7:6]: 00, 01, 10, or 11 for Colour = A, B, C or D of bank 16Set bank colour of forbank 1-16 (Page 0)931 0 0 1 0 0 1 1 A[1:0] : 00, 01, 10, or 11 for Colour = A, B, C or D of bank 170 A[7:0] A 7 A 6 A 5 A 4 A 3 A 2 A 1 A 0A[3:2] : 00, 01, 10, or 11 for Colour = A, B, C or D of bank 180 B[7:0] B 7 B 6 B 5 B 4 B 3 B 2 B 1 B 0 : 0 C[7:0] C 7 C 6 C 5 C 4 C 3 C 2 C 1 C 0 :0 D[7:0] D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 D[7:6]: 00, 01, 10, or 11 for Colour = A, B, C or D ofbank 32Set bank colour of forbank 17-32 (Page 1)X 0=0: column address 0 is mapped to SEG0 (POR)0 A0~ A1 1 0 1 0 0 0 0 X 0 Set Segment Re-map **X 0=1: column address 131 is mapped to SEG0X 0=0: normal display (POR) X 0=1: entire display ON 0 A4~A5 1 0 1 0 0 1 0 X 0 Set Entire DisplayON/OFF **X 0=0: normal display (POR) 0 A6~A7 1 0 1 0 0 1 1 X 0 Set Normal/InverseDisplay ** X 0=1: inverse display0 A8 1 0 1 0 1 0 0 0 0 A[5:0] * * A 5 A 4 A 3 A 2 A 1 A 0Set Multiplex Ratio ** The next command, A[5:0] determines multiplex ratio N from 16MUX-64MUX, POR= 64MUX 0 AA 1 0 1 0 1 0 1 0 NOP Reserved, do not use 0AB10 1 0 1 01 1NOPReserved, do not use0 0AD 1 1 0 0 1 0 0 0 1 1 1 0 0 1 1 X 0 Set DC-DC on/offX 0 : 1 DC-DC will be turned on when display on (POR)0 DC-DC is disableX 0=0: turns OFF OLED panel (POR)0 AE~AF 1 0 1 0 1 1 1 X 0 Set Display ON/OFF ** X 0=1: turns ON OLED panel0 B0~BF 1 0 1 1 X 3 X 2 X 1 X 0 Set Page Address ** Set GDDRAM Page Address (0~7) for read/write using X 3X 2X 1X 00 C0/C8 1 1 0 0 X 3 * * * Set COM Output ScanDirection ** X 3=0: normal mode (POR) Scan from COM 0 to COM [N –1]X 3=1: remapped mode. Scan from COM [N-1] to COM0Where N is the Multiplex ratio. 0 D0-D1 1 1 0 1 0 0 0 X 0 ReservedReserved, do not useD/C Hex D7 D6 D5 D4 D3 D2 D1 D0Command Description0 D3 1 1 0 1 0 0 1 1 Set vertical scroll by COM from 0-63.0 A[5:0] * * A 5 A 4 A 3 A 2 A 1 A 0Set Display Offset **The value is reset to 00H after POR.0 D5 1 1 0 1 0 1 0 1 Set Display ClockDivide Ratio/Oscillator Frequency A[3:0] Define the divide ratio of the display clocks (DCLK):0 A[7:0] A 7 A 6 A 5 A 4 A 3 A 2 A 1 A 0 Divide ratio= A[3:0] + 1, POR is 0000b (divide ratio = 1)A[7:4] Set the Oscillator Frequency. OscillatorFrequency increases with the value of A[7:4] and vice versa. POR is 0111b0 D8 1 1 0 1 1 0 0 0X 5X 4= 00 (POR) : mono mode0 0 0 X 5 X 4 0 X 2 0 X 0Set area colour mode on/off & low powerdisplay modeX 5X 4= 11 Area Colour enableX 2=0 and X 0=0: Normal (POR) power mode X 2=1 and X 0=1: Set low power save modeD911111 Set Pre-charge period** A[3:0] Phase 1 period of up to 15 dclk clocks[POR=2h]; 0 is invalid entry0 A[7:0] A 7 A 6 A 5 A 4 A 3 A 2 A 1 A 0A[7:4] Phase 2 period of up to 15 dclk clocks [POR=2h]; 0 is invalid entry0 DA 1 1 0 1 1 0 1 0 X 4=0, Sequential COM pin configuration0 0 0 0 X 4 0 0 1 0 (i.e. COM31, 30, 29….0 ; SEG0-132;COM31,32….62,63) X 4=1(POR), Alternative COM pin configurationSet COM pins hardware configuration(i.e. COM62,60,58,…2,0; SEG0-132; COM1,3,5…61,63)0 DB 1 1 0 1 1 0 1 1 Set VCOM Deselect Level A[6:0] 0000000 low VCOM deselect level (~ 0.43Vref) 0 A[6:0] * A 6 A 5 A 4 A 3 A 2 A 1 A 0 0110101 normal VCOM deselect level (~ 0.77*Vref(POR))1111111 high VCOM deselect level (equal Vref)0 E2 1 1 1 0 0 0 1 0 Reserved Reserved0 E3 1 1 1 0 0 0 1 1 NOP ** Command for No Operation0 F* 1 1 1 1 * * * * Reserved Reserved, do not useNote: Remark “*” stands for “Don’t Care”Table 5 - Read command table(D/C=0, R/W (WR#)=1, E (RD#)=1 for 6800 or E (RD#)=0 for 8080)Bit Pattern Command DescriptionD7D6D5D4D3D2D1D0Status Register Read * D7 : ReserveD6 : “1” for display OFF / “0” for display OND5 : ReserveD4 : ReserveD3 : ReserveD2 : ReserveD1 : ReserveD0 : ReserveNote: Patterns other than that given in Command Table are prohibited to enter to the chip as a command; otherwise, unexpected result will occur.8.1 Data Read / WriteTo read data from the GDDRAM, input HIGH to R/W (WR#) pin and D/C pin for 6800-series parallel mode, LOW to E (RD#) pin and HIGH to D/C# pin for 8080-series parallel mode. No data read is provided in serial mode operation.In normal data read mode, GDDRAM column address pointer will be increased by one automatically after each data read.Also, a dummy read is required before the first data read. See Figure 5 in Functional Block Description.To write data to the GDDRAM, input LOW to R/W (WR#) pin and HIGH to D/C pin for 6800-series parallel mode AND 8080-series parallel mode. For serial interface mode, it is always in write mode. GDDRAM column address pointer will be increased by one automatically after each data write.Table 6 - Address increment table (Automatic)D/C R/W (WR#) Comment Address IncrementCommand NoWrite0 0Status No0 1 ReadData Yes1 0 Write1 1 ReadData Yes*1*1. If read-data command is issued in read-modify-write mode, address increase is not applied.9 COMMAND DESCRIPTIONSSet Lower Column AddressThis command specifies the lower nibble of the 8-bit column address of the display data RAM. The column address will be incremented by each data access after it is pre-set by the MCU.Set Higher Column AddressThis command specifies the higher nibble of the 8-bit column address of the display data RAM. The column address will be incremented by each data access after it is pre-set by the MCU.Activate Horizontal ScrollStart motion of horizontal scrolling. This command should only be issued after Horizontal scroll setup parameters are defined.The following actions are prohibited after the horizontal scroll is activated1. RAM access (Data write or read)2. Changing horizontal scroll setup parametersThe SSD1303 horizontal scroll is designed for 128 columns scrolling only. 4 remaining columns are reserved for computation and should be left open.With column address 0 mapped to SEG0 (Segment remap setting = A0h), the 4 unused columns will be SEG128, SEG129, SEG130, SEG131.With column address 0 mapped to SEG131 (Segment remap setting = A1h), the 4 unused columns will be SEG0, SEG1, SEG2, SEG3.Figure 8 - Horizontal scroll directionREMAP SETTINGS E G 0S E G 1S E G 2S E G 3S E G 4S E G 5…… … S E G 126S E G 127S E G 128S E G 129S E G 130 S E G 131 A0 A B C D E F ! ! ! Y Z Invalid data A1 Invalid dataZY"""FEDCBAScroll directionDeactivate Horizontal ScrollStop motion of horizontal scrolling.Horizontal Scroll SetupThis command consists of 5 consecutive bytes to set up the horizontal scroll parameters. It determined the scrolling start page, end page and the scrolling speed.Before issuing this command, the horizontal scroll must be deactivated (2Eh). Otherwise, ram content may be corrupted.Set Display Start LineThis command is to set Display Start Line register to determine starting address of display RAM to be displayed by selecting a value from 0 to 63. With value equals to 0, D 0 of Page 0 is mapped to COM0. With value equals to 1, D 1 of Page0 is mapped to COM0. The display start line values of 0 to 63 are assigned to Page 0 to 7.Set Contrast Control RegisterThis command is to set Contrast Setting of the display. The chip has 256 contrast steps from 00 to FF. The segment output current increases as the contrast step value increases. See Figure 9.Figure 9 - Segment current vs Contrast settingSegment current vs Contrast setting50100150200250300350000F 1F 2F3F 4F 5F 6F 7F 8F 9F AF BF CF DF EF FFContrast settingCurrent (uA)Set Brightness for Color BanksThis command is to set Brightness Setting of the display for area colors banks (except bank 0). The chip has 256 brightness steps from 00 to FF. The segment output current increases as the brightness step value increases。
ssd 固态硬盘 结构原理
ssd 固态硬盘结构原理Solid state drives (SSDs) are a type of storage device that uses flash memory to store data. They are considered to be faster, more reliable, and more energy-efficient than traditional hard disk drives (HDDs). 固态硬盘(SSD)是一种使用闪存存储数据的存储设备。
相对传统硬盘驱动器(HDD)来说,SSD具有更快、更可靠和更节能的特点。
The structure of an SSD consists of controller, NAND flash memory, and a cache. The controller is the brain of the SSD, responsible for managing data storage and retrieval. NAND flash memory is where the data is actually stored, and the cache is used to temporarily store frequently accessed data for faster retrieval. 固态硬盘的结构由控制器、NAND闪存以及缓存组成。
控制器是SSD的大脑,负责管理数据存储和检索。
NAND闪存是实际存储数据的地方,而缓存用于临时存储频繁访问的数据,以加快检索速度。
One of the key advantages of SSDs is their speed. Because they have no moving parts, SSDs are able to access and retrieve data much faster than HDDs. This makes them ideal for tasks that require quick access to large amounts of data, such as gaming, video editing, andrunning multiple applications simultaneously. 固态硬盘的一个主要优势是速度。
SSD1963中文资料介绍
“set_pll_mn”命令0xe2配置锁相环频率。当配置好锁相环频率和启用的锁相环由 “set_pll”命令0xE0的0位,用 户仍要等待100ms,待锁相环锁定。然后,锁相环准备好了,可以通过“set_pll”命令0xE0的位1,配置为系统时 钟。
1、ssd1963是1215k字节帧缓冲显示控制器,支持864 x 480 x 24位图形内容。它也配有不同宽度并行接口总 线来接收图形数据和命令从单片机。它的显示界面,支持常见的内存更少的LCD驱动器, 每—像素的颜色深度 可达24比特。 2、特点 −建于1215k字节帧缓冲。支持864 x 480到24BPP显示 −支持8位串行RGB接口 −0,90,180的硬件旋转,270度 −硬件显示镜像 −硬件窗口 −可编程的亮度,对比度和饱和度控制 −动态背光控制(DBC)通过脉宽调制信号 单片机的连接 −8 / 9 / 16 / 18 / 24位单片机的接口 −撕裂效应信号 I / O的连接 4个GPIO引脚− 内置时钟发生器 深睡眠
3、订购须知,
4、结构图
5、引脚排列 5.1 80 balls TFBGA
5.2 pins LQFP
6、引脚描述
关键: O =输出 IO =双向(输入/输出) P =电源引脚 Hi - Z =高阻抗
注 (1)这些引脚映射使用信号名称通常用于每个面板类型,但是信号名称在各个面板制造商之间可能不同。
在ssd1963中,用户可配置的TE信号反映垂直非显示期或反映垂直和水平的非显示期。额外水平非显示期 的信息,单片机可以计算水平线的液晶显示器扫描更准确地控制刷新动作。通常,一个快速的单片机不需要水 平非显示周期。但缓慢的MCU将需要它确保帧缓存更新过程总是滞后于液晶显示控制器。
永华电子RGB测试板原理图(C8051F340+SSD1963)
R2 4.7k
S4 BACK
S3 -
S2 +
S1 OK
S5 RESET
VDDD VSS VSS VDDIO VSS VDDD D0 D1 D2 D3 D4 VDDIO VSS VDDD CLK VDDIO VSS VDDPLL VSSPLL VSS VDDD XTAL-IN VSS XTAL-OUT VDDD VSS VDDLCD LDATA23 LDATA22 LDATA21 LDATA20 VDDD
1
2
3
4
5
6
3.3V 3.3V SSDRESET 1.2V
3.3V D5 D6 D7 D8 D9 D10 1.2V
3.3V D11 D12 D13 D14 D15 1.2V
3.3V
MENU_CS MENU_RESET K1 K2 K3 K4 TP-CS TP-DCLK RD WR D8 D9
3.3V
3.3V LDEN
3.3V LD17 IO0 IO1 IO2 IO3 1.2V
Y1 10MHz
R10 120 XO 5V 3 U9 1117 VIN GND VOUT 2 2.8V C20 CAP
2.8V U5 GND 19 1 DIR D8 D9 D10 D11 D12 D13 D14 D15 2 3 4 5 6 7 8 9 10 B OE DIR A1 A2 A3 A4 A5 A6 A7 A8 GND MC74HC245AN VCC B1 B2 B3 B4 B5 B6 B7 B8 2.8V 20 18 17 16 15 14 13 12 11 DB8 DB9 DB10 DB11 DB12 DB13 DB14 DB15 U4 GND 19 1 DIR D0 D1 D2 D3 D4 D5 D6 D7 2 3 4 5 6 7 8 9 10 OE DIR A1 A2 A3 A4 A5 A6 A7 A8 GND MC74HC245AN VCC B1 B2 B3 B4 B5 B6 B7 B8 2.8V 20 18 17 16 15 14 13 12 11 DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 U6 GND 19 1 LCD-CS RS WR RD SSDRESET LCD-CS1 2 3 4 5 6 7 8 9 10 OE DIR A1 A2 A3 A4 A5 A6 A7 A8 GND MC74HC245AN VCC B1 B2 B3 B4 B5 B6 B7 B8 20 18 17 16 15 14 13 12 11 C25 CAP
一款基于STM32微处理器的发射机掉功率计时器设计李卓庞毅赵桂同黄文樑裴开乾农海智何民兆
一款基于STM32微处理器的发射机掉功率计时器设计李卓庞毅赵桂同黄文樑裴开乾农海智何民兆发布时间:2021-08-30T06:19:26.850Z 来源:《中国科技人才》2021年第13期作者:李卓庞毅赵桂同黄文樑裴开乾农海智何民兆[导读] 在广播电视发射台站的工作中保障安全播出是重中之重,当广播电视发射机发生掉功率故障时能在规定时间段内尽快恢复正常播出是保障安全播出的重要措施。
广西广播电视技术中心钦州分中心摘要:在广播电视发射台站的工作中保障安全播出是重中之重,当广播电视发射机发生掉功率故障时能在规定时间段内尽快恢复正常播出是保障安全播出的重要措施。
本文为实现广播电视发射机掉功率计时而设计的一款基于嵌入式技术的计时器。
掉功率计时器由基于AD8318的功率采集监测、基于STM32的计时功能实现、7寸LCD电容触摸屏、SD卡记录储存四部分组成,实现了一种具有实际应用价值的广电嵌入式应用。
关键词:广播电视发射机,功率监测,计时器,STM32嵌入式,电容触摸屏,SD卡储存0 概述本文将从基于AD8318的功率采集监测硬件设计、基于STM32的计时功能实现、基于7寸TFT LCD电容触摸屏的计时显示及触摸操控设计、基于SD卡应用的记录存储、计时器系统软件设计等几部分来详细介绍该发射机掉功率计时器。
系统的主控芯片采用32位的STM32F103ZET6,该处理器具有较强的运算能力,具有丰富的硬件外设,例如串口、SPI接口、IIC接口、ADC接口、SDIO接口、FSMC接口等以及实时时钟RTC、高精度通用定时器等内部功能,满足本次设计要求。
本设计的系统框图如图1所示。
图2:功率检测模块原理图本计时器具有时间表设置功能,使用STM32内部的RTC功能实现RTC时钟功能,使得系统具备时间表设置功能,根据每套广播电视节目的播出时间设置时间表,确保发射机在开机时段内掉功率计时器能够实时监测发射机的功率状态。
当计时器监测到发射机发生掉功率故障时会触发声光告警,方便台站值班人员能快速发现故障,及时处理问题,保障安全播出。