当前位置: 首页>>代码示例>>C++>>正文


C++ LCD_Write函数代码示例

本文整理汇总了C++中LCD_Write函数的典型用法代码示例。如果您正苦于以下问题:C++ LCD_Write函数的具体用法?C++ LCD_Write怎么用?C++ LCD_Write使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了LCD_Write函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的LCD_Write函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。