⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uart-adc-cbc.c

📁 cygnal 的模拟数字信号转换程序
💻 C
📖 第 1 页 / 共 4 页
字号:
	  {
 
      temp=(ds1302_clock_set[3]&0x0f);
      temp1=(ds1302_clock_set[3]&0x30);
	  temp1=(temp1>>4);
 	  disp_16_8_reverse(&number[temp1*16],1,9);
	  disp_16_8_reverse(&number[temp*16],1,10); 
      break;
	  }
   case 4://hours
	  {

	  temp=(ds1302_clock_set[2]&0x0f);
      temp1=(ds1302_clock_set[2]&0x30);
	  temp1=(temp1>>4);
	  disp_16_8_reverse(&number[temp1*16],1,1);
	  disp_16_8_reverse(&number[temp*16],1,2); 
      break;
	 }
   case 5://minutes
	{

     temp=(ds1302_clock_set[1]&0x0f);
     temp1=(ds1302_clock_set[1]&0x70);
	 temp1=(temp1>>4);
	 disp_16_8_reverse(&number[temp1*16],1,4);
	 disp_16_8_reverse(&number[temp*16],1,5);
     break;
    }
   case 6://second
	{ 

     temp=(ds1302_clock_set[0]&0x0f);
     temp1=(ds1302_clock_set[0]&0x70);
	 temp1=(temp1>>4);
	 disp_16_8_reverse(&number[temp1*16],1,7);
	 disp_16_8_reverse(&number[temp*16],1,8); 
     break;
    }
   case 7:
      {     
       switch(temp1=(ds1302_clock_set[5]&0x07))
	       {
		    case 1 :   //MON
			    {
				 disp_16_8_reverse(&alphabet_big[12*16],1,21);
				 disp_16_8_reverse(&alphabet_big[14*16],1,22);
				 disp_16_8_reverse(&alphabet_big[13*16],1,23);
			     break;
				}
			case 2 :  //TUE                    
			   {
				 disp_16_8_reverse(&alphabet_big[19*16],1,21);
				 disp_16_8_reverse(&alphabet_big[20*16],1,22);
				 disp_16_8_reverse(&alphabet_big[4*16],1,23);
			    break;                      
			   }
			case 3 :  //WED
			   {
				 disp_16_8_reverse(&alphabet_big[22*16],1,21);
				 disp_16_8_reverse(&alphabet_big[4*16],1,22);
				 disp_16_8_reverse(&alphabet_big[3*16],1,23);
				break;
			   }
			case 4 :  //THU
			   {
				 disp_16_8_reverse(&alphabet_big[19*16],1,21);
				 disp_16_8_reverse(&alphabet_big[7*16],1,22);
				 disp_16_8_reverse(&alphabet_big[20*16],1,23);
				break;
			   }
			case 5 :  //FRI
			   {
				 disp_16_8_reverse(&alphabet_big[5*16],1,21);
				 disp_16_8_reverse(&alphabet_big[17*16],1,22);
				 disp_16_8_reverse(&alphabet_big[8*16],1,23);
			     break;
			   }  
			case 6 :   //SAT
			   {	
				 disp_16_8_reverse(&alphabet_big[18*16],1,21);
				 disp_16_8_reverse(&alphabet_big[0],1,22);
				 disp_16_8_reverse(&alphabet_big[19*16],1,23);
			     break;
			   }
			case 7 :   //SUN
			   {
				 disp_16_8_reverse(&alphabet_big[18*16],1,21);
				 disp_16_8_reverse(&alphabet_big[20*16],1,22);
				 disp_16_8_reverse(&alphabet_big[13*16],1,23);
			     break;
				}
            default: break;
			   
		   }
	   }
	}
}
/*********************************************************************/
/*********************************************************************/
//refresh_clock()
void refresh_clock(void)
{
  get_clk_regs(&ds1302_clock[0]);
  display_clock(&ds1302_clock[0]);
}
/*********************************************************************/
/*********************************************************************/
/*********************************************************************/
void modify_clock_display(void)
{
     display_clock(&ds1302_clock_set[0]); 
	 input_clock_parameter_display();
}
/****LCM code****/
/*********************************************************************/
/*********************************************************************/
unsigned int code alphabet_big[ ]={
0xe0,0xf0,0x98,0x8c,0x98,0xf0,0xe0,0x00,0x0f,0x0f,0x00,0x00,0x00,0x0f,0x0f,0x00,
0x04,0xfc,0xfc,0x44,0x44,0xfc,0xb8,0x00,0x08,0x0f,0x0f,0x08,0x08,0x0f,0x07,0x00,
0xf0,0xf8,0x0c,0x04,0x04,0x0c,0x18,0x00,0x03,0x07,0x0c,0x08,0x08,0x0c,0x06,0x00,
0x04,0xfc,0xfc,0x04,0x0c,0xf8,0xf0,0x00,0x08,0x0f,0x0f,0x08,0x0c,0x07,0x03,0x00,
0x04,0xfc,0xfc,0x44,0xe4,0x0c,0x1c,0x00,0x08,0x0f,0x0f,0x08,0x08,0x0c,0x0e,0x00,
0x04,0xfc,0xfc,0x44,0xe4,0x0c,0x1c,0x00,0x08,0x0f,0x0f,0x08,0x00,0x00,0x00,0x00,
0xf0,0xf8,0x0c,0x84,0x84,0x8c,0x98,0x00,0x03,0x07,0x0c,0x08,0x08,0x07,0x0f,0x00,
0xfc,0xfc,0x40,0x40,0x40,0xfc,0xfc,0x00,0x0f,0x0f,0x00,0x00,0x00,0x0f,0x0f,0x00,
0x00,0x00,0x04,0xfc,0xfc,0x04,0x00,0x00,0x00,0x00,0x08,0x0f,0x0f,0x08,0x00,0x00,
0x00,0x00,0x00,0x04,0xfc,0xfc,0x04,0x00,0x07,0x0f,0x08,0x08,0x0f,0x07,0x00,0x00,
0x04,0xfc,0xfc,0xc0,0xe0,0x3c,0x1c,0x00,0x08,0x0f,0x0f,0x00,0x01,0x0f,0x0e,0x00,
0x04,0xfc,0xfc,0x04,0x00,0x00,0x00,0x00,0x08,0x0f,0x0f,0x08,0x08,0x0c,0x0e,0x00,
0xfc,0xfc,0x38,0x70,0x38,0xfc,0xfc,0x00,0x0f,0x0f,0x00,0x00,0x00,0x0f,0x0f,0x00,
0xfc,0xfc,0x38,0x70,0xe0,0xfc,0xfc,0x00,0x0f,0x0f,0x00,0x00,0x00,0x0f,0x0f,0x00,
0xf8,0xfc,0x04,0x04,0x04,0xfc,0xf8,0x00,0x07,0x0f,0x08,0x08,0x08,0x0f,0x07,0x00,
0x04,0xfc,0xfc,0x44,0x44,0x7c,0x38,0x00,0x08,0x0f,0x0f,0x08,0x00,0x00,0x00,0x00,
0xf8,0xfc,0x04,0x04,0x04,0xfc,0xf8,0x00,0x07,0x0f,0x08,0x0e,0x3c,0x3f,0x27,0x00,
0x04,0xfc,0xfc,0x44,0xc4,0xfc,0x38,0x00,0x08,0x0f,0x0f,0x00,0x00,0x0f,0x0f,0x00,
0x18,0x3c,0x64,0x44,0xc4,0x9c,0x18,0x00,0x06,0x0e,0x08,0x08,0x08,0x0f,0x07,0x00,
0x00,0x1c,0x0c,0xfc,0xfc,0x0c,0x1c,0x00,0x00,0x00,0x08,0x0f,0x0f,0x08,0x00,0x00,
0xfc,0xfc,0x00,0x00,0x00,0xfc,0xfc,0x00,0x07,0x0f,0x08,0x08,0x08,0x0f,0x07,0x00,
0xfc,0xfc,0x00,0x00,0x00,0xfc,0xfc,0x00,0x01,0x03,0x06,0x0c,0x06,0x03,0x01,0x00,
0xfc,0xfc,0x00,0xc0,0x00,0xfc,0xfc,0x00,0x07,0x0f,0x0e,0x03,0x0e,0x0f,0x07,0x00,
0x0c,0x3c,0xf0,0xe0,0xf0,0x3c,0x0c,0x00,0x0c,0x0f,0x03,0x01,0x03,0x0f,0x0c,0x00,
0x00,0x3c,0x7c,0xc0,0xc0,0x7c,0x3c,0x00,0x00,0x00,0x08,0x0f,0x0f,0x08,0x00,0x00,
0x1c,0x0c,0x84,0xc4,0x64,0x3c,0x1c,0x00,0x0e,0x0f,0x09,0x08,0x08,0x0c,0x0e,0x00
};
/*********************************************************************/
/*********************************************************************/
unsigned int code alphabet_small[ ]={
0x00,0xa0,0xa0,0xa0,0xe0,0xc0,0x00,0x00,0x07,0x0f,0x08,0x08,0x07,0x0f,0x08,0x00,
0x04,0xfc,0xfc,0x20,0x60,0xc0,0x80,0x00,0x00,0x0f,0x0f,0x08,0x08,0x0f,0x07,0x00,
0xc0,0xe0,0x20,0x20,0x20,0x60,0x40,0x00,0x07,0x0f,0x08,0x08,0x08,0x0c,0x04,0x00,
0x80,0xc0,0x60,0x24,0xfc,0xfc,0x00,0x00,0x07,0x0f,0x08,0x08,0x07,0x0f,0x08,0x00,
0xc0,0xe0,0xa0,0xa0,0xa0,0xe0,0xc0,0x00,0x07,0x0f,0x08,0x08,0x08,0x0c,0x04,0x00,
0x40,0xf8,0xfc,0x44,0x0c,0x18,0x00,0x00,0x08,0x0f,0x0f,0x08,0x00,0x00,0x00,0x00,
0xc0,0xe0,0x20,0x20,0xc0,0xe0,0x20,0x00,0x27,0x6f,0x48,0x48,0x7f,0x3f,0x00,0x00,
0x04,0xfc,0xfc,0x40,0x20,0xe0,0xc0,0x00,0x08,0x0f,0x0f,0x00,0x00,0x0f,0x0f,0x00,
0x00,0x00,0x20,0xec,0xec,0x00,0x00,0x00,0x00,0x00,0x08,0x0f,0x0f,0x08,0x00,0x00,
0x00,0x00,0x00,0x00,0x20,0xec,0xec,0x00,0x00,0x30,0x70,0x40,0x40,0x7f,0x3f,0x00,
0x04,0xfc,0xfc,0x80,0xc0,0x60,0x20,0x00,0x08,0x0f,0x0f,0x01,0x03,0x0e,0x0c,0x00,
0x00,0x00,0x04,0xfc,0xfc,0x00,0x00,0x00,0x00,0x00,0x08,0x0f,0x0f,0x08,0x00,0x00,
0xe0,0xe0,0x60,0xc0,0x60,0xe0,0xc0,0x00,0x0f,0x0f,0x00,0x07,0x00,0x0f,0x0f,0x00,
0x20,0xe0,0xc0,0x20,0x20,0xe0,0xc0,0x00,0x00,0x0f,0x0f,0x00,0x00,0x0f,0x0f,0x00,
0xc0,0xe0,0x20,0x20,0x20,0xe0,0xc0,0x00,0x07,0x0f,0x08,0x08,0x08,0x0f,0x07,0x00,
0x20,0xe0,0xc0,0x20,0x20,0xe0,0xc0,0x00,0x40,0x7f,0x7f,0x48,0x08,0x0f,0x07,0x00,
0xc0,0xe0,0x20,0x20,0xc0,0xe0,0x20,0x00,0x07,0x0f,0x08,0x48,0x7f,0x7f,0x40,0x00,
0x20,0xe0,0xc0,0x60,0x20,0xe0,0xc0,0x00,0x08,0x0f,0x0f,0x08,0x00,0x00,0x00,0x00,
0x40,0xe0,0xa0,0x20,0x20,0x60,0x40,0x00,0x04,0x0c,0x09,0x09,0x0b,0x0e,0x04,0x00,
0x20,0x20,0xf8,0xfc,0x20,0x20,0x00,0x00,0x00,0x00,0x07,0x0f,0x08,0x0c,0x04,0x00,
0xe0,0xe0,0x00,0x00,0xe0,0xe0,0x00,0x00,0x07,0x0f,0x08,0x08,0x07,0x0f,0x08,0x00,
0x00,0xe0,0xe0,0x00,0x00,0xe0,0xe0,0x00,0x00,0x03,0x07,0x0c,0x0c,0x07,0x03,0x00,
0xe0,0xe0,0x00,0x80,0x00,0xe0,0xe0,0x00,0x07,0x0f,0x0c,0x07,0x0c,0x0f,0x07,0x00,
0x20,0x60,0xc0,0x80,0xc0,0x60,0x20,0x00,0x08,0x0c,0x07,0x03,0x07,0x0c,0x08,0x00,
0xe0,0xe0,0x00,0x00,0x00,0xe0,0xe0,0x00,0x47,0x4f,0x48,0x48,0x68,0x3f,0x1f,0x00,
0x60,0x60,0x20,0xa0,0xe0,0x60,0x20,0x00,0x0c,0x0e,0x0b,0x09,0x08,0x0c,0x0c,0x00
};
/*********************************************************************/
/*********************************************************************/
unsigned int code number[ ]={
0xf0,0xf8,0x0c,0xc4,0x0c,0xf8,0xf0,0x00,0x03,0x07,0x0c,0x08,0x0c,0x07,0x03,0x00,
0x00,0x10,0x18,0xfc,0xfc,0x00,0x00,0x00,0x00,0x08,0x08,0x0f,0x0f,0x08,0x08,0x00,
0x08,0x0c,0x84,0xc4,0x64,0x3c,0x18,0x00,0x0e,0x0f,0x09,0x08,0x08,0x0c,0x0c,0x00,
0x08,0x0c,0x44,0x44,0x44,0xfc,0xb8,0x00,0x04,0x0c,0x08,0x08,0x08,0x0f,0x07,0x00,
0xc0,0xe0,0xb0,0x98,0xfc,0xfc,0x80,0x00,0x00,0x00,0x00,0x08,0x0f,0x0f,0x08,0x00,
0x7c,0x7c,0x44,0x44,0x44,0xc4,0x84,0x00,0x04,0x0c,0x08,0x08,0x08,0x0f,0x07,0x00,
0xf0,0xf8,0x4c,0x44,0x44,0xc0,0x80,0x00,0x07,0x0f,0x08,0x08,0x08,0x0f,0x07,0x00,
0x0c,0x0c,0x04,0x84,0xc4,0x7c,0x3c,0x00,0x00,0x00,0x0f,0x0f,0x00,0x00,0x00,0x00,
0xb8,0xfc,0x44,0x44,0x44,0xfc,0xb8,0x00,0x07,0x0f,0x08,0x08,0x08,0x0f,0x07,0x00,
0x38,0x7c,0x44,0x44,0x44,0xfc,0xf8,0x00,0x00,0x08,0x08,0x08,0x0c,0x07,0x03,0x00,
0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x00,0x00,0x00
};
/*********************************************************************/
/*********************************************************************/
unsigned int code symbol[ ]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x0c,0x00,0x00,0x00,//'.'
0x00,0x00,0x00,0x80,0xc0,0x60,0x30,0x00,0x0c,0x06,0x03,0x01,0x00,0x00,0x00,0x00,//'/'
0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x00,0x00,0x00,//':'
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //'-'
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 //' '
};
/*********************************************************************/
/*********************************************************************/
/*********************************************************************/
/*********************************************************************/
unsigned int code hanzi[ ]={
0x20,0x10,0x2c,0x23,0x6a,0xaa,0x2a,0xaa,0x6a,0x2a,0x2a,0x2a,0xea,0x02,0x00,0x00,//yang
0x00,0x10,0x11,0x15,0x15,0x15,0xff,0x15,0x15,0x15,0x11,0x10,0x3f,0x40,0x30,0x00,
0x04,0x04,0xe4,0x9c,0x86,0x84,0x44,0x64,0x55,0x4e,0x44,0x54,0x66,0xc4,0x00,0x00,//liu
0x02,0x01,0x7f,0x20,0x20,0xbf,0x40,0x3f,0x00,0xff,0x00,0x3f,0x40,0x40,0x70,0x00,
0x10,0x28,0xe7,0x24,0x24,0x00,0x22,0xa2,0x22,0xfa,0x2a,0x26,0x32,0x20,0x00,0x00,//meng
0x01,0x01,0x7f,0x21,0x51,0x40,0x7e,0x42,0x7f,0x42,0x7e,0x42,0x7f,0x42,0x40,0x00,
0x00,0x00,0x00,0x00,0x00,0x04,0x0a,0x04,0xf0,0xf8,0x0c,0x04,0x04,0x0c,0x18,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x0c,0x08,0x08,0x0c,0x06,0x00,//she shi du
0x82,0x42,0xf2,0x4e,0x43,0xc2,0x88,0x4a,0xac,0x18,0xff,0x18,0x2c,0xca,0x48,0x00,//lin
0x00,0x00,0x7f,0x20,0x20,0x3f,0x44,0x2a,0x13,0x0e,0x11,0x1e,0x12,0xff,0x12,0x00,
0x04,0x84,0xe4,0x9c,0x84,0x86,0x44,0x48,0x48,0x48,0xff,0x48,0x4c,0x68,0x40,0x00,//gui
0x01,0x00,0x7f,0x20,0x20,0x7f,0x40,0x44,0x44,0x44,0x7f,0x44,0x46,0x64,0x40,0x00,
0x10,0x22,0x64,0x0c,0x80,0x00,0xfe,0x92,0x92,0x92,0x92,0x92,0xff,0x02,0x00,0x00,//wen  
0x04,0x04,0xfe,0x01,0x40,0x7e,0x42,0x42,0x7e,0x42,0x7e,0x42,0x42,0x7e,0x40,0x00,
0x00,0x00,0xfc,0x24,0x24,0x24,0xfc,0xa5,0xa6,0xa4,0xfc,0x24,0x34,0x26,0x04,0x00,//du
0x40,0x20,0x9f,0x80,0x42,0x42,0x26,0x2a,0x12,0x2a,0x26,0x42,0x40,0xc0,0x40,0x00,
0x00,0xf8,0x48,0x48,0x48,0x48,0xff,0x48,0x48,0x48,0x48,0xfc,0x08,0x00,0x00,0x00,//dian 
0x00,0x07,0x02,0x02,0x02,0x02,0x3f,0x42,0x42,0x42,0x42,0x47,0x40,0x70,0x00,0x00,
0x00,0x00,0xfe,0x02,0x82,0x82,0x82,0x82,0xfe,0x82,0x82,0x82,0xc3,0x82,0x00,0x00,//ya
0x40,0x30,0x0f,0x40,0x40,0x40,0x40,0x40,0x7f,0x40,0x42,0x44,0x4c,0x60,0x40,0x00,
0x10,0x22,0x64,0x0c,0x80,0x44,0x44,0x64,0x55,0x4e,0x44,0x54,0x66,0xc4,0x00,0x00,//liu
0x04,0x04,0xfe,0x01,0x00,0x80,0x40,0x3f,0x00,0xff,0x00,0x3f,0x40,0x40,0x70,0x00,
0x80,0x40,0x20,0xf8,0x27,0x20,0x20,0x20,0x20,0xff,0x20,0x24,0x28,0x38,0x20,0x00,//fu
0x00,0x00,0x00,0xff,0x80,0x40,0x20,0x18,0x06,0x01,0x06,0x18,0x60,0xc0,0x40,0x00,
0x90,0x8c,0x84,0x84,0x84,0x84,0xf5,0x86,0x84,0x84,0x84,0x84,0x84,0xd4,0x8c,0x00,//an
0x00,0x00,0x80,0x84,0x46,0x49,0x28,0x10,0x10,0x28,0x47,0xc0,0x00,0x00,0x00,0x00,
0x00,0x82,0x82,0x82,0xba,0xaa,0xaa,0xab,0xaa,0xaa,0xbe,0x8a,0x83,0x82,0x80,0x00,//hao
0x02,0x01,0x20,0x22,0x2a,0x2a,0x2a,0x7e,0xaa,0xaa,0xaa,0xa2,0x80,0xe2,0x01,0x00,
0x10,0x88,0xc4,0xa3,0xbc,0xa0,0xbf,0xa0,0xbc,0x20,0xd8,0x17,0x90,0x78,0x10,0x00,//wei
0x01,0x00,0xff,0x40,0x3e,0x02,0x02,0x3e,0x90,0x48,0x33,0x0c,0x33,0xc0,0x40,0x00
};

//******************************************************************/
//****initialization
//******************************************************************/
void LCM_initialize(void)
{
     unsigned int i;
     for(i=0;i<13;i++)    
	    {
	     LCD_DI=0;
		 LCD_RW=0;		 
		 LCD_E=1;         
		 LCD_DATA=LCM_initialize_parameters[i]; 		 
		 LCD_CSA = 1;
		 LCD_CSB = 1;
		 LCD_CSA = 0;
		 LCD_CSB = 0;
		 nop();
		 nop();
		 nop();
		 LCD_CSA = 1;
		 LCD_CSB = 1;
 		 LCD_RW=1;			 
		}
}
/*************************************************/
//command write
/*************************************************/
void w_com(unsigned int x)
{ 
	if(flag_user==0)
	  {
	     LCD_DI=0;
		 LCD_RW=0;		 
		 LCD_E=1;         
		 LCD_DATA= x; 
		 nop();
		 LCD_CSA = 1;
		 LCD_CSB = 1;
		 LCD_CSA = 0;
		 LCD_CSB = 1;
		 LCD_CSA = 1;
		 LCD_CSB = 1;

		 LCD_RW=1;	
      }
      else  // the right part
	  {
	     LCD_DI=0;
		 LCD_RW=0;		 
		 LCD_E=1;         
		 LCD_DATA= x; 
		 nop();
		 LCD_CSA = 1;
		 LCD_CSB = 1;
		 LCD_CSA = 1;
		 LCD_CSB = 0;
		 LCD_CSA = 1;
		 LCD_CSB = 1;

		 LCD_RW=1;	
       }
}
/*************************************************/
//data write
/*************************************************/
void wdata(unsigned int x)
{
    if(flag_user==0)     // the left part
	  {
	     LCD_DI=1;
		 LCD_RW=0;		 
		 LCD_E=1;         
		 LCD_DATA=x; 
		 nop();	 
		 LCD_CSA = 1;
		 LCD_CSB = 1;
		 LCD_CSA = 0;
		 LCD_CSB = 1;
		 LCD_CSA = 1;
		 LCD_CSB = 1;
		 LCD_RW=1;
		 LCD_DI=1;
	  }
      else   // the right part
	  {
	     LCD_DI=1;
		 LCD_RW=0;		 
		 LCD_E=1;         
		 LCD_DATA=x; 
		 nop();	 
		 LCD_CSA = 1;
		 LCD_CSB = 1;
		 LCD_CSA = 1;
		 LCD_CSB = 0;
		 LCD_CSA = 1;
		 LCD_CSB = 1;
		 LCD_RW=1;
		 LCD_DI=1;
	  }
}	
//*********************************************************************
// one line judge
//*********************************************************************
unsigned int line(unsigned int line8)
{
	unsigned int temp1;
    if((line8>=1)&&(line8<=12))
		  	  {
			   flag_user=0;      
	           temp1=line8;
			   
              }
    if((line8>=13)&&(line8<=24))
                {
				flag_user=1;
	            temp1=line8-12;
	           }
	      
     return(temp1);
}

//*********************************************************************
// one 16*8 symbol display
//*********************************************************************
void disp_16_8(unsigned int *a,unsigned int page, unsigned int line8)
{ 
   unsigned int seg,i,colh,coll,temp,temp1,pages;
   pages=page+0xaf;
   temp1=line(line8);
   temp=(int)((temp1-1)/2);
   colh=0x10+temp;
   if((temp1-1)>(temp*2))
      coll=0x00+0x08;     
   else coll=0x00;   
   for(i=0;i<2;i++)
 	  {
       w_com(pages);    
       w_com(0x40);                       
       w_com(colh);
       w_com(coll);
       w_com(0xe0); 
       for(seg=0;seg<8;seg++)
          { 
           wdata(*a);
           a++;
          }       
       w_com(0xee);          
       pages++;      
      }         
}
//*********************************************************************
// one 16*8 symbol display reverse
//*********************************************************************
void disp_16_8_reverse(unsigned int *a,unsigned int page, unsigned int line8)
{ 
 unsigned int seg,i,colh,coll,temp,temp1,pages;
   pages=page+0xaf;
   temp1=line(line8);
   temp=(int)((temp1-1)/2);
   colh=0x10+temp;
   if((temp1-1)>(temp*2))
      coll=0x00+0x08;     
   else coll=0x00;   
   for(i=0;i<2;i++)
 	  {
       w_com(pages);    
       w_com(0x40);                       
       w_com(colh);
       w_com(coll);
       w_com(0xe0); 
       for(seg=0;seg<8;seg++)
          { 
		   temp=*a;
		   temp=(temp^0xff);
           wdata(temp);
           a++;
          }       
           w_com(0xee);          
           pages++;      
      }         
}
//*********************************************************************/
// one 16*16 word display/
//*********************************************************************/
void disp_16_16(unsigned int *a,unsigned int page, unsigned int line8)
{ 
   unsigned int seg,j,colh,coll,temp,temp1,pages;
   
   pages=page+0xaf;
   temp1=line(line8);
   temp=(int)((temp1-1)/2);
   colh=0x10+temp;
   if((temp1-1)>(temp*2))
      coll=0x00+0x08;     
   else coll=0x00;   
       for(j=0;j<2;j++)
 	      {
           w_com(pages);    
           w_com(0x40);                       

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -