本内容提供了基于单片机设计的软件时钟C语言程序

程序如下:

 

#pragma db oe

#include

#include

#include

#include

#include

 

#include

#define uint unsigned int

#define uchar unsigned char

#define ulong unsigned long

 

void display(void);

void initsiu(void);

void delay(void);

void sztz(void);

void jssz(void);

void setsz(void);

void tzszw(uchar zj);

uchar inkey(void);

uchar sec,min,hour;

uchar disdat[6];

uchar code tab[]={0x3f,0x6,0x5b,0x4f,0x66,0x6d,0x7d,0x7,0x7f,0x6f};

uint count;