本文整理汇总了C++中LCD_WrDat函数的典型用法代码示例。如果您正苦于以下问题:C++ LCD_WrDat函数的具体用法?C++ LCD_WrDat怎么用?C++ LCD_WrDat使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LCD_WrDat函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: LCD_Str
void LCD_Str(unsigned char x,unsigned char y,unsigned char ch[])
{
unsigned char c, i, j;
int len = strlen(ch);
if (len > 16) len = 16;
for (j = 0; j < len; ++j) {
if (32 <= ch[j] && ch[j] <= 32 + 94) {
c = ch[j] - 32;
}
else {
c = 0;
}
if(x > 120) {
x = 0;
y++;
}
LCD_Set_Pos(x,y);
for (i = 0; i < 8; i++) {
LCD_WrDat(F8X16[c*16+i]);
}
LCD_Set_Pos(x,y+1);
for (i = 0; i < 8; i++) {
LCD_WrDat(F8X16[c*16+i+8]);
}
x += 8;
}
}
开发者ID:yoggy,项目名称:redis-oled-display,代码行数:30,代码来源:redis-oled-display.c
示例2: LCD_P14x16Str
//输出汉字字符串
void LCD_P14x16Str(u8 x,u8 y,u8 ch[])
{
u8 wm=0,ii = 0;
u16 adder=1;
while(ch[ii] != '\0')
{
wm = 0;
adder = 1;
while(F14x16_Idx[wm] > 127)
{
if(F14x16_Idx[wm] == ch[ii])
{
if(F14x16_Idx[wm + 1] == ch[ii + 1])
{
adder = wm * 14;
break;
}
}
wm += 2;
}
if(x>118){x=0;y++;}
LCD_Set_Pos(x , y);
if(adder != 1)// 显示汉字
{
LCD_Set_Pos(x , y);
for(wm = 0;wm < 14;wm++)
{
LCD_WrDat(F14x16[adder]);
adder += 1;
}
LCD_Set_Pos(x,y + 1);
for(wm = 0;wm < 14;wm++)
{
LCD_WrDat(F14x16[adder]);
adder += 1;
}
}
else //显示空白字符
{
ii += 1;
LCD_Set_Pos(x,y);
for(wm = 0;wm < 16;wm++)
{
LCD_WrDat(0);
}
LCD_Set_Pos(x,y + 1);
for(wm = 0;wm < 16;wm++)
{
LCD_WrDat(0);
}
}
x += 14;
ii += 2;
}
}
开发者ID:YoshimiSakuka,项目名称:K10,代码行数:57,代码来源:Oled.c
示例3: LED_PrintImage
/*****************************************************************************
函 数 名 : LED_PrintImage
功能描述 : 将图像显示出来
输入参数 : unsigned char *pucTable 二维图像数组的地址
USHORT16 usRowNum 二维图像的行数1~64
USHORT16 usColumnNum 二维图像的列数1~128
输出参数 : none
返 回 值 : none
*****************************************************************************/
void LED_PrintImage(unsigned char *pucTable, uint16 usRowNum, uint16 usColumnNum)
{
unsigned char ucData;
uint16 i,j,k,m,n;
uint16 usRowTmp;
m = usRowNum >> 3; //计算图片行数以8位为一组完整的组数
n = usRowNum % 8; //计算分完组后剩下的行数
for(i = 0; i < m; i++) //完整组行扫描
{
LCD_Set_Pos(0,(unsigned char)i);
usRowTmp = i << 3; //计算当前所在行的下标
for(j = 0; j < usColumnNum; j++) //列扫描
{
ucData = 0;
for(k = 0; k < 8; k++) //在i组中对这8行扫描
{
ucData = ucData >> 1;
if((pucTable + (usRowTmp + k) * usColumnNum)[j] == LED_IMAGE_WHITE)
{
ucData = ucData | 0x80;
}
}
LCD_WrDat(ucData);
}
}
LCD_Set_Pos(0,(unsigned char)i); //设置剩下的行显示的起始坐标
usRowTmp = i << 3; //计算当前所在行的下标
for(j = 0; j < usColumnNum; j++) //列扫描
{
ucData = 0;
for(k = 0; k < n; k++) //对剩下的行扫描
{
ucData = ucData >> 1;
if((pucTable + (usRowTmp + k) * usColumnNum)[j] == LED_IMAGE_WHITE)
{
ucData = ucData | 0x80;
}
}
ucData = ucData >> (8 - n);
LCD_WrDat(ucData);
}
return;
}
开发者ID:YoshimiSakuka,项目名称:K10,代码行数:58,代码来源:Oled.c
示例4: LCD_Dis_16x16
/*
=================================================================================
LCD_Dis_16x16( );
Function : Display 16x16
INTPUT : page, the page of the LCD, 0-7
column, the column of the LCD, 0-127
p_data, the data array for display
OUTPUT : None
=================================================================================
*/
void LCD_Dis_16x16( INT8U page, INT8U column, const INT8U *p_data )
{
INT8U i;
LCD_Set_Pos( page, column );
for( i = 0; i < 16; i ++ )
{
LCD_WrDat( *p_data ++ );
}
LCD_Set_Pos( page+1, column );
for( i = 0; i < 16; i ++ )
{
LCD_WrDat( *p_data ++ );
}
}
开发者ID:ou9s9a9l,项目名称:sdcard,代码行数:25,代码来源:OLED.c
示例5: 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
示例6: 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
示例7: 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
示例8: 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
示例9: 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
示例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: LCD_P8x16Str
/*******************功能描述:显示8*16一组标准ASCII字符串 显示的坐标(x,y),y为页范围0~7****************/
void LCD_P8x16Str(unsigned char x, unsigned char y,unsigned char ch[])
{
unsigned char c=0,i=0,j=0;
while (ch[j]!='\0')
{
c =ch[j]-32;
if(x>120){x=0;y++;}
LCD_Set_Pos(x,y);
for(i=0;i<8;i++)
LCD_WrDat(F8X16[c*16+i]);
LCD_Set_Pos(x,y+1);
for(i=0;i<8;i++)
LCD_WrDat(F8X16[c*16+i+8]);
x+=8;
j++;
}
}
开发者ID:bluewish,项目名称:ble_dev,代码行数:18,代码来源:hal_lcd.c
示例12: LCD_sign
/* x代表横坐标由0~127 y代表纵坐标由0~7,N表示从哪个字开始显示 */
void LCD_sign(unsigned char x, unsigned char y, unsigned char N)
{
unsigned char wm=0;
unsigned int adder=32*N;
LCD_Set_Pos(x , y);
for(wm = 0;wm < 16;wm++)
{
LCD_WrDat(sign[adder]);
adder += 1;
}
LCD_Set_Pos(x,y + 1);
for(wm = 0;wm < 16;wm++)
{
LCD_WrDat(sign[adder]);
adder += 1;
}
}
开发者ID:Qiugoodboy,项目名称:BLE_Peripheral,代码行数:18,代码来源:oled_show.c
示例13: LCD_P16x16Ch
/*****************功能描述:显示16*16点阵 显示的坐标(x,y),y为页范围0~7****************************/
void LCD_P16x16Ch(unsigned char x, unsigned char y, unsigned char N)
{
unsigned char wm=0;
unsigned int adder=32*N; //
LCD_Set_Pos(x , y);
for(wm = 0; wm < 16; wm++) //
{
LCD_WrDat(F16x16[adder]);
adder += 1;
}
LCD_Set_Pos(x,y + 1);
for(wm = 0; wm < 16; wm++) //
{
LCD_WrDat(F16x16[adder]);
adder += 1;
}
}
开发者ID:JCJohnbee,项目名称:Johnbee_Repository,代码行数:18,代码来源:hal_lcd.c
示例14: LCD_DispFill
void LCD_DispFill(uchar filldata)
{ uchar x, y;
LCD_WrCmd(1,LCD_STARTROW);
LCD_WrCmd(2,LCD_STARTROW);
for(y=0; y<8; y++)
{ LCD_WrCmd(1,LCD_ADDRSTRY+y);
LCD_WrCmd(1,LCD_ADDRSTRX);
LCD_WrCmd(2,LCD_ADDRSTRY+y);
LCD_WrCmd(2,LCD_ADDRSTRX);
for(x=0; x<64; x++)
{ LCD_WrDat(1,filldata);
LCD_WrDat(2,filldata);
}
}
}
开发者ID:vvdeng,项目名称:MinerLampSystem,代码行数:17,代码来源:lcd12864.c
示例15: LCD_Rectangle
//==============================================================
//函数名: void LCD_Rectangle(byte x1,byte y1,
// byte x2,byte y2,byte color,byte gif)
//功能描述:绘制一个实心矩形
//参数:左上角坐标(x1,y1),右下角坐标(x2,y2)
// 其中x1、x2的范围0~127,y1,y2的范围0~63,即真实坐标值
//返回:无
//==============================================================
void LCD_Rectangle(byte x1,byte y1,byte x2,byte y2,byte gif)
{
byte n;
LCD_Set_Pos(x1,y1>>3);
for(n=x1;n<=x2;n++)
{
LCD_WrDat(0x01<<(y1%8));
if(gif == 1) LCD_DLY_ms(50);
}
LCD_Set_Pos(x1,y2>>3);
for(n=x1;n<=x2;n++)
{
LCD_WrDat(0x01<<(y2%8));
if(gif == 1) LCD_DLY_ms(5);
}
}
开发者ID:MrLrh,项目名称:freescale,代码行数:26,代码来源:Oled.c
示例16: 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
示例17: LCD_Rectangle
//==============================================================
//函数名: void LCD_Rectangle(u8 x1,u8 y1,
// u8 x2,byte y2,byte color,byte gif)
//功能描述:绘制一个实心矩形
//参数:左上角坐标(x1,y1),右下角坐标(x2,y2)
// 其中x1、x2的范围0~127,y1,y2的范围0~63,即真实坐标值
//返回:无
//==============================================================
void LCD_Rectangle(u8 x1,u8 y1,u8 x2,u8 y2,u8 gif)
{
u8 n;
LCD_Set_Pos(x1,y1>>3);
for(n=x1;n<=x2;n++)
{
LCD_WrDat(0x01<<(y1%8));
if(gif == 1) LCD_DLY_ms(50);
}
LCD_Set_Pos(x1,y2>>3);
for(n=x1;n<=x2;n++)
{
LCD_WrDat(0x01<<(y2%8));
if(gif == 1) LCD_DLY_ms(5);
}
}
开发者ID:YoshimiSakuka,项目名称:K10,代码行数:26,代码来源:Oled.c
示例18: LCD_P8x16Str
void LCD_P8x16Str(u8 x,u8 y,u8 ch[])//-----------------------------------------------------------
{
u8 c=0,i=0,j=0;
while (ch[j]!='\0')
{
c =ch[j]-32;
if(x>120){x=0;y++;}
LCD_Set_Pos(x,y);
for(i=0;i<8;i++)
LCD_WrDat(F8X16[c*16+i]);
LCD_Set_Pos(x,y+1);
for(i=0;i<8;i++)
LCD_WrDat(F8X16[c*16+i+8]);
x+=8;
j++;
}
}
开发者ID:YoshimiSakuka,项目名称:K10,代码行数:18,代码来源:Oled.c
示例19: LCD_P8x16Str
//==============================================================
//函数名:LCD_P8x16Str(byte x,byte y,byte *p)
//功能描述:写入一组标准ASCII字符串
//参数:显示的位置(x,y),y为页范围0~7,要显示的字符串
//返回:无
//==============================================================
void LCD_P8x16Str(byte x,byte y,byte ch[])
{
byte c=0,i=0,j=0;
while (ch[j]!='\0')
{
c =ch[j]-32;
if(x>120){x=0;y++;}
LCD_Set_Pos(x,y);
for(i=0;i<8;i++)
LCD_WrDat(F8X16[c*16+i]);
LCD_Set_Pos(x,y+1);
for(i=0;i<8;i++)
LCD_WrDat(F8X16[c*16+i+8]);
x+=8;
j++;
}
}
开发者ID:MrLrh,项目名称:freescale,代码行数:24,代码来源:Oled.c
示例20: LCD_Dis_Str
/*
=================================================================================
LCD_Dis_Str( );
Function : Display a character
INTPUT : page, 0-7
column, 0-128
ch, the character to be displayed
OUTPUT : None
=================================================================================
*/
void LCD_Dis_Char( INT8U page, INT8U column, char ch )
{
INT16U pos;
INT8U j;
if( ch < ' ' ) { return; }
pos = 16*( ch - ' ' );
LCD_Set_Pos( page, column );
for( j = 0; j < 8; j ++ )
{
LCD_WrDat( Font8x16[ pos++ ] );
}
LCD_Set_Pos( page+1, column );
for( j = 0; j < 8; j ++ )
{
LCD_WrDat( Font8x16[ pos++ ] );
}
}
开发者ID:ou9s9a9l,项目名称:sdcard,代码行数:29,代码来源:OLED.c
注:本文中的LCD_WrDat函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论