📄 asc0.lst
字号:
C166 COMPILER V6.04, ASC0 08/28/2007 17:10:18 PAGE 1
C166 COMPILER V6.04, COMPILATION OF MODULE ASC0
OBJECT MODULE PLACED IN ASC0.OBJ
COMPILER INVOKED BY: C:\Keil C166\C166\BIN\C166.EXE ASC0.C MODV2 BROWSE MODV2 DEBUG
stmt lvl source
1 //****************************************************************************
2 // @Module Asynchronous/Synchronous Serial Interface 0 (ASC0)
3 // @Filename ASC0.C
4 // @Project ASC0.dav
5 //----------------------------------------------------------------------------
6 // @Controller Infineon XC164CS-16F20
7 //
8 // @Compiler Keil
9 //
10 // @Codegenerator 2.8
11 //
12 // @Description This file contains functions that use the ASC0 module.
13 //
14 //----------------------------------------------------------------------------
15 // @Date 2007-5-29 19:54:39
16 //
17 //****************************************************************************
18
19 // USER CODE BEGIN (ASC0_General,1)
20
21 // USER CODE END
22
23
24
25 //****************************************************************************
26 // @Project Includes
27 //****************************************************************************
28
29 #include "MAIN.H"
30
31 // USER CODE BEGIN (ASC0_General,2)
32
33 // USER CODE END
34
35
36 //****************************************************************************
37 // @Macros
38 //****************************************************************************
39
40 // USER CODE BEGIN (ASC0_General,3)
41
42 // USER CODE END
43
44
45 //****************************************************************************
46 // @Defines
47 //****************************************************************************
48
49 // USER CODE BEGIN (ASC0_General,4)
50
51 // USER CODE END
52
53
54 //****************************************************************************
55 // @Typedefs
C166 COMPILER V6.04, ASC0 08/28/2007 17:10:18 PAGE 2
56 //****************************************************************************
57
58 // USER CODE BEGIN (ASC0_General,5)
59
60 // USER CODE END
61
62
63 //****************************************************************************
64 // @Imported Global Variables
65 //****************************************************************************
66
67 // USER CODE BEGIN (ASC0_General,6)
68
69 // USER CODE END
70
71
72 //****************************************************************************
73 // @Global Variables
74 //****************************************************************************
75
76 // USER CODE BEGIN (ASC0_General,7)
77
78 // USER CODE END
79
80
81 //****************************************************************************
82 // @External Prototypes
83 //****************************************************************************
84
85 // USER CODE BEGIN (ASC0_General,8)
86
87 // USER CODE END
88
89
90 //****************************************************************************
91 // @Prototypes Of Local Functions
92 //****************************************************************************
93
94 // USER CODE BEGIN (ASC0_General,9)
95
96 // USER CODE END
97
98
99 //****************************************************************************
100 // @Function void ASC0_vInit(void)
101 //
102 //----------------------------------------------------------------------------
103 // @Description This is the initialization function of the ASC0 function
104 // library. It is assumed that the SFRs used by this library
105 // are in its reset state.
106 //
107 //----------------------------------------------------------------------------
108 // @Returnvalue None
109 //
110 //----------------------------------------------------------------------------
111 // @Parameters None
112 //
113 //----------------------------------------------------------------------------
114 // @Date 2007-5-29
115 //
116 //****************************************************************************
117
C166 COMPILER V6.04, ASC0 08/28/2007 17:10:18 PAGE 3
118 // USER CODE BEGIN (Init,1)
119
120 // USER CODE END
121
122 void ASC0_vInit(void)
123 {
124 1 // USER CODE BEGIN (Init,2)
125 1
126 1 // USER CODE END
127 1
128 1 /// -----------------------------------------------------------------------
129 1 /// Configuration of the ASC0 Baudrate Generator:
130 1 /// -----------------------------------------------------------------------
131 1 /// - fractional divider as prescaler for baud rate timer is used
132 1
133 1 ASC0_FDV = 0x00E8; // load ASC0 fractional divider register
134 1
135 1 /// - required baud rate = 9.600 kbaud
136 1 /// - real baud rate = 9.600 kbaud
137 1 /// - deviation = 0.001 %
138 1
139 1 ASC0_BG = 0x003A; // load ASC0 baud rate time reload register
140 1
141 1 /// -----------------------------------------------------------------------
142 1 /// Configuration of the ASC0 Operation Mode:
143 1 /// -----------------------------------------------------------------------
144 1 /// - 8-bit data asychronous operation with one stop bit
145 1 /// - receiver is enabled
146 1 /// - fractional divider is enabled
147 1
148 1 ASC0_CON = 0x0811; // load ASC0 control register
149 1
150 1 /// -----------------------------------------------------------------------
151 1 /// FIFO Configuration:
152 1 /// -----------------------------------------------------------------------
153 1 /// - receive FIFO is disabled
154 1 /// - transmit FIFO is enabled
155 1 /// - transmit interrupt trigger level = 4
156 1
157 1 ASC0_RXFCON = 0x0402; // load ASC0 receive FIFO control register
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -