本文整理汇总了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;未经允许,请勿转载。 |
请发表评论