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

📄 clock.c

📁 Small Device C Compiler 面向Inter8051
💻 C
字号:
#include <8051.h>#include <stdio.h>#include "hw.h"void main(void) {  unsigned long ms;  unsigned int seconds, oldseconds=ClockTicks()/1000;  printf ("Example using the core timer to generate seconds.\n");  while (1) {    ms=ClockTicks();    seconds=ms/1000;    if (oldseconds!=seconds) {      oldseconds=seconds;      printf ("%02d:%02d.%02d %ld\n", 	      (int)seconds/3600, (int)(seconds/60)%60, 	      (int)seconds%60, ms);    }    if (RI) {      putchar(getchar());      printf("%ld\n\r", ClockTicks());    }  }}

⌨️ 快捷键说明

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