本文整理汇总了C++中LCD_Write函数的典型用法代码示例。如果您正苦于以下问题:C++ LCD_Write函数的具体用法?C++ LCD_Write怎么用?C++ LCD_Write使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LCD_Write函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: LCD_Init
/*----------------------------------------------------------*\
| PCD5544 Initialize |
\*----------------------------------------------------------*/
void LCD_Init(void) {
//PINSEL0 &= 0xEFFFFFFF; // 设置SPI管脚连接
PINSEL0 |= 0x20000000; // 设置SPI管脚连接
//PINSEL1 &= 0xFFFFFCFF; // 设置SPI管脚连接
PINSEL1 |= 0x00000100; // 设置SPI管脚连接
IODIR |= (1<<21)|(1<<13)|(1<<19);
IOCLR = (1<<19);
//SSPCCR = 0x08; // 设置SPI时钟分频
//SSPCR = 0x38; // 设置SPI接口模式,MSTR=1,CPOL=1,CPHA=1,LSBF=0
SSP_Init();
IOSET=(1<<19);
IOCLR=(1<<21);
IOCLR=(1<<13); //准备写指令
/*
LCD_Write(32+1); //进入扩展指令
LCD_Write(128+38); //设置Vop,相当于亮度
LCD_Write(4+3); //设置温度系数,相当于对比度
LCD_Write(16 +3); // 设置偏置,这句要与不要的实际效果好像一样
LCD_Write(32+0); //进入基本指令
LCD_Write(12); //使能芯片活动/垂直寻址
*/
LCD_Write(0x21);//初始化Lcd,功能设定使用扩充指令
LCD_Write(0xd0);//设定液晶偏置电压
LCD_Write(0x20);//使用基本指令
LCD_Write(0x0C);//设定显示模式,正常显示
IOSET=(1<<21);
Delay(1);
}
开发者ID:superjing,项目名称:Embedded,代码行数:35,代码来源:PCD5544.c
示例2: LCD_Hundler
///----------------------------------------------------------
void LCD_Hundler(void){
switch(Segment){
case 1 : PORTC |= 0x07;
LCD_Write(data_seg_1);
LCD_D_1 = 0;
KeyUpHundler();
///----------------------------------------------
break;
case 2 : PORTC |= 0x07;
LCD_Write(data_seg_2);
LCD_D_2 = 0;
KeyDownHundler();
break;
case 3 : PORTC |= 0x07;
LCD_Write(data_seg_3);
LCD_D_3 = 0;
KeySelectHundler();
break;
case 4 : PORTC |= 0x07;
LED_Write(0x00);
LED_ON_OFF = 0;
KeyStartStopHundler();
LED_ON_OFF = 1;
LED_Write(LED_DATA);
break;
case 5 : LED_ON_OFF = 0;
break;
case 6 : PORTC |= 0x07;
LED_ON_OFF = 1;
break;
}
Segment++;
if(Segment > 6) Segment = 1;
return;
}
开发者ID:AlexEvil,项目名称:MagneticControl,代码行数:36,代码来源:lcdledkey.c
示例3: LCD_Init
//*******************************************
//*函数名称:void LCD_Init(void) *
//*函数功能:并行初始化LCD *
//*形式参数:无 *
//*形参说明:无 *
//*返回参数:无 *
//*使用说明:无 *
//*******************************************
void LCD_Init(void)
{
LCD_CTRL_OUT();
#if PARALLEL == 1
#ifdef LCD_RST
LCD_RST_LOW();
_delay_ms(10);
LCD_RST_HIGH(); //RST = 1; //复位后拉高,停止复位
#endif
#ifdef LCD_PSB
LCD_PSB_HIGH(); //PSB = 1; //选择并行传输模式
#endif
#else
#ifdef LCD_RST
LCD_RST_LOW();
_delay_ms(100);
LCD_RST_HIGH(); //RST = 1; //复位后拉高,停止复位
#endif
#ifdef LCD_PSB
LCD_PSB_LOW(); //PSB = 0; //选择串并行传输模式
#endif
#endif //#if PARALLEL == 1
LCD_Write(LCD_COMMAND,LCD_BASIC_FUNCTION); //基本指令动作
LCD_Write(LCD_COMMAND,LCD_CLEAR_SCREEN); //清屏,地址指针指向00H
LCD_Write(LCD_COMMAND,0x06); //光标的移动方向
LCD_Write(LCD_COMMAND,0x0C); //开显示,关游标
}
开发者ID:haoozi,项目名称:SIM900A-py,代码行数:38,代码来源:ST7920.c
示例4: LCD_Init
static void LCD_Init (void)
{
LCD_E_IO = 0;
LCD_RD_WR_IO = 0;
LCD_DATA_TRIS = 0;
LCD_RD_WR_TRIS = 0;
LCD_RS_TRIS = 0;
LCD_E_TRIS = 0;
BSP_Dly(40000);
LCD_RS_IO = 0;
LCD_DATA_IO = 0x03;
BSP_Dly(1);
LCD_E_IO = 1;
BSP_Dly(1);
LCD_E_IO = 0;
BSP_Dly(5);
LCD_Write(0, 0x38);
BSP_Dly(5);
LCD_Write(0, 0x06);
BSP_Dly(5);
LCD_Write(0, 0x0C);
BSP_Dly(5);
LCD_Write(0, 0x01);
BSP_Dly(2);
}
开发者ID:Vanganesha,项目名称:oufffteam,代码行数:25,代码来源:bsp.c
示例5: EnviaHistorico
void EnviaHistorico(){
LCD_Clear();
LCD_Write(" ENVIA ", 1);
LCD_Write(" HISTORICO", 2);
B16 cal;
uint16_t mem_mes = MES1;
uint8_t day[3];
uint8_t hour[3];
DADOMEDIDA hist;
int ind_mes;
for(ind_mes = 0; ind_mes < 6; ind_mes++) {
mem_mes = mem_mes + (ind_mes*0x1173);
cal = GetMesAno(mem_mes);
int ler;
for(ler = 0; ler < 744; ler++) {
hist = LeSequencia((ind_mes*0x1173), ler);
day[0] = hist.datetime[0];
day[1] = cal.byte[1];
day[2] = cal.byte[0];
hour[0] = hist.datetime[1];
hour[1] = hist.datetime[2];
hour[2] = hist.datetime[3];
Bluetooth_EnviaDados(hist.med.word, day, hour);
}
}
Delay(1000);
LCD_Clear();
}
开发者ID:rgrosko,项目名称:TCCPos,代码行数:31,代码来源:main.c
示例6: LCD_print
void LCD_print(uint8_t num_bytes, uint8_t *array_name)
{
uint8_t idata index,character;
if(num_bytes==0)
{
index=0;
character=*(array_name+index);
while(character!=0)
{
LCD_Write(DDRAM,character);
DELAY_100us_T1(1);
index++;
character=*(array_name+index);
}
}
else
{
for(index=0;index<num_bytes;index++)
{
character=*(array_name+index);
LCD_Write(DDRAM,character);
DELAY_100us_T1(1);
}
}
}
开发者ID:XudongJin,项目名称:Mp3_C51,代码行数:25,代码来源:LCD_routines.c
示例7: main
void main(void)
{
uint8_t error_flag;
LED3=0;
UART_Init();
LCD_Init();
SPI_master_init(400000); // Set clock rate to that speed in Hz
error_flag = SDcard_init();
while(1)
{
LED1 = 0;
LED4 = 0;
if(error_flag != NO_ERRORS)
{
LED4 = 0;
}
else
{
LED4 = 1;
}
delay_ms(1000);
LED1 = 1;
LED4 = 1;
LCD_Write(COMMAND, LINE1);
LCD_Print(16, "Coltons and Matt");
LCD_Write(COMMAND, LINE2);
LCD_Print(15, "hews LCD Works!");
delay_ms(3000);
LCD_Clear();
}
}
开发者ID:MatthewWedewer,项目名称:5160,代码行数:35,代码来源:main.c
示例8: main
void main(void)
{
initLCD();
while(1)
{
LCD_goto(2,0);
LCD_num(hour);
LCD_goto(2,2);
LCD_Write(':',1);delay_ms(100);
LCD_goto(2,3);
LCD_num(min);
LCD_goto(2,5);
LCD_Write(':',1);delay_ms(100);
LCD_goto(2,6);
LCD_num(sec);
sec++;
delay_ms(500);
if(sec==10){
sec=00;
min++;
if (min==10)
{min=0;
hour++;
}
}
}
}
开发者ID:manoja328,项目名称:myavr,代码行数:35,代码来源:lcd.c
示例9: ImprimeStatusAgua
void ImprimeStatusAgua() {
if (aberta == 0x01)
LCD_Write("AGUA OK", 3);
if (aberta == 0x00)
LCD_Write("FALTA DE AGUA", 3);
}
开发者ID:rgrosko,项目名称:TCCPos,代码行数:7,代码来源:main.c
示例10: LCD_GotoXY
/*----------------------------------------------------------*\
| PCD5544 goto x,y |
\*----------------------------------------------------------*/
void LCD_GotoXY(unsigned char x, unsigned char y) {
IOCLR = (1<<13); //准备写指令
IOCLR = (1<<21);
LCD_Write(128+x);
LCD_Write(64+y);
IOSET=(1<<21);
Delay(1);
}
开发者ID:superjing,项目名称:Embedded,代码行数:11,代码来源:PCD5544.c
示例11: LCD_SyncTransfer
/**
* Data transfer with the display is synchronized by sending a zero
* byte 4 times consecutively
* You should send this from time to time to keep the data
* transfer in sync
*/
void LCD_SyncTransfer(void) {
pause(10);
LCD_Write(0x0000, 0x0000);
LCD_Write(0x0000, 0x0000);
LCD_Write(0x0000, 0x0000);
LCD_Write(0x0000, 0x0000);
pause(15);
}
开发者ID:cavehamster,项目名称:DefCon23,代码行数:14,代码来源:LCD.c
示例12: LCD_DisplayStrings_WithAddress
//*********************************************************************************
//*函数名称:void LCD_DisplayStrings_WithAddress(unsigned char ucAdd,unsigned char code *p) *
//*函数功能:在(文本区)ucAdd指定的位置显示一串字符(或是汉字或是ASCII或是两者混合) *
//*形式参数:unsigned char ucAdd,unsigned char code *p *
//*形参说明:指定的位置,要显示的字符串 *
//*地址必须是:80H~87H,90H~97H,88H~8FH,98H~8FH *
//*返回参数:无 *
//*使用说明:使用之前要初始化液晶 *
//*********************************************************************************
void LCD_DisplayStrings_WithAddress(unsigned char ucAdd,const char *p)
{
unsigned char length;
length = strlen(p);
LCD_Write(LCD_COMMAND,LCD_BASIC_FUNCTION); //基本指令动作
LCD_DDRAM_AddressSet(ucAdd);
for( ; length ; length -- )
LCD_Write(LCD_DATA, *(p++));
}
开发者ID:haoozi,项目名称:SIM900A-py,代码行数:18,代码来源:ST7920.c
示例13: LCD_goto
void LCD_goto(unsigned char row,unsigned char column)
{
if(row==1){
LCD_Write(0x80+column,0); //
}
else if(row==2){
LCD_Write(0xC0+column,0);
}
}
开发者ID:manoja328,项目名称:myavr,代码行数:9,代码来源:lcd.c
示例14: LCD_Character
void LCD_Character(uint8 character)
{
uint16 index1;
LCD_Write(LCD_DATA, EMPTY_COLUMN_DATA);
for (index1 = 0 ; index1 < FONT_WIDTH ; index1++)
LCD_Write(LCD_DATA, Fonts[character - OFFSET_FOR_ASCII][index1]);
LCD_Write(LCD_DATA, EMPTY_COLUMN_DATA);
}
开发者ID:jeppestaerk,项目名称:E3PRJ3-Gruppe1,代码行数:10,代码来源:Nokia5110LCD.c
示例15: ResetMemoria
void ResetMemoria() {
LCD_Clear();
LCD_Write(" RESET", 1);
LCD_Write(" MEMORIA", 2);
ResetMem();
LCD_Clear();
}
开发者ID:rgrosko,项目名称:TCCPos,代码行数:10,代码来源:main.c
示例16: initLCD
void initLCD(void)
{
//PORT configuration
TRISB = 0x00;
TRISD=0x00;
//////////////////
LCD_Write(0x38,0);
delay_ms(1);
LCD_Write(0x0c,0); //dispaly on , cursor blinking
delay_ms(1);
LCD_Write(0x01,0); // clear dispaly screen
delay_ms(1);
LCD_Write(0x06,0);
// LCD_Write(0x0F,0); //blinking cursor
delay_ms(1);
LCD_clear();
LCD_goto(1,0);
LCD_Write('C',1);delay_ms(100);LCD_Write('l',1);delay_ms(100);
LCD_Write('o',1);delay_ms(100);LCD_Write('c',1);delay_ms(100);
LCD_Write('k',1);delay_ms(100);
}
开发者ID:manoja328,项目名称:myavr,代码行数:29,代码来源:lcd.c
示例17: FechaValvula
void FechaValvula() {
LCD_Clear();
CloseValve();
LCD_Write(" FECHA VALVULA", 0);
LCD_Write("--------------------", 2);
Delay(1000);
LCD_Clear();
}
开发者ID:rgrosko,项目名称:TCCPos,代码行数:11,代码来源:main.c
示例18: LCD_Init
bool LCD_Init ( LCD display ) {
lcd = display;
/*
* TODO:
* The function should clear only the appropriate bits, not the whole PORT
*/
if ( lcd.PORT == &PORTA ) {
TRISA = 0x00;
}
else if ( lcd.PORT == &PORTB ) {
TRISB = 0x00;
}
else if ( lcd.PORT == &PORTC ) {
TRISC = 0x00;
}
#if defined(_16F877) || defined(_16F877A)
else if ( lcd.PORT == &PORTD ) {
TRISD = 0x00;
}
else if ( lcd.PORT == &PORTE ) {
TRISE = 0x00;
}
#endif
else {
return false;
}
// Give some time to the LCD to start function properly
__delay_ms(20);
// Send reset signal to the LCD
LCD_Write(0x03);
__delay_ms(5);
LCD_Write(0x03);
__delay_ms(16);
LCD_Write(0x03);
// Specify the data lenght to 4 bits
LCD_Write(0x02);
// Set interface data length to 8 bits, number of display lines to 2 and font to 5x8 dots
LCD_Cmd(0x28);
// Set cursor to move from left to right
LCD_Cmd(0x06);
LCD_Display(true, false, false); // Turn on display and set cursor off
LCD_Clear();
return true;
}
开发者ID:sfrias,项目名称:pic-atx-psu-controller.X,代码行数:54,代码来源:lcd.c
示例19: AbreValvula
void AbreValvula() {
LCD_Clear();
OpenValve();
LCD_Write(" ABRE VALVULA", 0);
LCD_Write("---------/ /--------", 2);
Delay(1000);
LCD_Clear();
}
开发者ID:rgrosko,项目名称:TCCPos,代码行数:11,代码来源:main.c
示例20: LCD_Test
void LCD_Test(void)
{
u8 i,j;
for(i=0;i<32;i++)
{
LCD_Write(0,0x80+i);LCD_Write(0,0x80);
for(j=0;j<16;j++)
LCD_Write(1,0xff);
}
}
开发者ID:WXWXwqz,项目名称:crriculum-design,代码行数:11,代码来源:lcd12864.c
注:本文中的LCD_Write函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论