DAvE's Project Documentation

Project: 		Test_TC1775B.dav

Controller: 		TC1775 B-Step
Compiler: 		Tasking

Date: 			12.06.2002 17:31:48

Please read this document carefully and note
the red-colored hints.

If you miss a file in the generated files list
maybe you have forgotten to select the
initialisation function of the related module.

Generated Files:
			TC1775BREGS.H
			MAIN.H
			MAIN.C
			IO.H
			IO.C
			ASC0.H
			ASC0.C
			ASC1.H
			ASC1.C
			CAN.H
			CAN.C
			TEST_TC1775B.ASM

Project Settings

Macros:

	Macro:
		MAIN_vSetENDINIT()
	Description:
		This macro sets the EndInit bit, which controls access to
		system critical registers. Setting the EndInit bit locks
		all EndInit protected registers.
	Returnvalue:
		None
	Parameters:
		None

	Macro:
		MAIN_vResetENDINIT()
	Description:
		This macro clears the EndInit bit, which controls access to
		system critical registers. Clearing the EndInit bit unlocks
		all EndInit protected registers. Modifications of the
		EndInit bit are monitored by the watchdog timer such that
		after clearing EndInit, the watchdog timer enters a defined
		time-out mode; EndInit must be set again before the
		time-out expires.
	Returnvalue:
		None
	Parameters:
		None
Functions:

	Function:
		void MAIN_vInit(void)
	Description:
		This function initializes the microcontroller.
	Returnvalue:
		None
	Parameters:
		None

	Function:
		void MAIN_vWriteWDTCON0(uword uwValue)
	Description:
		This function writes the parameter uwValue to the WDT_CON0
		register which is password protected.
	Returnvalue:
		None
	Parameters:
		uwValue:
		Value for the WDTCON0 register

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

Initialization:

	Begin of Important Settings for the Start-Up File
	All following settings must be set in the start-up file. You can use
	DAvE's project file (*.dpt) to include this register values into your
	compiler EDE.

	Bus Control Unit (BCU):
	BCU starvation protection is enabled
	BCU power saving is disabled
	the debug trace is enabled. Error information is captured in
	register BCEADD, BCEDAT and BCECON
	sample period of request for starvation protection: 64
	BCU bus time-out value: 65536 cycles

	this register must be set in the start-up file
	BCU_CON  =  0x4009FFFF;

	Program Memory Unit (PMU):
	ICACHE settings:
	the instruction cache is enabled
	the instruction cache is bypassed

	this register must be set in the start-up file
	PMU_CON  =  0x04003F06;

	external flash settings:
	min. wait cycles between consecutive burst accesses from external
	Flash: 7 wait cycles
	read wait cycles between the initial address and the first data
	cycle: 7 wait cycles
	two address cycles
	two data cycles
	unlimeted numbers of linear Flash burst data cycles
	max. number of burst data cycle: 1 data accesses
	#WAIT input operates as a wait data bus function on bursts
	#CS0 is activated during burst mode

	this register must be set in the start-up file
	PMU_EIFCON  =  0x0000005F;

	External Bus Unit (EBU):

	enable the EBU module

	this register must be set in the start-up file
	EBU_CLC  =  0x00000000;

	External Arbitration:
	EBU is external master
	arbitration inputs are asynchronous
	external bus will not be locked after EBU gained ownership
	disable external accesses to FPI bus
	disable external address extension register reconfiguration
	all accesses from external master are performed in user mode
	disable Time-out
	chip select triggered driver turn-around inactive cycles: 0
	read-write triggered driver turn-around inactive cycles: 0

	this register must be set in the start-up file
	EBU_CON  =  0x00000060;

	Overlay Memory:
	do not activate chip select #CSOVL on an access to memory region 0
	do not activate chip select #CSOVL on an access to memory region 1
	do not activate chip select #CSOVL on an access to memory region 2
	do not activate chip select #CSOVL on an access to memory region 3

	this register must be set in the start-up file
	EBU_EMUCON  =  0x00000000;

	Address Region 0:
	enable memory region 0
	length of the region: 4 Mbyte
	relevant start address (A31 : A0): 0xB0000000
	writes to memory region are enabled
	address generation: demuxed address mode
	external device data width: 32-bit
	address latch enable (ALE) duration: 3 cycles
	byte control signal timing mode: chipselect mode
	cycle 0 is not generated
	variable waitstate insertion is disabled
	pin #WAIT is low active
	read cycle multiplier is 1
	read access waitstates: 48
	cycle multiplier is 16
	write access waitstates: 112
	hold/pause cycle waitstates: 48
	recovery cycles waitstates: 48

	this register must be set in the start-up file
	EBU_ADDSEL0  =  0xB0000051;
	EBU_BUSCON0  =  0x600261FF;

	Address Region 1:
	enable memory region 1
	length of the region: 1 Mbyte
	relevant start address (A31 : A0): 0xA0000000
	writes to memory region are enabled
	address generation: demuxed address mode
	external device data width: 32-bit
	address latch enable (ALE) duration: 3 cycles
	byte control signal timing mode: chipselect mode
	cycle 0 is not generated
	variable waitstate insertion is disabled
	pin #WAIT is low active
	read cycle multiplier is 1
	read access waitstates: 48
	cycle multiplier is 16
	write access waitstates: 112
	hold/pause cycle waitstates: 48
	recovery cycles waitstates: 48

	this register must be set in the start-up file
	EBU_ADDSEL1  =  0xA0000071;
	EBU_BUSCON1  =  0x600261FF;

	Address Region 2:
	enable memory region 2
	length of the region: 1 Mbyte
	relevant start address (A31 : A0): 0xA0100000
	writes to memory region are enabled
	address generation: demuxed address mode
	external device data width: 32-bit
	address latch enable (ALE) duration: 3 cycles
	byte control signal timing mode: chipselect mode
	cycle 0 is not generated
	variable waitstate insertion is disabled
	pin #WAIT is low active
	read cycle multiplier is 1
	read access waitstates: 48
	cycle multiplier is 16
	write access waitstates: 112
	hold/pause cycle waitstates: 48
	recovery cycles waitstates: 48

	this register must be set in the start-up file
	EBU_ADDSEL2  =  0xA0100071;
	EBU_BUSCON2  =  0x600261FF;

	Address Region 3:
	enable memory region 3
	length of the region: 8 Mbyte
	relevant start address (A31 : A0): 0xB0800000
	writes to memory region are enabled
	address generation: demuxed address mode
	external device data width: 16-bit
	address latch enable (ALE) duration: 3 cycles
	byte control signal timing mode: chipselect mode
	cycle 0 is not generated
	variable waitstate insertion is disabled
	pin #WAIT is low active
	read cycle multiplier is 16
	read access waitstates: 2032
	cycle multiplier is 16
	write access waitstates: 112
	hold/pause cycle waitstates: 48
	recovery cycles waitstates: 48

	this register must be set in the start-up file
	EBU_ADDSEL3  =  0xB0800041;
	EBU_BUSCON3  =  0x60C1FFFF;

	Emulator Address Region :
	enable emulator memory region
	length of the region: 16 Mbyte
	relevant start address (A31 : A0): 0xBE000000
	writes to memory region are enabled
	address generation: demuxed address mode
	external device data width: 32-bit
	address latch enable (ALE) duration: 0 cycles
	byte control signal timing mode: chipselect mode
	cycle 0 is generated
	asynchronous waitstate insertion
	pin #WAIT is low active
	read cycle multiplier is 1
	read access waitstates: 1
	cycle multiplier is 1
	write access waitstates: 2
	hold/pause cycle waitstates: 0
	recovery cycles waitstates: 0

	this register must be set in the start-up file
	EBU_EMUAS  =  0xBE000031;
	EBU_EMUBC  =  0x00160280;

	End of Important Settings for the Start-Up File

	Clock System:
	- external clock frequency: 16,000 MHz
	- PLL operation (pin BYPASS = 0)
	- clock factor (N-factor): 10 (pins CLKSEL[2:0] = 0x2)
	- VCO output frequency: 160,000 MHz
	- clock divider (K-factor): 4
	- system clock: 40,000 MHz

	Interrupt System:
	- four arbitration cycles (max. 255 interrupt sources)
	- two clocks per arbitration cycle

	Peripheral Control Processor (PCP):
	- four arbitration cycles (max. 255 PCP channels)
	- two clocks per arbitration cycle
	- use Full Context save area (R[0] - R[7])
	- channel start at context PC
	- the PCP error interrupt is disabled
	- PRAM partitioning is disabled
	- channel watchdog is disabled

	System Start Conditions:

	- the CPU interrupt system is globally disabled

	- the PCP interrupt system is globally disabled

Parallel Ports

Macros:

	Macro:
		IO_ubReadPin(PinName)
	Description:
		This macro returns the status of the chosen portpin.
		Note:
		See the 'Defines for the parameter PinName' section in this
		header file for the available definitions for the parameter
		PinName.
	Returnvalue:
		Status of the chosen portpin
	Parameters:
		PinName:
		Pin to be read

	Macro:
		IO_vSetPin(PinName)
	Description:
		This macro sets the chosen portpin to '1'.
		Note:
		See the 'Defines for the parameter PinName' section in this
		header file for the available definitions for the parameter
		PinName.
	Returnvalue:
		None
	Parameters:
		PinName:
		Pin to be set to '1'

	Macro:
		IO_vResetPin(PinName)
	Description:
		This macro sets the chosen portpin to '0'.
		Note:
		See the 'Defines for the parameter PinName' section in this
		header file for the available definitions for the parameter
		PinName.
	Returnvalue:
		None
	Parameters:
		PinName:
		Pin to be set to '0'

	Macro:
		IO_vTogglePin(PinName)
	Description:
		This marco toggles the chosen portpin.
		Note:
		See the 'Defines for the parameter PinName' section in this
		header file for the available definitions for the parameter
		PinName.
	Returnvalue:
		None
	Parameters:
		PinName:
		Pin to be toggled

	Macro:
		IO_vSetPinIn(PinName)
	Description:
		The chosen portpin is configured as input.
		Note:
		See the 'Defines for the parameter PinName' section in this
		header file for the available definitions for the parameter
		PinName.
	Returnvalue:
		None
	Parameters:
		PinName:
		Pin to be set to input

	Macro:
		IO_vSetPinOut(PinName)
	Description:
		The chosen portpin is configured as output.
		Note:
		See the 'Defines for the parameter PinName' section in this
		header file for the available definitions for the parameter
		PinName.
	Returnvalue:
		None
	Parameters:
		PinName:
		Pin to be set to output
Functions:

	Function:
		void IO_vInit(void)
	Description:
		This is the initialization function of the IO function
		library. It is assumed that the SFRs used by this library
		are in its reset state.
		Note:
		Alternate outputs are set in their own initialization
		function.
	Returnvalue:
		None
	Parameters:
		None

Initialization:

	Configuration of Port P0:
	P0.0:
	- is used as alternate output for the EBU address/data line (AD0)
	- pull device is disabled (tristate)
	P0.1:
	- is used as alternate output for the EBU address/data line (AD1)
	- pull device is disabled (tristate)
	P0.2:
	- is used as alternate output for the EBU address/data line (AD2)
	- pull device is disabled (tristate)
	P0.3:
	- is used as alternate output for the EBU address/data line (AD3)
	- pull device is disabled (tristate)
	P0.4:
	- is used as alternate output for the EBU address/data line (AD4)
	- pull device is disabled (tristate)
	P0.5:
	- is used as alternate output for the EBU address/data line (AD5)
	- pull device is disabled (tristate)
	P0.6:
	- is used as alternate output for the EBU address/data line (AD6)
	- pull device is disabled (tristate)
	P0.7:
	- is used as alternate output for the EBU address/data line (AD7)
	- pull device is disabled (tristate)
	P0.8:
	- is used as alternate output for the EBU address/data line (AD8)
	- pull device is disabled (tristate)
	P0.9:
	- is used as alternate output for the EBU address/data line (AD9)
	- pull device is disabled (tristate)
	P0.10:
	- is used as alternate output for the EBU address/data line (AD10)
	- pull device is disabled (tristate)
	P0.11:
	- is used as alternate output for the EBU address/data line (AD11)
	- pull device is disabled (tristate)
	P0.12:
	- is used as alternate output for the EBU address/data line (AD12)
	- pull device is disabled (tristate)
	P0.13:
	- is used as alternate output for the EBU address/data line (AD13)
	- pull device is disabled (tristate)
	P0.14:
	- is used as alternate output for the EBU address/data line (AD14)
	- pull device is disabled (tristate)
	P0.15:
	- is used as alternate output for the EBU address/data line (AD15)
	- pull device is disabled (tristate)

	Configuration of Port P1:
	P1.0:
	- is used as alternate output for the EBU address/data line (AD16)
	- pull device is disabled (tristate)
	P1.1:
	- is used as alternate output for the EBU address/data line (AD17)
	- pull device is disabled (tristate)
	P1.2:
	- is used as alternate output for the EBU address/data line (AD18)
	- pull device is disabled (tristate)
	P1.3:
	- is used as alternate output for the EBU address/data line (AD19)
	- pull device is disabled (tristate)
	P1.4:
	- is used as alternate output for the EBU address/data line (AD20)
	- pull device is disabled (tristate)
	P1.5:
	- is used as alternate output for the EBU address/data line (AD21)
	- pull device is disabled (tristate)
	P1.6:
	- is used as alternate output for the EBU address/data line (AD22)
	- pull device is disabled (tristate)
	P1.7:
	- is used as alternate output for the EBU address/data line (AD23)
	- pull device is disabled (tristate)
	P1.8:
	- is used as alternate output for the EBU address/data line (AD24)
	- pull device is disabled (tristate)
	P1.9:
	- is used as alternate output for the EBU address/data line (AD25)
	- pull device is disabled (tristate)
	P1.10:
	- is used as alternate output for the EBU address/data line (AD26)
	- pull device is disabled (tristate)
	P1.11:
	- is used as alternate output for the EBU address/data line (AD27)
	- pull device is disabled (tristate)
	P1.12:
	- is used as alternate output for the EBU address/data line (AD28)
	- pull device is disabled (tristate)
	P1.13:
	- is used as alternate output for the EBU address/data line (AD29)
	- pull device is disabled (tristate)
	P1.14:
	- is used as alternate output for the EBU address/data line (AD30)
	- pull device is disabled (tristate)
	P1.15:
	- is used as alternate output for the EBU address/data line (AD31)
	- pull device is disabled (tristate)

	Configuration of Port P2:
	P2.0:
	- is used as alternate output for the EBU address line (A0)
	- pull device is disabled (tristate)
	P2.1:
	- is used as alternate output for the EBU address line (A1)
	- pull device is disabled (tristate)
	P2.2:
	- is used as alternate output for the EBU address line (A2)
	- pull device is disabled (tristate)
	P2.3:
	- is used as alternate output for the EBU address line (A3)
	- pull device is disabled (tristate)
	P2.4:
	- is used as alternate output for the EBU address line (A4)
	- pull device is disabled (tristate)
	P2.5:
	- is used as alternate output for the EBU address line (A5)
	- pull device is disabled (tristate)
	P2.6:
	- is used as alternate output for the EBU address line (A6)
	- pull device is disabled (tristate)
	P2.7:
	- is used as alternate output for the EBU address line (A7)
	- pull device is disabled (tristate)
	P2.8:
	- is used as alternate output for the EBU address line (A8)
	- pull device is disabled (tristate)
	P2.9:
	- is used as alternate output for the EBU address line (A9)
	- pull device is disabled (tristate)
	P2.10:
	- is used as alternate output for the EBU address line (A10)
	- pull device is disabled (tristate)
	P2.11:
	- is used as alternate output for the EBU address line (A11)
	- pull device is disabled (tristate)
	P2.12:
	- is used as alternate output for the EBU address line (A12)
	- pull device is disabled (tristate)
	P2.13:
	- is used as alternate output for the EBU address line (A13)
	- pull device is disabled (tristate)
	P2.14:
	- is used as alternate output for the EBU address line (A14)
	- pull device is disabled (tristate)
	P2.15:
	- is used as alternate output for the EBU address line (A15)
	- pull device is disabled (tristate)

	Configuration of Port P3:
	P3.0:
	- is used as alternate output for the EBU address line (A16)
	- pull device is disabled (tristate)
	P3.1:
	- is used as alternate output for the EBU address line (A17)
	- pull device is disabled (tristate)
	P3.2:
	- is used as alternate output for the EBU address line (A18)
	- pull device is disabled (tristate)
	P3.3:
	- is used as alternate output for the EBU address line (A19)
	- pull device is disabled (tristate)
	P3.4:
	- is used as alternate output for the EBU address line (A20)
	- pull device is disabled (tristate)
	P3.5:
	- is used as alternate output for the EBU address line (A21)
	- pull device is disabled (tristate)
	P3.6:
	- is used as alternate output for the EBU address line (A22)
	- pull device is disabled (tristate)
	P3.7:
	- is used as alternate output for the EBU address line (A23)
	- pull device is disabled (tristate)
	P3.8:
	- is used as alternate output for the EBU address line (A24)
	- pull device is disabled (tristate)
	P3.9:
	- is used as alternate output for the EBU address line (A25)
	- pull device is disabled (tristate)
	P3.10:
	- is used as alternate output for the EBU chip select output line
	(#CS3)
	- pull-up device is assigned
	P3.11:
	- is used as alternate output for the EBU chip select output line
	(#CS2)
	- pull-up device is assigned
	P3.12:
	- is used as alternate output for the EBU chip select output line
	(#CS1)
	- pull-up device is assigned
	P3.13:
	- is used as alternate output for the EBU chip select output line
	(#CS0)
	- pull-up device is assigned
	P3.14:
	- is used as alternate output for the EBU emulator chip select output
	line (#CSEMU)
	- pull-up device is assigned
	P3.15:
	- is used as alternate output for the EBU emulator overlay memory chip
	select line (#CSOVL)
	- pull-up device is assigned

	Configuration of Port P4:
	P4.0:
	- is used as alternate output for the EBU read control (#RD)
	- pull-up device is assigned
	P4.1:
	- is used as alternate output for the EBU write control (RD/#WR)
	- pull-up device is assigned
	P4.2:
	- is used as alternate output for the EBU address latch enable output
	(ALE)
	- pull-down device is assigned
	P4.3:
	- is used as alternate output for the EBU address valid output (#ADV)
	- pull-up device is assigned
	P4.4:
	- is used as alternate output for the EBU byte control line 4 (#BC4)
	- pull-up device is assigned
	P4.5:
	- is used as alternate output for the EBU byte control line 5 (#BC5)
	- pull-up device is assigned
	P4.6:
	- is used as alternate output for the EBU byte control line 6 (#BC6)
	- pull-up device is assigned
	P4.7:
	- is used as alternate output for the EBU byte control line 7 (#BC7)
	- pull-up device is assigned
	P4.8:
	- is used as alternate input for the EBU wait input / end of burst
	input (#WAIT/#IND)
	- pull-up device is assigned
	P4.9:
	- is used as alternate output for the EBU burst address advance output
	(#BAA)
	- pull-up device is assigned
	P4.10:
	- is used as alternate input for the EBU chip select FPI input (#CSFPI)
	- pull-up device is assigned
	P4.11:
	- is used as alternate input for the EBU hold request input (#HOLD)
	- pull-up device is assigned
	P4.12:
	- is used as alternate output for the EBU hold acknowledge
	input/output (#HLDA)
	- pull-up device is assigned
	P4.13:
	- is used as alternate output for the EBU bus request output (#BREQ)
	- pull-up device is assigned
	P4.14:
	- is used as alternate output for the EBU code fetch status output
	(#CODE)
	- pull-up device is assigned
	P4.15:
	- is used as alternate output for the EBU supervisor mode output (SVM)
	- pull-up device is assigned

	Configuration of Port P5:
	- no pin of port P5 is used

	Configuration of Port P8:
	P8.0:
	- is used as general input
	- pull device is disabled (tristate)
	- input threshold type: TTL input
	- output edge characteristic: normal timing
	- output driver characteristic: high current mode
	P8.1:
	- is used as general input
	- pull device is disabled (tristate)
	- input threshold type: TTL input
	- output edge characteristic: normal timing
	- output driver characteristic: high current mode

	Configuration of Port P9:
	- no pin of port P9 is used

	Configuration of Port P10:
	P10.0:
	- is used as general purpose output
	- push/pull output is selected
	- the pin status is low level
	- pull-up device is assigned
	- input threshold type: TTL input
	- output edge characteristic: normal timing
	- output driver characteristic: high current mode

	Configuration of Port P11:
	- no pin of port P11 is used

	Configuration of Port P12:
	P12.12:
	- is used as alternate input for the ASC0 receive input signal
	(ASC0_RXD)
	- pull device is disabled (tristate)
	- input threshold type: TTL input
	- output edge characteristic: normal timing
	- output driver characteristic: high current mode
	P12.13:
	- is used as alternate output for the ASC0 transmit output signal
	(ASC0_TXD)
	- push/pull output is selected
	- pull device is disabled (tristate)
	- input threshold type: TTL input
	- output edge characteristic: normal timing
	- output driver characteristic: high current mode
	P12.14:
	- is used as alternate input for the ASC1 receive input signal
	(ASC1_RXD)
	- pull device is disabled (tristate)
	- input threshold type: TTL input
	- output edge characteristic: normal timing
	- output driver characteristic: high current mode
	P12.15:
	- is used as alternate output for the ASC1 transmit output signal
	(ASC1_TXD)
	- push/pull output is selected
	- pull device is disabled (tristate)
	- input threshold type: TTL input
	- output edge characteristic: normal timing
	- output driver characteristic: high current mode

	Configuration of Port P13:
	P13.12:
	- is used as alternate input for the CAN0 receive input signal
	(CAN0_RXD)
	- pull device is disabled (tristate)
	- input threshold type: TTL input
	- output edge characteristic: normal timing
	- output driver characteristic: high current mode
	P13.13:
	- is used as alternate output for the CAN0 transmitter output signal
	(CAN0_TXD)
	- push/pull output is selected
	- pull device is disabled (tristate)
	- input threshold type: TTL input
	- output edge characteristic: normal timing
	- output driver characteristic: high current mode
	P13.14:
	- is used as alternate input for the CAN1 receive input signal
	(CAN1_RXD)
	- pull device is disabled (tristate)
	- input threshold type: TTL input
	- output edge characteristic: normal timing
	- output driver characteristic: high current mode
	P13.15:
	- is used as alternate output for the CAN1 transmitter output signal
	(CAN1_TXD)
	- push/pull output is selected
	- pull device is disabled (tristate)
	- input threshold type: TTL input
	- output edge characteristic: normal timing
	- output driver characteristic: high current mode

Asynchronous Synchronous Serial Interface 0 (ASC0)

Macros:

	Macro:
		ASC0_ubTxBufFree()
	Description:
		This macro can be used for checking the status of the
		transmit buffer register. The transmit buffer may only be
		written to if it is empty, this implies that the previous
		content of the transmit buffer have been loaded into the
		transmit shift register.
	Returnvalue:
		0 if buffer is not empty, else 1
	Parameters:
		None

	Macro:
		ASC0_ubRxDataReady()
	Description:
		This macro can be used for calling the status of the ASC0
		receiver interrupt flag. This is to recognize that the ASC0
		received a byte. If a byte has been received, the function
		ASC0_usGetData must be called.
	Returnvalue:
		0 receive data is invalid, else 1
	Parameters:
		None
Functions:

	Function:
		void ASC0_vInit(void)
	Description:
		This is the initialization function of the ASC0 function
		library. It is assumed that the SFRs used by this library
		are in its reset state.
	Returnvalue:
		None
	Parameters:
		None

	Function:
		void ASC0_vSendData(ushort usData)
	Description:
		This function writes a send data initialization word into
		the transmit buffer register.
		Note:
		In a multiprocessor system the master with this function
		has the possibility to send data to the selected slave. To
		achieve this, the 9th bit must set on zero.
	Returnvalue:
		None
	Parameters:
		usData:
		Data to be send

	Function:
		ushort ASC0_usGetData(void)
	Description:
		This function reads out the content of the receive buffer
		register which contains the received data.
	Returnvalue:
		data that has been received
	Parameters:
		None

Initialization:

	Configuration of the Module Clock:
	- enable the ASC0 module
	- clock divider for normal operation mode: System clock / 1 (= 40,0000
	MHz; 25,000 ns )
	- the ASC0 module is stopped during sleep mode

	Configuration of the ASC0 Baudrate Generator:
	- the ASC0 module clock is 40 MHz
	- additionally reduce serial clock to 2
	- required baud rate = 19,200 kbaud
	- real baud rate     = 19,231 kbaud
	- deviation          = 0,160 %

	Configuration of the ASC0 Operation Mode:
	- 8-bit data asychronous operation with one stop bit

	- receiver is enabled

	Configuration of the used ASC0 Port Pins:

	- P12.13 is used for ASC0 transmit output signal (ASC0_TXD)
	- P12.12 is used for ASC0 receive input signal (ASC0_RXD)

	Configuration of the used ASC0 Interrupts:

Asynchronous Synchronous Serial Interface 1 (ASC1)

Macros:

	Macro:
		ASC1_ubTxBufFree()
	Description:
		This macro can be used for checking the status of the
		transmit buffer register. The transmit buffer may only be
		written to if it is empty, this implies that the previous
		content of the transmit buffer have been loaded into the
		transmit shift register.
	Returnvalue:
		0 if buffer is not empty, else 1
	Parameters:
		None

	Macro:
		ASC1_ubRxDataReady()
	Description:
		This macro can be used for calling the status of the ASC1
		receiver interrupt flag. This is to recognize that the ASC1
		received a byte. If a byte has been received, the function
		ASC1_usGetData must be called.
	Returnvalue:
		0 receive data is invalid, else 1
	Parameters:
		None
Functions:

	Function:
		void ASC1_vInit(void)
	Description:
		This is the initialization function of the ASC1 function
		library. It is assumed that the SFRs used by this library
		are in its reset state.
	Returnvalue:
		None
	Parameters:
		None

	Function:
		void ASC1_vSendData(ushort usData)
	Description:
		This function writes a send data initialization word into
		the transmit buffer register.
		Note:
		In a multiprocessor system the master with this function
		has the possibility to send data to the selected slave. To
		achieve this, the 9th bit must set on zero.
	Returnvalue:
		None
	Parameters:
		usData:
		Data to be send

	Function:
		ushort ASC1_usGetData(void)
	Description:
		This function reads out the content of the receive buffer
		register which contains the received data.
	Returnvalue:
		data that has been received
	Parameters:
		None

Initialization:

	Configuration of the Module Clock:
	- enable the ASC1 module
	- clock divider for normal operation mode: System clock / 1 (= 40,0000
	MHz; 25,000 ns )
	- the ASC1 module is stopped during sleep mode

	Configuration of the ASC1 Baudrate Generator:
	- the ASC1 module clock is 40 MHz
	- additionally reduce serial clock to 2
	- required baud rate = 19,200 kbaud
	- real baud rate     = 19,231 kbaud
	- deviation          = 0,160 %

	Configuration of the ASC1 Operation Mode:
	- 8-bit data asychronous operation with one stop bit

	- receiver is enabled

	Configuration of the used ASC1 Port Pins:

	- P12.15 is used for ASC1 transmit output signal (ASC1_TXD)
	- P12.14 is used for ASC1 receive input signal (ASC1_RXD)

	Configuration of the used ASC1 Interrupts:

TwinCAN Controller

Macros:
Functions:

	Function:
		void CAN_vInit(void)
	Description:
		This is the initialization function of the CAN function
		library. It is assumed that the SFRs used by this library
		are in its reset state.
	Returnvalue:
		None
	Parameters:
		None

	Function:
		void CAN_vGetMsgObj(ubyte ubObjNr, TCAN_SWObj *pstObj)
	Description:
		This function fills the forwarded SW message object with
		the content of the chosen HW message object.
		The structure of the SW message object is defined in the
		header file CAN.H (see TCAN_SWObj).
	Returnvalue:
		None
	Parameters:
		ubObjNr:
		Number of the message object to be read (0-31)
		*pstObj:
		Pointer on a message object to be filled by this function

	Function:
		ubyte CAN_ubNewData(ubyte ubObjNr)
	Description:
		This function checks whether the selected RECEIVE OBJECT
		has received a new message. If so the function returns the
		value '1'.
	Returnvalue:
		1 the message object has received a new message, else 0
	Parameters:
		ubObjNr:
		Number of the message object (0-31)

	Function:
		void CAN_vTransmit(ubyte ubObjNr)
	Description:
		This function triggers the CAN controller to send the
		selected message.
		If the selected message object is a TRANSMIT OBJECT then
		this function triggers the sending of a data frame. If
		however the selected message object is a RECEIVE OBJECT
		this function triggers the sending of a remote frame.
	Returnvalue:
		None
	Parameters:
		ubObjNr:
		Number of the message object (0-31)

	Function:
		void CAN_vReleaseObj(ubyte ubObjNr)
	Description:
		This function resets the NEWDAT flag of the selected
		RECEIVE OBJECT, so that the CAN controller have access to
		it. This function must be called if the function
		CAN_ubNewData detects, that new data are present in the
		message object and the actual data have been read by
		calling the function CAN_vGetMsgObj.
	Returnvalue:
		None
	Parameters:
		ubObjNr:
		Number of the message object (0-31)

Initialization:

	Configuration of the Module Clock:
	- enable the CAN module
	- clock divider for normal operation mode: System clock / 2 (= 20,0000
	MHz; 50,000 ns )
	- the CAN module is stopped during sleep mode

	Configuration of CAN Node A:

	General Configuration of the Node A:
	- set INIT and CCE

	Configuration of the Node A Error Counter:
	- the error warning threshold value (warning level) is 96

	Configuration of the used CAN Port Pins:
	- P13.12 is used for CAN0 receive input signal (CAN0_RXD)
	- P13.13 is used for CAN0 transmitter output signal (CAN0_TXD)

	Configuration of the Node A Baud Rate:
	- required baud rate = 125,000 kbaud
	- real baud rate     = 125,000 kbaud
	- sample point       = 60,00 %
	- there are 5 time quanta before sample point
	- there are 4 time quanta after sample point
	- the (re)synchronization jump width is 2 time quanta

	Configuration of CAN Node B:

	General Configuration of the Node B:
	- set INIT and CCE

	Configuration of the Node B Error Counter:
	- the error warning threshold value (warning level) is 96

	Configuration of the used CAN Port Pins:
	- P13.14 is used for CAN1 receive input signal (CAN1_RXD)
	- P13.15 is used for CAN1 transmitter output signal (CAN1_TXD)

	Configuration of the Node B Baud Rate:
	- required baud rate = 125,000 kbaud
	- real baud rate     = 125,000 kbaud
	- sample point       = 60,00 %
	- there are 5 time quanta before sample point
	- there are 4 time quanta after sample point
	- the (re)synchronization jump width is 2 time quanta

	Configuration of the CAN Message Objects 0 - 31:
	Configuration of Message Object 0:
	- message object 0 is valid

	- message object is used as receive object
	- standard 11-bit identifier
	- 8 valid data bytes
	- this message object works with CAN node A
	- remote monitoring is disabled

	- acceptance mask 11-bit: 0x7FF
	- identifier 11-bit:      0x100

	- functionality of standard message object

	Configuration of Message Object 1:
	- message object 1 is valid

	- message object is used as transmit object
	- standard 11-bit identifier
	- 8 valid data bytes
	- this message object works with CAN node A
	- remote monitoring is disabled

	- acceptance mask 11-bit: 0x7FF
	- identifier 11-bit:      0x200

	- functionality of standard message object

	Configuration of Message Object 2:
	- message object 2 is valid

	- message object is used as receive object
	- standard 11-bit identifier
	- 8 valid data bytes
	- this message object works with CAN node B
	- remote monitoring is disabled

	- acceptance mask 11-bit: 0x7FF
	- identifier 11-bit:      0x200

	- functionality of standard message object

	Configuration of Message Object 3:
	- message object 3 is valid

	- message object is used as transmit object
	- standard 11-bit identifier
	- 8 valid data bytes
	- this message object works with CAN node B
	- remote monitoring is disabled

	- acceptance mask 11-bit: 0x7FF
	- identifier 11-bit:      0x100

	- functionality of standard message object

	Configuration of Message Object 4:
	- message object 4 is not valid

	Configuration of Message Object 5:
	- message object 5 is not valid

	Configuration of Message Object 6:
	- message object 6 is not valid

	Configuration of Message Object 7:
	- message object 7 is not valid

	Configuration of Message Object 8:
	- message object 8 is not valid

	Configuration of Message Object 9:
	- message object 9 is not valid

	Configuration of Message Object 10:
	- message object 10 is not valid

	Configuration of Message Object 11:
	- message object 11 is not valid

	Configuration of Message Object 12:
	- message object 12 is not valid

	Configuration of Message Object 13:
	- message object 13 is not valid

	Configuration of Message Object 14:
	- message object 14 is not valid

	Configuration of Message Object 15:
	- message object 15 is not valid

	Configuration of Message Object 16:
	- message object 16 is not valid

	Configuration of Message Object 17:
	- message object 17 is not valid

	Configuration of Message Object 18:
	- message object 18 is not valid

	Configuration of Message Object 19:
	- message object 19 is not valid

	Configuration of Message Object 20:
	- message object 20 is not valid

	Configuration of Message Object 21:
	- message object 21 is not valid

	Configuration of Message Object 22:
	- message object 22 is not valid

	Configuration of Message Object 23:
	- message object 23 is not valid

	Configuration of Message Object 24:
	- message object 24 is not valid

	Configuration of Message Object 25:
	- message object 25 is not valid

	Configuration of Message Object 26:
	- message object 26 is not valid

	Configuration of Message Object 27:
	- message object 27 is not valid

	Configuration of Message Object 28:
	- message object 28 is not valid

	Configuration of Message Object 29:
	- message object 29 is not valid

	Configuration of Message Object 30:
	- message object 30 is not valid

	Configuration of Message Object 31:
	- message object 31 is not valid

	Configuration of Service Request Nodes 0 - 7: