Пример #1
0
//-----------------------
// display_162
//----------------------- 
void display_162(void)
{
  unsigned char i;
  
  //WDR();
  wr_com(0x80);  			//set ram address, line1
  
  for(i=0;i<16;i++)
  {
   wr_data(lcd_line1[i]);  	//display "0"
   }

  wr_com(0xc0);				// dispaly line2

  for(i=0;i<16;i++)
  {
   wr_data(lcd_line2[i]);  	//display "0"
  }
}
Пример #2
0
//--------------------------
// init_lcd1602
//--------------------------
void init_lcd1602(void)
{
 unsigned char i;
 //char	init_logo[32];

 delay5ms();

 wr_com(0x38);	//设置显示模式:8位2行5x7点阵 	
 delay5ms();
 wr_com(0x38);	//设置显示模式:8位2行5x7点阵 	
 wr_com(0x38);	//设置显示模式:8位2行5x7点阵 
 wr_com(0x38);	//设置显示模式:8位2行5x7点阵 

// 8bit / 4bit
 wr_com(0x06);	//文字不动,光标自动右移
 wr_com(0x01);	//清屏并光标复位
 wr_com(0x0c);	//显示器开、光标关、光标允许闪烁关	

}
Пример #3
0
/***************************************************************************//**
 * @brief   Sets Address of the LCD RAM memory
 *
 *          (0,0) is the lower left corner of screen.
 * @param   pa Page Address of the LCD RAM memory to be written (0 - 7)
 * @param   ca Column Address of the LCD RAM memory to be written (0 - 127)
 * @return  None
 ******************************************************************************/
void lcd_setAddress(unsigned char row,unsigned char col)
{
	wr_com(0xb7-row);
	wr_com(0x10+(col/16));
	wr_com(0x00+(col%16));
}