📄 initial.lst
字号:
C51 COMPILER V7.06 INITIAL 11/21/2005 13:47:24 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE INITIAL
OBJECT MODULE PLACED IN .\Output\Initial.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE Code\Initial.c OPTIMIZE(9,SPEED) BROWSE DEBUG OBJECTEXTEND CODE SYMBOLS PRI
-NT(.\Output\Initial.lst) PREPRINT(.\Output\Initial.i) OBJECT(.\Output\Initial.obj)
stmt level source
1 #define __INITIAL__
2
3 #include "Header\Lcd_main.h"
4 #include "reg52.h"
5 #include "Header\Access.h"
6 #include "Header\config.h"
7 #include "intrins.h"
8 #include "Header\Lcd_func.h"
9 #include "Header\Initial.h"
10 #include "Header\OSD.h"
11 #include "Header\Src_Ctrl.h"
12 #include "Header\Frame_Sync.h"
13 //#include "Power_Ctrl.h"
14
15 void MCU_Init(void)
16 {
17 1 #if(MCU_TYPE == MCU_WINBOND)
18 1 IE = 0x00; // Disable all interrupts
19 1 TMOD = 0x11; // Program Timer0 & Timer1 to Mode#1
20 1 TR0 = 0; // Stop Timer0
21 1 TF0 = 0; // Clear Timer0 Overflow Bit
22 1 TL0 = TIME0_COUNTER_LBYTE; // Load Timer0 low-byte (for 20ms)
23 1 TH0 = TIME0_COUNTER_HBYTE; // Load Timer0 high-byte (for 20ms)
24 1 TR1 = 0; // Stop Timer1
25 1 TF1 = 0; // Clear Timer1 Overflow Bit
26 1 TL1 = TIME1_COUNTER_LBYTE; // Load Timer1 low-byte (for 1ms)
27 1 TH1 = TIME1_COUNTER_HBYTE; // Load Timer1 hifh-byte (for 1ms)
28 1 IE = 0x8a; // Enable interrupts of Timer0 and Timer1
29 1 //anson 050519
30 1 M512_PadMode0=0x00; //
31 1 M512_PadMode1=0xff; //
32 1 M512_PadMode2=0xb0; //
33 1 M512_PadMode3=0xcf; //
34 1 M512_PadMode4=0xf2; //
35 1 M512_PadMode5=0x00; //
36 1 // M512_PadMode6=0xbf; //
37 1 M512_PadMode7=0x3f; //
38 1 M512_Option1=0x01;
39 1 #else
IE = 0x00; // Disable all interrupts
TMOD = 0x11; // Program Timer0 & Timer1 to Mode#1
TR0 = 0; // Stop Timer0
TF0 = 0; // Clear Timer0 Overflow Bit
TL0 = TIME0_COUNTER_LBYTE; // Load Timer0 low-byte (for 20ms)
TH0 = TIME0_COUNTER_HBYTE; // Load Timer0 high-byte (for 20ms)
TR1 = 0; // Stop Timer1
TF1 = 0; // Clear Timer1 Overflow Bit
TL1 = TIME1_COUNTER_LBYTE; // Load Timer1 low-byte (for 1ms)
TH1 = TIME1_COUNTER_HBYTE; // Load Timer1 hifh-byte (for 1ms)
IE = 0x86; // Enable interrupts of Timer0 and Timer1
TR0 = 1;
//anson 050519
M512_PadMode0=0x00; //
C51 COMPILER V7.06 INITIAL 11/21/2005 13:47:24 PAGE 2
M512_PadMode1=0xff; //
M512_PadMode2=0xb0; //
M512_PadMode3=0xcf; //
M512_PadMode4=0xf2; //
M512_PadMode5=0x00; //
// M512_PadMode6=0xbf; //
M512_PadMode7=0x3f; //
M512_Option1=0x01;
#endif
65 1 }
66
67 void Firmware_Init(void)
68 {
69 1
70 1 #if(MCU_TYPE == MCU_WINBOND)
71 1 bLIGHT_PWR = LIGHT_OFF;
72 1 bPANEL_PWR = PANEL_OFF;
73 1 bPanel_Status = _OFF;
74 1 #else
MCU_WriteBacklightPower(LIGHT_OFF);
MCU_WritePanelPower(PANEL_OFF);
bPanel_Status = _OFF;
#endif
79 1
80 1 MCU_Init();
81 1 RTDSetBit(HOSTCTRL_02,0xfb,0x00); // RTD turn on
82 1 #if(MCU_TYPE == MCU_WINBOND)
83 1
84 1 #if(RESET_TYPE == RESET_IN)
bRTD_RST = 0;
Delay_Xms(10);
do
{
// Wait for reset complete
bRTD_RST = 1;
Delay_Xms(2);
}
while (!bRTD_RST);
#endif
95 1
96 1 #else
#if(RESET_TYPE == RESET_IN)
MCU_WriteRtdReset(LOW);
Delay_Xms(10);
do
{
// Wait for reset complete
MCU_WriteRtdReset(HIGH);
Delay_Xms(10);
}
while (MCU_ReadRtdReset()!=HIGH);
#endif
#endif
112 1
113 1 RTDRead(ID_REG_00,1,N_INC);
114 1 ucID_Code = Data[0];
115 1
116 1
C51 COMPILER V7.06 INITIAL 11/21/2005 13:47:24 PAGE 3
117 1 RTDCodeW(RTD_PWUP_INI);
118 1
119 1 #if(HDCP_ENABLE)
RTDCodeW(BKSV);
KEYCodeW(HDCP_KEY_A_Port);
#endif
123 1
124 1 RTDSetByte(HOSTCTRL_02, 0x40); // Wake RTD up
125 1 RTDSetByte(DPLL_CTRL_D0, 0x11); // Enable DPLL
126 1
127 1 RTDSetByte(VDIS_SIGINV_21, 0x00 | DISP_EO_SWAP | DISP_RB_SWAP | DISP_ML_SWAP); // DHS, DVS, DEN,
- DCLK MUST NOT be inverted.
128 1
129 1 RTDSetBit(VDIS_CTRL_20, 0xfd, 0x21); // DHS, DVS, DEN, DCLK and data are clamped to 0
130 1
131 1 RTDSetBit(DIS_TIMING0_3A, 0xff, 0x20); // Force display timing enable
132 1 RTDSetBit(DIS_TIMING0_3A, 0xdf, 0x00); // Stop forcing
133 1
134 1 _nop_(); _nop_(); _nop_(); _nop_(); _nop_(); _nop_(); _nop_(); _nop_();
135 1
136 1 RTDSetBit(VDIS_CTRL_20, 0xfe, 0x00); // Stop display timing
137 1
138 1 RTDSetByte(HOSTCTRL_02, 0x42); // Put RTD2020 back into power-saving mode
139 1 RTDSetByte(DPLL_CTRL_D0, 0x10); // Disable DPLL
140 1
141 1 RTDCodeW(RTD_DDC_TABLE);
142 1 RTDCodeW(RTD_IO_INI);
143 1
144 1 #if(!SOURCE_AUTO_SCAN)
PowerDown_VDC();
//Device_Power(VDC_POWER,OFF);
#endif
148 1
149 1 PowerDown_TMDS();
150 1 PowerDown_LVDS();
151 1 //Device_Power(TMDS_POWER,OFF);
152 1 //Device_Power(LVDS_POWER,OFF);
153 1
154 1 Delay_Xms(10);
155 1
156 1 // Check and initial EEPROM if necessary
157 1 Delay_Xms(10);
158 1 Check_EEPROM();
159 1 Delay_Xms(10);
160 1
161 1 // Turn timer0 on. Let's go ~~~
162 1 TR0 = 1;
163 1
164 1
165 1 }
166
167 void Power_Up_Init(void) // Do once when power up
168 {
169 1
170 1 RTDSetBit(HOSTCTRL_02,0xfb,0x00); // RTD turn on
171 1
172 1
173 1 Reset_RTD(); // Initial RTD3000 & OSD
174 1
175 1
176 1
177 1 #if(ADC_DEFFERENTIAL)
C51 COMPILER V7.06 INITIAL 11/21/2005 13:47:24 PAGE 4
178 1 RTDSetBit(ADC_DIFF_MODE_EC,0xff,0x40); //Differential mode
179 1 #else
RTDSetBit(ADC_DIFF_MODE_EC,0xbf,0x00); //Single endded mode
#endif
182 1
183 1
184 1
185 1 #if(MCU_TYPE == MCU_WINBOND)
186 1 bLIGHT_PWR = LIGHT_OFF;
187 1 bPANEL_PWR = PANEL_OFF;
188 1 bPanel_Status = _OFF;
189 1 #else
MCU_WriteBacklightPower(LIGHT_OFF);
MCU_WritePanelPower(PANEL_OFF);
bPanel_Status = _OFF;
#endif
194 1
195 1
196 1 #if(TUNE_APLL)
197 1 ucPE_Max = 0;
198 1 RTDSetByte(DV_TOTAL_STATUS_3D,0x40); //clear PE Max value
199 1 #endif
200 1
201 1 #if(!SOURCE_AUTO_SCAN)
PowerDown_VDC();
//Device_Power(VDC_POWER,OFF);
#endif
205 1
206 1 PowerDown_LVDS();
207 1 //Device_Power(LVDS_POWER,OFF);
208 1
209 1 #if(TMDS_ENABLE)
210 1 RTDSetByte(ANG_PERFORMANCE2_A3, 0x26); //Go about the TMDS impedence match
211 1 RTDSetByte(ANG_PERFORMANCE2_A3, 0x36);
212 1 #endif
213 1
214 1 //RTDSetBit(OVL_CTRL_6D, 0x3f, (stGUD1.FUNCTION & 0x10) ? 0x80 : 0x00);
215 1
216 1 RTDSetBit(OVL_CTRL_6D, 0xc7, (stGUD1.INPUT_SOURCE & 0xe0) >> 2);
217 1
218 1
219 1 #if (SPREAD_SPECTRUM)
220 1
221 1 // RTDSetBit(SPREAD_SPECTRUM_99,0x03,0x00);
222 1 RTDSetBit(DPLL_N_D2,0xff,0x20); //DPLL spread spectrum Enable
223 1
224 1 #endif
225 1
226 1 Init_Input_Source(); // Initial Mode & OSD
227 1 }
228
229 void Reset_RTD(void)
230 {
231 1 #if(MCU_TYPE == MCU_WINBOND)
232 1
233 1 #if(RESET_TYPE == RESET_IN)
bRTD_RST = 0;
Delay_Xms(10);
do
{
// Wait for reset complete
bRTD_RST = 1;
C51 COMPILER V7.06 INITIAL 11/21/2005 13:47:24 PAGE 5
Delay_Xms(6);
}
while (!bRTD_RST);
#endif
244 1
245 1 #else
#if(RESET_TYPE == RESET_IN)
MCU_WriteRtdReset(LOW);
Delay_Xms(10);
do
{
// Wait for reset complete
MCU_WriteRtdReset(HIGH);
Delay_Xms(6);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -