//**************************************************************************** // @Module Main // @Filename MAIN.C // @Project phytec //---------------------------------------------------------------------------- // @Controller Siemens C167CR-L // // @Compiler Keil C166 V3.00 // // @Codegenerator DAvE 1-0-0 // // @Description This file contains the Project initialization function. // //---------------------------------------------------------------------------- // @Date 25.02.98 10:26:45 // //**************************************************************************** /* ****************************************************************************** @Note ****************************************************************************** */ //**************************************************************************** // @Project Includes //**************************************************************************** #include "MAIN.H" //*************************************************************************** // @Global Variables //*************************************************************************** // USER CODE BEGIN (Main,0) // USER CODE END //**************************************************************************** // @Function void Project_Init(void) // //---------------------------------------------------------------------------- // @Description This function initializes the microcontroller. // //---------------------------------------------------------------------------- // @Returnvalue none // //---------------------------------------------------------------------------- // @Parameters none // //---------------------------------------------------------------------------- // @Date 25.02.98 10:26:45 // //**************************************************************************** void Project_Init(void) { /// --- initialization of the SYSCON Register --- /// the following initialization is made in the Start.asm ///- the internal ROM area is mapped to segment 0 ///- the segmentation is enabled (CSP is saved/restored during interrupt entry/exit) ///- the internal ROM is disabled: accesses to the ROM area use the external bus ///- the pin #BHE (byte high enable) is enabled ///- the system clock output is disabled ///- the pin #WR acts as #WRL and pin #BHE acts as #WRH ///- the on-chip X-Peripherals are enabled and can be accessed ///- accesses to the XBUS peripherals are done internally ///- external accesses to the XBUS peripherals are disabled /// --- initialization of the BUSCON 0-4 and ADRRSEL Registers 1-4 --- /// for the Keil Compiler the initialization is made in the Start.asm /// ---------- external bus 0 is enabled ---------- ///- 16-bit demultiplexed bus ///- memory cycle time control: 0 waitstates ///- read/write delay control: activate signal 1 TCL after falling edge of ALE ///- signal configuration: disable READY signal ///- chip select mode: address chip select ///- memory tristate control: no waitstate ///- ALE lengthening control: normal ALE signal /// ---------- external bus 1 is enabled ---------- ///- 16-bit demultiplexed bus ///- memory cycle time control: 0 waitstates ///- read/write delay control: activate signal 1 TCL after falling edge of ALE ///- signal configuration: disable READY signal ///- chip select mode: address chip select ///- memory tristate control: no waitstate ///- ALE lengthening control: normal ALE signal // USER CODE BEGIN (Project_Init,1) // USER CODE END // globally enable interrupts IEN = 1; } //**************************************************************************** // @Function void main(void) // //---------------------------------------------------------------------------- // @Description This is the main function. // //---------------------------------------------------------------------------- // @Returnvalue none // //---------------------------------------------------------------------------- // @Parameters none // //---------------------------------------------------------------------------- // @Date 25.02.98 10:26:45 // //**************************************************************************** void main(void) { // USER CODE BEGIN (Main,1) // USER CODE END Project_Init(); // USER CODE BEGIN (Main,2) // USER CODE END }