📄 led.c
字号:
/* LED.C File
The LED driver
Created by Computer-lov. Date: 2005.5.25
Last edited date:2005.5.25
Copyright (c) 2005 Computer-lov
version 1.0
All rigths reserved
欢迎访问我的blog: http://computer00.21ic.org
*/
#include "LED.H"
#include "LCD1602.h"
void delayXms(unsigned int x) //延迟x毫秒函数
{
unsigned int i,j;
for(i=0;i<x;i++)
for(j=0;j<130;j++);
}
void display(unsigned char * disp_buff) //显示函数
{
LCD_write_string(0,0," ele-lover.com ");
LCD_set_xy(1,0);
LCD_write_string(1,0,"Time is:");
LCD_en_dat(disp_buff[0]|0x30);
delayXms(2); //延时2毫秒
LCD_en_dat(disp_buff[1]|0x30);
delayXms(2); //延时2毫秒
LCD_en_dat(':');
LCD_en_dat(disp_buff[2]|0x30);
delayXms(2); //延时2毫秒
LCD_en_dat(disp_buff[3]|0x30);
delayXms(2); //延时2毫秒
LCD_en_dat(':');
LCD_en_dat(disp_buff[4]|0x30);
delayXms(2); //延时2毫秒
LCD_en_dat(disp_buff[5]|0x30);
delayXms(2); //延时2毫秒
//LCD_en_dat(0xff);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -