• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ LCDsendCommand函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: LCDinit

void LCDinit(void)//Initializes LCD
{
	_delay_ms(15);
	LDP=0x00;
	LCP=0x00;
	LDDR|=1<<LCD_D7|1<<LCD_D6|1<<LCD_D5|1<<LCD_D4;
	LCDR|=1<<LCD_E|1<<LCD_RW|1<<LCD_RS;
   //---------one------
	LDP=0<<LCD_D7|0<<LCD_D6|1<<LCD_D5|1<<LCD_D4; //4 bit mode
	LCP|=1<<LCD_E|0<<LCD_RW|0<<LCD_RS;		
	_delay_ms(1);
	LCP&=~(1<<LCD_E);
	_delay_ms(1);
	//-----------two-----------
	LDP=0<<LCD_D7|0<<LCD_D6|1<<LCD_D5|1<<LCD_D4; //4 bit mode
	LCP|=1<<LCD_E|0<<LCD_RW|0<<LCD_RS;		
	_delay_ms(1);
	LCP&=~(1<<LCD_E);
	_delay_ms(1);
	//-------three-------------
	LDP=0<<LCD_D7|0<<LCD_D6|1<<LCD_D5|0<<LCD_D4; //4 bit mode
	LCP|=1<<LCD_E|0<<LCD_RW|0<<LCD_RS;		
	_delay_ms(1);
	LCP&=~(1<<LCD_E);
	_delay_ms(1);
	//--------4 bit--dual line---------------
	LCDsendCommand(0b00101000);
   //-----increment address, cursor shift------
	LCDsendCommand(0b00001110);


}			
开发者ID:toAtulArora,项目名称:IISER_repo,代码行数:32,代码来源:lcd_lib.c


示例2: LCDinit

void LCDinit(void)	//Initializes LCD 
{
	_delay_ms(15);
		
	//zero to data pins
	LCDMix_4Bit(0b00000000);

	//zero to control pins
	LDPRS &= ~(1 << LCD_RS);
	LDPRW &= ~(1 << LCD_RW);
	LDPE &= ~(1 << LCD_E);
	
	//set data direction
	LDDD4 |= 1 << LCD_D4;
	LDDD5 |= 1 << LCD_D5;
	LDDD6 |= 1 << LCD_D6;
	LDDD7 |= 1 << LCD_D7;
		
	//control direction pins
	LDDRS |= 1 << LCD_RS;
	LDDRW |= 1 << LCD_RW;
	LDDE |= 1 << LCD_E;
	
	//---------one------
	LCDMix_4Bit(0b00110000);
	LDPE |= 1 << LCD_E;
	_delay_ms(1);
	
	LDPE &= ~(1 << LCD_E);
	_delay_ms(1);
		
	//-----------two-----------
	LCDMix_4Bit(0b00110000);
	LDPE |= 1 << LCD_E;
	_delay_ms(1);
	
	LDPE &= ~(1 << LCD_E);
	_delay_ms(1);
	
	//-------three-------------
	LCDMix_4Bit(0b00100000);
	LDPE |= 1 << LCD_E;		
	_delay_ms(1);
		
	LDPE &= ~(1 << LCD_E);
	_delay_ms(1);
		
	//--------4 bit--dual line---------------
	LCDsendCommand(0b00101000);
	
	//-----increment address, invisible cursor shift------
	LCDsendCommand(0b00001100);
}
开发者ID:nazmul21,项目名称:MEGA-AVR,代码行数:53,代码来源:lcd_lib.c


示例3: LCDcursorRight

//Moves cursor by n poisitions left
void LCDcursorRight(uint8_t n)
{
	for (uint8_t i=0;i<n;i++)
	{
		LCDsendCommand(0x14);
	}
}
开发者ID:ekapujiw2002,项目名称:ex4-avr-gcc-library,代码行数:8,代码来源:lcd_mixed.c.ori.c


示例4: LCDcursorLeft

void LCDcursorLeft(uint8_t n)	//Moves cursor by n positions left
{
	for(uint8_t i = 0; i < n; i++)
	{
		LCDsendCommand(0x10);
	}
}
开发者ID:nazmul21,项目名称:MEGA-AVR,代码行数:7,代码来源:lcd_lib.c


示例5: LCDGotoXY

void LCDGotoXY(uint8_t x, uint8_t y)	//Cursor to X Y position
{
    register uint8_t DDRAMAddr;
    // remap lines into proper order
    switch(y)
    {
    case 0:
        DDRAMAddr = LCD_LINE0_DDRAMADDR+x;
        break;
    case 1:
        DDRAMAddr = LCD_LINE1_DDRAMADDR+x;
        break;
    case 2:
        DDRAMAddr = LCD_LINE2_DDRAMADDR+x;
        break;
    case 3:
        DDRAMAddr = LCD_LINE3_DDRAMADDR+x;
        break;
    default:
        DDRAMAddr = LCD_LINE0_DDRAMADDR+x;
    }
    // set data address
    LCDsendCommand(1<<LCD_DDRAM | DDRAMAddr);

}
开发者ID:enerds,项目名称:Cambot,代码行数:25,代码来源:lcd_lib.c


示例6: LCDshiftRight

void LCDshiftRight(uint8_t n)	//Scrol n of characters Left
{
	for (uint8_t i=0;i<n;i++)
	{
		LCDsendCommand(0x18);
	}
}
开发者ID:toAtulArora,项目名称:IISER_repo,代码行数:7,代码来源:lcd_lib.c


示例7: LCDcursorRight

void LCDcursorRight(uint8_t n)	//Moves cursor by n poisitions left
{
	for (uint8_t i=0;i<n;i++)
	{
		LCDsendCommand(0x14);
	}
}
开发者ID:toAtulArora,项目名称:IISER_repo,代码行数:7,代码来源:lcd_lib.c


示例8: LCDcursorLeft

//Moves cursor by n poisitions left
void LCDcursorLeft(uint8_t n)
{
	for (uint8_t i=0;i<n;i++)
	{
		LCDsendCommand(0x10);
	}
}
开发者ID:ekapujiw2002,项目名称:ex4-avr-gcc-library,代码行数:8,代码来源:lcd_mixed.c.ori.c


示例9: LCDshiftLeft

void LCDshiftLeft(uint8_t n)	//Scroll n of characters Right
{
	for(uint8_t i = 0; i < n; i++)
	{
		LCDsendCommand(0x1E);
	}
}
开发者ID:nazmul21,项目名称:MEGA-AVR,代码行数:7,代码来源:lcd_lib.c


示例10: LCDshiftRight

//Scrol n of characters Left
void LCDshiftRight(uint8_t n)
{
	uint8_t i;
	for (i=0;i<n;i++)
	{
		LCDsendCommand(0x18);
	}
}
开发者ID:ekapujiw2002,项目名称:ex4-avr-gcc-library,代码行数:9,代码来源:lcd_mixed.c.ori.c


示例11: LCDshiftLeft

//Scrol n of characters Right
void LCDshiftLeft(uint8_t n)
{
	uint8_t i;
	for (i=0;i<n;i++)
	{
		LCDsendCommand(0x1C);
	}
}
开发者ID:ekapujiw2002,项目名称:ex4-avr-gcc-library,代码行数:9,代码来源:lcd_mixed.c.ori.c


示例12: LCDdefinechar

/*
const uint8_t backslash[] PROGMEM= 
{
0b00000000,//back slash
0b00010000,
0b00001000,
0b00000100,
0b00000010,
0b00000001,
0b00000000,
0b00000000
};
LCDdefinechar(backslash,0);
*/
void LCDdefinechar(const uint8_t *pc,uint8_t char_code){
	uint8_t a, pcc;
	uint16_t i;
	a=(char_code<<3)|0x40;
	for (i=0; i<8; i++){
		pcc=pgm_read_byte(&pc[i]);
		LCDsendCommand(a++);
		LCDsendChar(pcc);
		}
}
开发者ID:toAtulArora,项目名称:IISER_repo,代码行数:24,代码来源:lcd_lib.c


示例13: LCDinit

//lcd init
void LCDinit()
{
	//setup lcd pin
	lcd_pin_setup();
	
	//init lcd
	_delay_ms(50);
	bit_clear(LCD_RS_PORT, BIT(LCD_RS_BIT));
	bit_clear(LCD_EN_PORT, BIT(LCD_EN_BIT));
	bit_set(LCD_D4_PORT, BIT(LCD_D4_BIT));
	bit_set(LCD_D5_PORT, BIT(LCD_D5_BIT));
	LCDtoggleEn();
	_delay_ms(10);
	
	//LCD_PORT=0x30;	//DB4 = DB5 = 1, RS = RW = 0
	LCDtoggleEn();
	_delay_ms(5);
	
	//LCD_PORT=0x30;	//DB4 = DB5 = 1, RS = RW = 0
	LCDtoggleEn();
	_delay_ms(5);
	
	//LCD_PORT=0x20;	//DB5 = 1, RS = RW = 0
	bit_clear(LCD_D4_PORT, BIT(LCD_D4_BIT));
	LCDtoggleEn();
	_delay_ms(5);
	
	//set setting
	LCDsendCommand(0x28);	//4bit 2line 5x7font	
	LCDsendCommand(0x0c);	//display on cursor off
	LCDsendCommand(0x06);	//auto inc display shift off
	LCDsendCommand(0x80);	//cursor home
	
	//init 8 custom chars
	//uint8_t ch=0, chn=0;
	//while(ch<64)
	//{
		//LCDdefinechar((LcdCustomChar+ch),chn++);
		//ch=ch+8;
	//}
	LCDDefineProgressBarChar();
}
开发者ID:ekapujiw2002,项目名称:ex4-avr-gcc-library,代码行数:43,代码来源:lcd_mixed.c.ori.c


示例14: LCDclr

//Clears LCD
void LCDclr()
{
	LCDsendCommand(1<<LCD_CLR);
}
开发者ID:ekapujiw2002,项目名称:ex4-avr-gcc-library,代码行数:5,代码来源:lcd_mixed.c.ori.c


示例15: LCDvisible

void LCDvisible(void)		//Shows LCD
{
	LCDsendCommand(0x0C);
}
开发者ID:toAtulArora,项目名称:IISER_repo,代码行数:4,代码来源:lcd_lib.c


示例16: LCDcursorOn

//displays LCD cursor
void LCDcursorOn()
{
	LCDsendCommand(0x0E);
}
开发者ID:ekapujiw2002,项目名称:ex4-avr-gcc-library,代码行数:5,代码来源:lcd_mixed.c.ori.c


示例17: LCDcursorOFF

void LCDcursorOFF(void)	//turns OFF cursor
{
	LCDsendCommand(0x0C);
}
开发者ID:toAtulArora,项目名称:IISER_repo,代码行数:4,代码来源:lcd_lib.c


示例18: LCDblank

void LCDblank(void)		//blanks LCD
{
	LCDsendCommand(0x08);
}
开发者ID:toAtulArora,项目名称:IISER_repo,代码行数:4,代码来源:lcd_lib.c


示例19: LCDcursorOn

void LCDcursorOn(void) //displays LCD cursor
{
	LCDsendCommand(0x0E);
}
开发者ID:toAtulArora,项目名称:IISER_repo,代码行数:4,代码来源:lcd_lib.c


示例20: LCDcursorOnBlink

void LCDcursorOnBlink(void)	//displays LCD blinking cursor
{
	LCDsendCommand(0x0F);
}
开发者ID:toAtulArora,项目名称:IISER_repo,代码行数:4,代码来源:lcd_lib.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LCMDBG函数代码示例发布时间:2022-05-30
下一篇:
C++ LCD_init函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap