Project Documentation

Project: 		phytec

Controller: 		C167CR-L
Compiler: 		Tasking C166 V5.0
Memory Model: 	SMALL

Codegenerator: 	DAvE 1-0-0

Date: 			04.02.98 08:50:19

Original startup file:
			Cstart.asm

Modified startup file:
			Start.asm

Generated Files:
			MAIN.C
			MAIN.H
			ASC.C
			ASC.H

Main

Macros:
Functions:

	Function:
		void Project_Init(void)
	Description:
		This function initializes the microcontroller.
	Returnvalue:
		none
	Parameters:
		none

	Function:
		void main(void)
	Description:
		This is the main function.
	Returnvalue:
		none
	Parameters:
		none

Initialization:

	--- 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 ---

	---------- 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

	the initialization of BUSCON0 is made in the Start.asm

	---------- 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

Asynchronous / Synchronous Serial Interface (ASC)

Macros:
Functions:

	Function:
		void ASC_vInit(void)
	Description:
		This function initializes the ASC component. It effects all
		necessary configurations of the SFR, depending on the selected
		operating mode. The configuration determines whether the ASC
		interrupts are to be released, and the priority of the
		released interrupt.
	Returnvalue:
		none
	Parameters:
		none

	Function:
		interrupt (S0TINT) void ASC_viIsrTx(void)
	Description:
		This is the transmit interrupt service routine for the ASC0.
		It is called when the sending of data is terminated
		(S0TIR is set).
		Note:
		It is important that the user adds to this function with
		Application Specific Code. User Code sections are available
		in the function for this purpose.
	Returnvalue:
		none
	Parameters:
		none

Initialization:

	8-bit data asynchronous operation
	one stop bit
	divide clock by reload value + constant
	receiver disabled

	baudrate =  9615,38 Baud

	enable transmit interrupt
	transmit interrupt priority level(ILVL) = 14
	transmit interrupt group level (GLVL) = 0

	use PEC channel 0 for ASC transmit interrupt
	- count = 3
	- byte transfer
	- increment source pointer

	User defined source pointer is selected for PECC Channel 0

	set P3.10 direction control (TXD0 output)