Technical information

CSI to SPI Peripheral Communication in V850ES Microcontrollers
** NEC Electronics Corporation assumes no responsibility for any losses
** incurred by customers or third parties arising from the use of this file.
**
** Filename : timer.c
** Abstract : This file implements a device driver for the timer module
** APIlib: V850ESKX1H.lib V1.33 [24 Sep 2004]
**
Device: uPD70F3318Y
**
** Compiler: NEC/CA850
**
*****************************************************************************
*/
/*
** *************************************************************************
** Include files
** *************************************************************************
*/
#include "macrodriver.h"
#include "timer.h"
/*
** *************************************************************************
**MacroDefine
** *************************************************************************
*/
/*
**---------------------------------------------------------------------------
**
** Abstract:
** Initiate TM00, select founction and input parameter
** count clock selection, INT init
**
** Parameters:
** None
**
** Returns:
** None
**
**---------------------------------------------------------------------------
*/
void TM00_Init( void )
{
TMC00 = 0x0; /* stop TM00 */
ClrIORBit(PRM00, 0x3);
ClrIORBit(SELCNT1, 0x1);
SELCNT1 |= ( TM00_Clock&0x4)>>2; /* internal count clock */
PRM00 |=( TM00_Clock&0x3);
/* INTTM000 setting */
TM0IC00 = Lowest;
SetIORBit(TM0IC00, 0x40);
/* TM00 interval */
ClrIORBit(CRC00, 0x01);
90