该代码包介绍了基于51系列单片机平台是实现时间触发的嵌入式系统的各种应用的代码

源代码在线查看: main.lst

软件大小: 3143 K
上传用户: danlong
关键词: 代码 51系列 单片机 时间触发
下载地址: 免注册下载 普通下载 VIP

相关代码

				C51 COMPILER V6.10  MAIN                                                                   04/19/2001 13:56:50 PAGE 1   
				
				
				C51 COMPILER V6.10, COMPILATION OF MODULE MAIN
				OBJECT MODULE PLACED IN .\MAIN.OBJ
				COMPILER INVOKED BY: C:\KEIL\C51\BIN\C51.EXE .\MAIN.C OPTIMIZE(6,SIZE) BROWSE DEBUG OBJECTEXTEND
				
				stmt level    source
				
				   1          /*------------------------------------------------------------------*-
				   2          
				   3             Main.c (v1.00)
				   4          
				   5            ------------------------------------------------------------------
				   6          
				   7             Test program for shared-clock (UART) scheduler for 89C52, etc.
				   8          
				   9             *** (LOCAL / RS-232) SLAVE CODE ***
				  10          
				  11             --- HARDWARE ASSUMED ---
				  12             --- 89C52 (or any 8051/52 device with T2)
				  13             --- DS1232 (or similar) external watchdog [see text for conns]
				  14          
				  15             *** Both Master and Slave share the same tick rate (5 ms) ***
				  16             *** - See Master code for details ***
				  17          
				  18             Required linker options (see Chapter 14 for details):
				  19          
				  20             OVERLAY (main ~ (LED_Flash_Update,TRAFFIC_LIGHTS_Update), 
				  21             SCH_Dispatch_Tasks ! (LED_Flash_Update,TRAFFIC_LIGHTS_Update))
				  22           
				  23          
				  24             COPYRIGHT
				  25             ---------
				  26          
				  27             This code is from the book:
				  28          
				  29             PATTERNS FOR TIME-TRIGGERED EMBEDDED SYSTEMS by Michael J. Pont 
				  30             [Pearson Education, 2001; ISBN: 0-201-33138-1].
				  31          
				  32             This code is copyright (c) 2001 by Michael J. Pont.
				  33           
				  34             See book for copyright details and other information.
				  35          
				  36          -*------------------------------------------------------------------*/
				  37          
				  38          #include "Main.h"
				  39          
				  40          #include "LED_Flas.h"
				  41          #include "SCU_As.H"
				  42          #include "TLight_B.h"
				  43          
				  44          /* ............................................................... */
				  45          /* ............................................................... */
				  46          
				  47          void main(void)
				  48             {
				  49   1         // Set up the scheduler 
				  50   1         SCU_A_SLAVE_Init_T1(9600);
				  51   1      
				  52   1         // Set up the flash LED task (demo purposes)
				  53   1         LED_Flash_Init();
				  54   1      
				  55   1         // Prepare for the traffic light task
				C51 COMPILER V6.10  MAIN                                                                   04/19/2001 13:56:50 PAGE 2   
				
				  56   1         TRAFFIC_LIGHTS_Init();
				  57   1      
				  58   1         // Add a 'flash LED' task (on for 1000 ms, off for 1000 ms)
				  59   1         SCH_Add_Task(LED_Flash_Update, 0, 200);
				  60   1      
				  61   1         // Add a 'traffic lights' task
				  62   1         SCH_Add_Task(TRAFFIC_LIGHTS_Update, 10, 200);
				  63   1      
				  64   1         // Start the scheduler
				  65   1         SCU_A_SLAVE_Start();
				  66   1      
				  67   1         while(1)
				  68   1            {
				  69   2            SCH_Dispatch_Tasks();
				  70   2            }
				  71   1         }
				  72          
				  73          /*------------------------------------------------------------------*-
				  74            ---- END OF FILE -------------------------------------------------
				  75          -*------------------------------------------------------------------*/
				  76          
				
				
				MODULE INFORMATION:   STATIC OVERLAYABLE
				   CODE SIZE        =     51    ----
				   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)
							

相关资源