代码拉取完成,页面将自动刷新
C51 COMPILER V9.01 TIMER 07/13/2018 14:44:08 PAGE 1
C51 COMPILER V9.01, COMPILATION OF MODULE TIMER
OBJECT MODULE PLACED IN timer.obj
COMPILER INVOKED BY: G:\Keil\k4\C51\BIN\C51.EXE src\timer.c BROWSE DEBUG OBJECTEXTEND PRINT(.\timer.lst) OBJECT(timer.ob
-j)
line level source
1 /**********************************************************************
2 @Author: frank.xin
3 @Date : 7/11/2018
4 File name : timer.c
5 File target: STC89C52 with PCF8591 ADDA Converter
6 Approach : Initializing timer0 and start working
7 http://frank.xin
8 **********************************************************************/
9 #include "timer.h"
10 #include <reg52.h>
11
12 void Init_Timer0(void) {
13 1 TMOD = 0x01; // Set timer mod as 16-bit with non-reloading
14 1 TL0 = (65536-251)%256; // Period of first timing
15 1 TH0 = (65536-251)/256; // Period of first timing
16 1 TF0 = 0; // Clear flow remark
17 1 ET0 = 1; // Enable timer0 interrupt
18 1 EA = 1; // Enable global interrupt
19 1 TR0 = 1; // Start timing
20 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 18 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。