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

📄 display.c

📁 环保型IC卡门禁系统的C程序
💻 C
字号:
#include <iom8v.h>
#include <macros.h>
#include "lcd1602.h"

void display(unsigned char Num , unsigned char position)
{
  unsigned char line=0 ;
  
  if(position<16)  { line=0; }
  else      { position -= 16 ;  line=1; }
  
  switch (Num) 
  {
	case 0 : LCD_write_string(position,line,"0");
	         break ;
	case 1 : LCD_write_string(position,line,"1");
	         break ;
	case 2 : LCD_write_string(position,line,"2");
	         break ;
	case 3 : LCD_write_string(position,line,"3");
	         break ;
	case 4 : LCD_write_string(position,line,"4");
	         break ;
	case 5 : LCD_write_string(position,line,"5");
	         break ;
	case 6 : LCD_write_string(position,line,"6");
	         break ;
	case 7 : LCD_write_string(position,line,"7");
	         break ;
	case 8 : LCD_write_string(position,line,"8");
	         break ;
	case 9 : LCD_write_string(position,line,"9");
	         break ;
	case 10 : LCD_write_string(position,line,"a");
	         break ;
	case 11 : LCD_write_string(position,line,"b");
	         break ;
	case 12 : LCD_write_string(position,line,"c");
	         break ;
	case 13 : LCD_write_string(position,line,"d");
	         break ;
	case 14 : LCD_write_string(position,line,"e");
	         break ;
	case 15 : LCD_write_string(position,line,"f");
	         break ;
	case 16 : LCD_write_string(position,line,"*");
	         break ;
  }
  delay_nms(2);
}

⌨️ 快捷键说明

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