[8051시계] 8051 LCD 시계
- 최초 등록일
- 2003.06.15
- 최종 저작일
- 2003.06
- 6페이지/
C언어
- 가격 2,000원
![할인쿠폰받기](/images/v4/document/ico_det_coupon.gif)
소개글
한학기동안 만든거임!
목차
8051을 이용한 LCD 시계제작
케일C에서 작성한 C 프로그램 입니다.
시, 분, 초, 알람, 요일 이름 등이 지원됩니다.
본문내용
#include< reg51.h>
#define CBYTE ((unsigned char volatile code *)0)
#define DBYTE ((unsigned char volatile data *)0)
#define PBYTE ((unsigned char volatile pdata *)0)
#define XBYTE ((unsigned char volatile xdata *)0)
#define LCDIR 0xE000
#define LCDDR 0xE001
#define NULL 0
/// 변수 선언 ///
char *smarr[]={"0","1","2","3","4","5","6","7","8","9"}; // sec,min 포인터,배열
char *harr[]={"01","02","03","04","05","06","07","08","09","10","11","12"}; // hour 포인터,배열
char *ampm[]={"AM","PM"}; // am,pm 포인터,배열
char *week[]={"MON","TUE","WED","THU","FRI","SAT","SUN"}; // week 포인터,배열
char sec1=0,sec2=0;
char min1=0,min2=0;
char hour_index=11;
char al_hour_index=10;
char al_min1=0;
char al_min2=0;
char ampm_index=0;
char week_index=0;
char set_input; // 포트1에서 값을 받아서 제어;
참고 자료
8051관련 여러 서적들