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


C++ LCD_WrCmd函数代码示例

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


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

示例1: SetStartColumn

void SetStartColumn(unsigned char d)
{
	LCD_WrCmd(0x00+d%16);   // Set Lower Column Start Address for Page Addressing Mode
						    // Default => 0x00
	LCD_WrCmd(0x10+d/16);   // Set Higher Column Start Address for Page Addressing Mode
						    // Default => 0x10
}
开发者ID:Beck-Sisyphus,项目名称:RM2016_INFANTRY_OPEN_SOURCEV.1.6.4,代码行数:7,代码来源:oled.c

示例2: DisplayCGRAM

void DisplayCGRAM(unsigned char cx,unsigned char cy)
{
	
	uchar *p,i,s,page;
	uchar port;
	cy--;
	
	p=lbatStateGraph;
	if(cx<4)
	{
		port=1;
		s=cx<<4;
	}
	else
	{
		port=2;
		s=((cx-4)<<4);
			
	}
	
	for(page=0;page<2;page++)
	{
		LCD_WrCmd(port,0xb8+cy*2+page);
		delayus(100);
		LCD_WrCmd(port,0x40+s);
		delayus(100);
		for(i=0;i<16;i++)
		{
			LCD_WrDat(port,*p);
			delayus(10);
			p++;
		}
	}
} 
开发者ID:vvdeng,项目名称:MinerLampSystem,代码行数:34,代码来源:lcd12864.c

示例3: lcd_disp_sz_SingleBytechar

void lcd_disp_sz_SingleBytechar(uchar cy,uchar cx,uchar* chr)
{
	uchar *p,i,s,page;
	uchar port;

	getBytesFormASCIIs(chr);
	p=chrBuf;
	if(cx<8)
	{
		port=1;
		s=cx<<3;
	}
	else
	{
		port=2;
		s=((cx-8)<<3);
			
	}
	
	for(page=0;page<2;page++)
	{
		LCD_WrCmd(port,0xb8+cy*2+page);
		delayus(100);
		LCD_WrCmd(port,0x40+s);
		delayus(100);
		for(i=0;i<8;i++)
		{
			LCD_WrDat(port,*p);
			delayus(10);
			p++;
		}
	}
}
开发者ID:vvdeng,项目名称:MinerLampSystem,代码行数:33,代码来源:lcd12864.c

示例4: lcd_disp_sz_char_24_original_x

void lcd_disp_sz_char_24_original_x(uchar x,uchar cy,uchar* chr,uchar* buf)
{
	uchar *p,i,s,page;
	uchar port;
	if(chr!=0)
	{
		get24x24BytesFormGB2312s(chr,buf);
	}
	p=buf;
	if(x<64)
	{
		port=1;
		s=x;
	}
	else
	{
		port=2;
		s=x-64;
			
	}
	
	for(page=0;page<3;page++)
	{
		LCD_WrCmd(port,0xb8+cy*3+page);
		delayUs(100);
		LCD_WrCmd(port,0x40+s);
		delayUs(100);
		for(i=0;i<24;i++)
		{
			LCD_WrDat(port,*p);
			delayUs(10);
			p++;
		}
	}
}
开发者ID:vvdeng,项目名称:MinerLampDerbySystem,代码行数:35,代码来源:lcd12864.c

示例5: Set_Common_Config

void Set_Common_Config(unsigned char d)
{
	LCD_WrCmd(0xDA);	//Set COM Pins Hardware Configuration
	LCD_WrCmd(0x02|d);	//Default => 0x12 (0x10)
						//Alternative COM Pin Configuration
						//Disable COM Left/Right Re-Map
}
开发者ID:Beck-Sisyphus,项目名称:RM2016_INFANTRY_OPEN_SOURCEV.1.6.4,代码行数:7,代码来源:oled.c

示例6: lcd_disp_sz_char_24

void lcd_disp_sz_char_24(uchar cx,uchar cy,uchar* chr,uchar* buf)
{
	uchar *p,i,s,page;
	uchar port;
	if(chr!=0)
	{
		get24x24BytesFormGB2312s(chr,buf);
	}
	p=chrBuf_24;
	if(cx<2)
	{
		port=1;
		s=cx*24;
	}
	else
	{
		port=2;
		s=((cx-2)*24);
			
	}
	
	for(page=0;page<3;page++)
	{
		LCD_WrCmd(port,0xb8+cy*3+page);
		delayUs(100);
		LCD_WrCmd(port,0x40+s);
		delayUs(100);
		for(i=0;i<24;i++)
		{
			LCD_WrDat(port,*p);
			delayUs(10);
			p++;
		}
	}
}
开发者ID:vvdeng,项目名称:MinerLampDerbySystem,代码行数:35,代码来源:lcd12864.c

示例7: Set_Display_Clock

void Set_Display_Clock(unsigned char d)
{
	LCD_WrCmd(0xD5);	//Set Display Clock Divide Ratio / Oscillator Frequency
	LCD_WrCmd(d);	    //Default => 0x80
						//D[3:0] => Display Clock Divider
						//D[7:4] => Oscillator Frequency
}
开发者ID:Beck-Sisyphus,项目名称:RM2016_INFANTRY_OPEN_SOURCEV.1.6.4,代码行数:7,代码来源:oled.c

示例8: Set_Precharge_Period

void Set_Precharge_Period(unsigned char d)
{
	LCD_WrCmd(0xD9);	//Set Pre-Charge Period
	LCD_WrCmd(d);		//Default => 0x22 (2 Display Clocks [Phase 2] / 2 Display Clocks [Phase 1])
						//D[3:0] => Phase 1 Period in 1~15 Display Clocks
						//D[7:4] => Phase 2 Period in 1~15 Display Clocks
}
开发者ID:Beck-Sisyphus,项目名称:RM2016_INFANTRY_OPEN_SOURCEV.1.6.4,代码行数:7,代码来源:oled.c

示例9: lcd_disp_sz_char

void lcd_disp_sz_char(uchar cy,uchar cx,uchar* chr)
{
	uchar *p,i,s,page;
	uchar port;

	getBytesFormGB2312s(chr);
	p=chrBuf;
	if(cx<4)
	{
		port=1;
		s=cx<<4;
	}
	else
	{
		port=2;
		s=((cx-4)<<4);
			
	}
	
	for(page=0;page<2;page++)
	{
		LCD_WrCmd(port,0xb8+cy*2+page);
		delayus(100);
		LCD_WrCmd(port,0x40+s);
		delayus(100);
		for(i=0;i<16;i++)
		{
			LCD_WrDat(port,*p);
			delayus(10);
			p++;
		}
	}
}
开发者ID:vvdeng,项目名称:MinerLampSystem,代码行数:33,代码来源:lcd12864.c

示例10: LCD_PutChar

void LCD_PutChar(unsigned char cx,unsigned char cy,unsigned char  chr){
	uchar *p,i,s,page;
	uchar port;
	chr=0;//消除warning 该变量无用,仅为兼容之前接口
	cy--;

	p=arrow16x16;
	if(cx<4)
	{
		port=1;
		s=cx<<4;
	}
	else
	{
		port=2;
		s=((cx-4)<<4);
			
	}
	
	for(page=0;page<2;page++)
	{
		LCD_WrCmd(port,0xb8+cy*2+page);
		delayus(100);
		LCD_WrCmd(port,0x40+s);
		delayus(100);
		for(i=0;i<16;i++)
		{
			LCD_WrDat(port,*p);
			delayus(10);
			p++;
		}
	}
}
开发者ID:vvdeng,项目名称:MinerLampSystem,代码行数:33,代码来源:lcd12864.c

示例11: Set_Charge_Pump

void Set_Charge_Pump(unsigned char d)
{
	LCD_WrCmd(0x8D);	//Set Charge Pump
	LCD_WrCmd(0x10|d);	//Default => 0x10
						//0x10 (0x00) => Disable Charge Pump
						//0x14 (0x04) => Enable Charge Pump
}
开发者ID:Beck-Sisyphus,项目名称:RM2016_INFANTRY_OPEN_SOURCEV.1.6.4,代码行数:7,代码来源:oled.c

示例12: SetAddressingMode

void SetAddressingMode(unsigned char d)
{
	LCD_WrCmd(0x20);	// Set Memory Addressing Mode
	LCD_WrCmd(d);	    // Default => 0x02
						// 0x00 => Horizontal Addressing Mode
						// 0x01 => Vertical Addressing Mode
						// 0x02 => Page Addressing Mode
}
开发者ID:Beck-Sisyphus,项目名称:RM2016_INFANTRY_OPEN_SOURCEV.1.6.4,代码行数:8,代码来源:oled.c

示例13: LCD_FillLine

/***************功能描述:行填充, y为页范围0~7****************/
void LCD_FillLine(unsigned char y,unsigned char ch)
{
    unsigned char x;
    LCD_WrCmd(0xb0+y);
    LCD_WrCmd(0x01);
    LCD_WrCmd(0x10);
    for(x=0; x<X_WIDTH; x++)
        LCD_WrDat(ch);
}
开发者ID:JCJohnbee,项目名称:Johnbee_Repository,代码行数:10,代码来源:hal_lcd.c

示例14: LCD_CLS

/*********************LCD复位************************************/
void LCD_CLS(void)
{
    unsigned char y,x;
    for(y=0; y<8; y++)
    {
        LCD_WrCmd(0xb0+y);
        LCD_WrCmd(0x01);
        LCD_WrCmd(0x10);
        for(x=0; x<X_WIDTH; x++)
            LCD_WrDat(0);
    }
}
开发者ID:JCJohnbee,项目名称:Johnbee_Repository,代码行数:13,代码来源:hal_lcd.c

示例15: OLED_Clear

void OLED_Clear(void)
{
	unsigned char y,x;	
	for(y=0;y<8;y++)
	{
		LCD_WrCmd(0xb0+y);
		LCD_WrCmd(0x01);
		LCD_WrCmd(0x10); 
		for(x=0;x<128;x++)
			LCD_WrDat(0);
	}
}
开发者ID:Beck-Sisyphus,项目名称:RM2016_INFANTRY_OPEN_SOURCEV.1.6.4,代码行数:12,代码来源:oled.c


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