📄 initial.lst
字号:
C51 COMPILER V7.05 INITIAL 10/18/2006 16:44:42 PAGE 1
C51 COMPILER V7.05, COMPILATION OF MODULE INITIAL
OBJECT MODULE PLACED IN initial.OBJ
COMPILER INVOKED BY: C:\SiLabs\MCU\IDEfiles\C51\BIN\C51.exe initial.c DB OE
stmt level source
1 #include "C8051F330.H"
2 #include "IR_Rx_Tx.h"
3
4
5 //-----------------------------------------------------------------------------
6 // Initialization Subroutines
7 //-----------------------------------------------------------------------------
8
9 //-----------------------------------------------------------------------------
10 // PORT_Init
11 //-----------------------------------------------------------------------------
12 //
13 // Configure the Crossbar and GPIO ports.
14 //
15 // P0.0 - SMBus SDA
16 // P0.1 - SMBus SCL
17
18
19 void PORT_Init (void)
20 {
21 1 P0MDIN = 0xFF;
22 1 P0MDOUT = 0x00;
23 1 XBR0 = 0x04; // Enable IIC on P0.0(SDA) and P0.1(SCL)
24 1 XBR1 = 0x40; // Enable crossbar and weak pull-ups
25 1
26 1 //P0 = 0xFF;
27 1
28 1 }
29
30 //-----------------------------------------------------------------------------
31 // SYSCLK_Init
32 //-----------------------------------------------------------------------------
33 //
34 // This routine initializes the system clock to use the internal oscillator
35 // at its maximum frequency.
36 // Also enables the Missing Clock Detector.
37 //
38
39 void SYSCLK_Init (void)
40 {
41 1 OSCICN |= 0x03; // Configure internal oscillator for
42 1 // its maximum frequency
43 1 RSTSRC = 0x04; // Enable missing clock detector
44 1
45 1 }
46
47
48
49
50 void Timer3_Init (int counts)
51 {
52 1 TMR3CN = 0x00; // STOP Timer2; Clear TF2H and TF2L;
53 1 // disable low-byte interrupt; disable
54 1 // split mode; select internal timebase
55 1 CKCON |= 0x40; // Timer2 uses SYSCLK as its timebase
C51 COMPILER V7.05 INITIAL 10/18/2006 16:44:42 PAGE 2
56 1
57 1 TMR3RL = -counts; // Init reload values
58 1 TMR3 = TMR3RL; // Init Timer2 with reload value
59 1 EIE1 |=0x80 ; // disable Timer2 interrupts
60 1 TMR3CN |=0x04; // start Timer2
61 1
62 1 }
63
64
65
66
67
68 void SMBus_Init(void)
69 {
70 1 SMB0CF = 0x01;
71 1 SMB0CF |= 0x80; //Enable slave SMBus and EXTHOLD
72 1
73 1 SMB0CN &= ~0x40; // Reset communication
74 1 SMB0CN |= 0x40;
75 1 EIE1 |= 0x01; //Enable SMBus interrupt
76 1 }
77
78
79
80
81
82 void Interrupts_Init()
83 {
84 1 EA=1;
85 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 67 ----
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)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -