📄 mcu.lst
字号:
C51 COMPILER V7.50 MCU 07/03/2006 14:17:10 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE MCU
OBJECT MODULE PLACED IN ..\..\OUTPUT\NTSC_SOUTH\Mcu.obj
COMPILER INVOKED BY: d:\Keil\C51\BIN\C51.EXE ..\..\KERNEL\Mcu.c OPTIMIZE(9,SIZE) BROWSE ORDER INCDIR(..\..\INC\;..\..\UI
-\NTSC_SOUTH\) DEFINE(PABLO,MCU_MTV412M,OLGA) DEBUG OBJECTEXTEND PRINT(..\..\OUTPUT\NTSC_SOUTH\Mcu.lst) OBJECT(..\..\OUTP
-UT\NTSC_SOUTH\Mcu.obj)
line level source
1 // Common
2 #include "define.h"
3 #include "mcu.h"
4 #include "board.h"
5 #include "global.h"
6 #include "common.h"
7 #include "userdef.h"
8 // External
9 #include "debug.h"
10 #include "userpref.h"
11
12 // Internal
13 #include "uart.h"
14
15 void LEDFlash(void)
16 {
17 1 if(_bit0_(LED_POWER))ClrLed_POWER();
18 1 else SetLed_POWER();
19 1 }
20
21 void LEDReadFlash(void)
22 {
23 1 if(_bit0_(LED_READING))ClrLed_READING();
24 1 else SetLed_READING();
25 1 }
26
27 void LEDWriteFlash(void)
28 {
29 1 if(_bit0_(LED_WRITING))ClrLed_WRITING();
30 1 else SetLed_WRITING();
31 1 }
32
33
34 void LEDFlashDelay(BYTE num)
35 {
36 1 if(num<=0)num=1;
37 1 do
38 1 {
39 2 LEDFlash();
40 2 num--;
41 2 Delay1ms(500);
42 2 //printf("\r\n %d", num);
43 2 }while(num);
44 1 }
45
46
47 #ifdef MCU_MTV412M
48 BOOL Enter_MTV412_ISP(void)
49 {
50 1 ES = 1; // Disable uart interrupt
51 1
52 1 PADMOD2 = 0x87;//P4.0~P4.2 I/O,BIT7 =>iic ,P3.4&P3.5 I/O,OTHER PWM
53 1 SLVBADDR = 0xA6;
C51 COMPILER V7.50 MCU 07/03/2006 14:17:10 PAGE 2
54 1
55 1 IE = 0;
56 1 WDT = 0;
57 1 ISPSLV = 0x7C; // ISP Slave address
58 1 ISPEN = 0x93; // Enable MTV312 ISP function
59 1 PCON = 0x01; // MCU Idle mode
60 1 while (1);
61 1 return TRUE;
62 1 }
63 #endif
64
65 #if 0
void mcuCheckISPWhenPowerUp(void)
{
BYTE tmp1,tmp2;
tmp1=tmp2=255;
MADC = 0x82;//AD1
Delay1ms(2);
tmp1 = MADC;
MADC = 0x81;//AD0
Delay1ms(2);
tmp2 = MADC;
if ((tmp1 <= (0x24+15)) && (tmp2 <= (0x59+15)))
{// CH+ V0l-
putstr("ISP Now");
Enter_MTV412_ISP();
}
}
#endif
83 void McuInit(void)
84 {
85 1
86 1 #ifdef MCU_MTV412M
87 1 //PIN config
88 1 //Note:P4 is output only!
89 1 PADMOD0 = 0x04; //P6 setting ,P6.2is AD, P6.0~P6.1,P6.3~P6.7 is general I/O,20060513
90 1 PADMOD1 = 0x7F; //P5 setting ,P5.0~P5.6 I/O
91 1 PADMOD2 = 0x07; //P4.0~P4.2 I/O,P3.0&P3.1 RS232 ,P3.4&P7.7 I/O,
92 1 //P7.5&P7.6 I/O,OTHER PWM
93 1 PADMOD3 = 0x20; //P5 setting ,P5.5 Output,P5.0~P5.4,P5.6 input,20060513
94 1 PADMOD4 = 0xFB; //P6 setting ,P6.2 input, P6.0~P6.1,P6.3~P6.7 output,20060513
95 1 PADMOD5 = 0x00; //P1 setting ,P1 8051 standard I/O
96 1 PADMOD6 = 0x17; //P7 setting ,P7.0,P7.1,P7.2,P7.4 I/O; P7.3 Hsync
97 1 PADMOD7 = 0xF4; //P7 setting ,P7.7~P7.4,P7.2 Output; P7.3,P7.1~P7.0 Input
98 1 g_PadMod7 = 0xF4;
99 1 //other option
100 1 INTEN = 0x00; //not Enable Recive B interrupt //0x40->enable isp
101 1 HVINTEN = 0x00; //not Enable H V sync interrupt
102 1 WDT = 0x00; //not Enable Watchdog timer
103 1 SLVBADDR = 0xA6;
104 1 OPTION = 0x60; //0x20->double speed ,253 step
105 1
106 1 P3_2 = 1; // INT0 IR
107 1 IE0 = 0;
108 1 P1 = 0xff;//keyboard and panel select
109 1 HVCTR0 = 0x40;//0xc0;//MCU HSync Input type CSync
110 1 HVCTR2 = 0x00;//0x30
111 1 HVCTR3 = 0x78;
112 1 HVCTR4 = 0x00;
113 1 #endif
114 1
115 1 #ifdef MCU_W78E65
C51 COMPILER V7.50 MCU 07/03/2006 14:17:10 PAGE 3
CHPENR = 0x87; // enable CHPCON register write attribute
CHPENR = 0x59; // enable CHPCON register write attribute
CHPCON = 0x18; // disable all control function(enable AUX-RAM)
CHPENR = 0x00; // disable CHPCON write attribute
#endif
121 1
122 1 #ifdef MCU_W77E532
SetBankSwitchPin();
PMR = (PMR | _BIT0) & (~_BIT2);
CKCON = 0x03;
#endif
127 1 uartInitialize(); // initialze uart
128 1 //gVersionMessage(); // version message
129 1
130 1 #if ( BOARD_TYPE_SEL == BD_SHENZHEN_DEMO )
131 1 //mcuCheckISPWhenPowerUp();
132 1 #endif
133 1
134 1 isrInitializeInterrupt(); // initialize MCU interrupt
135 1 usrCheckEEPROM(); // check EEPROM reset
136 1 InitVariable(); // intialize global variable
137 1 }
138
139 void PowerOnInitial(void)
140 {
141 1 LEDFlashDelay(5);
142 1 LEDFlash();
143 1
144 1 LEDFlash();
145 1 LEDFlash();
146 1
147 1
148 1 LEDFlash();
149 1
150 1 SetLed_POWER();//msLEDG_PIN = 1;
151 1 }
152
153 //Copy data TV Ram -> Mcu Ram
154 void GetDataTV_McuRam(void)
155 {
156 1 }
157 //Copy data Mcu Ram -> TV Ram
158 void GetDataMcuRam_TV(void)
159 {
160 1 }
161
162
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 235 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- 1
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 + -