Exemple #1
0
void LED_P8x16Str(unsigned char x,unsigned char y,char ch[])
{
	unsigned char c=0,i=0,j=0;
	while (ch[j]!='\0')
	{    
		c =ch[j]-32;
		if(x>120)
		{
			x=0;
			y++;
		}
		LED_Set_Pos(x,y);    
		for(i=0;i<8;i++) 
		{
			LED_WrDat(F8X16[(c<<4)+i]);
		}
		LED_Set_Pos(x,y+1);    
		for(i=0;i<8;i++) 
		{
			LED_WrDat(F8X16[(c<<4)+i+8]);
		}
		x+=8;
		j++;
	}
}
Exemple #2
0
void LED_CLS(void)
{
	u8 y, x;
	for (y = 0; y < 8; y++) {
		LED_WrCmd(0xb0 + y);
		LED_WrCmd(0x00);
		LED_WrCmd(0x10);
		for (x = 0; x < 130; x++)
			LED_WrDat(0);
	}
}
Exemple #3
0
void LED_Fill(u8 bmp_data) {
	u8 y, x;

	for (y = 0; y < 8; y++) {
		LED_WrCmd(0xb0 + y);
		LED_WrCmd(0x00);
		LED_WrCmd(0x10);
		for (x = 0; x < 130; x++)
			LED_WrDat(bmp_data);
	}
}
Exemple #4
0
void LED_CLS(void) 
{
	unsigned char y,x;	
	for(y=0;y<8;y++)
	{
		LED_WrCmd(0xb0+y);
		LED_WrCmd(0x00);
		LED_WrCmd(0x10); 
		for(x=0;x<128;x++)
			LED_WrDat(0);
	}
}
Exemple #5
0
void LED_PrintBMP(unsigned char x0,unsigned char y0,unsigned char x1,unsigned char y1,unsigned char bmp[])
{ 	
	int ii=0;
	unsigned char x,y;
	for(y=y0;y<=y1;y++)
	{
		LED_Set_Pos(x0,y);				
		for(x=x0;x<x1;x++)
		{      
			LED_WrDat(bmp[ii++]);	    	
		}
	}
}
Exemple #6
0
void LED_Fill(unsigned char bmp_data)
{
	unsigned char y,x;
	
	for(y=0;y<8;y++)
	{
		LED_WrCmd(0xb0+y);  
		LED_WrCmd(0x00);     
		LED_WrCmd(0x10);	     
		for(x=0;x<128;x++)
			LED_WrDat(bmp_data);
	}
} 
Exemple #7
0
//==============================================================
void LED_P6x8Char(u8 x, u8 y, u8 ch) {
	u8 c = 0, i = 0;
	//   j=0;

	c = ch - 32;
	if (x > 122) {
		x = 0;
		y++;
	}
	LED_Set_Pos(x, y);
	for (i = 0; i < 6; i++) {
		LED_WrDat(F6x8[c][i]);
	}
}
Exemple #8
0
void LED_P6x8Char(unsigned char x,unsigned char y,unsigned char ch)
{
	 unsigned char c=0,i=0,j=0;     
	   
	c =ch-32;
	if(x>122)
	{
		x=0;
		y++;
	}
	LED_Set_Pos(x,y);    
	for(i=0;i<6;i++)
	{     
		LED_WrDat(F6x8[c][i]);  
	}
}
Exemple #9
0
//==============================================================
void LED_P6x8Str(u8 x, u8 y, u8 ch[]) {
	u8 c = 0, i = 0, j = 0;
	while (ch[j] != '\0') {
		c = ch[j] - 32;
		if (x > 126) {
			x = 0;
			y++;
		}
		LED_Set_Pos(x, y);
		for (i = 0; i < 6; i++) {
			LED_WrDat(F6x8[c][i]);
		}
		x += 6;
		j++;
	}
}
Exemple #10
0
 void LED_Cursor(unsigned char cursor_column, unsigned char cursor_row)
 {	
 	if(cursor_row != 0) 
 	{
 		if(cursor_column == 1) LED_Set_Pos(0, cursor_row + 2);
 		else  LED_Set_Pos(80 + (cursor_column - 2)*6, cursor_row + 2);
 		LED_WrDat(0xFF);
 		LED_WrDat(0xFF);
 		LED_WrDat(0xFF);
 		LED_WrDat(0xFF);
 		LED_WrDat(0xFF);
 		LED_WrDat(0xFF);					 
 	}
 }