Technical information

SCI to SPI Peripheral Communication in V850ES Microcontrollers
#define TM05_ONEPULSEDELAY 0x00
#define TM50_Clock 0x5
#define TM50_INTERVALVALUE 0x1e
#define TM50_SQUAREWIDTH 0x1e
#define TM50_PWMACTIVEVALUE 0x1e
#define TM51_Clock 0x5
#define TM51_INTERVALVALUE 0x1e
#define TM51_SQUAREWIDTH 0x1e
#define TM51_PWMACTIVEVALUE 0x1e
#define TMH0_Clock 0x3
#define TMH0_INTERVALVALUE 0x7c
#define TMH0_SQUAREWIDTH 0x7c
#define TMH0_PWMCYCLE 0x7c
#define TMH0_PWMDELAY 0x3d
#define TMH0_CARRIERDELAY 0x7c
#define TMH0_CARRIERWIDTH 0x3d
#define TMH1_Clock 0x3
#define TMH1_INTERVALVALUE 0x7c
#define TMH1_SQUAREWIDTH 0x7c
#define TMH1_PWMCYCLE 0x7c
#define TMH1_PWMDELAY 0x3d
#define TMH1_CARRIERDELAY 0x7c
#define TMH1_CARRIERWIDTH 0x3d
/*timer00 to 05,50,51,H0,H1 configurator initiation*/
void TM00_Init( void );
/*timer00 to 05 free running start,50,51,H0,H1 timer start*/
void TM00_Start( void );
/*timer00 to 05,50,51,H0,H1 timer stop*/
void TM00_Stop( void );
MD_STATUS TM00_ChangeTimerCondition(USHORT* array_reg,USHORT array_num);
__interrupt void MD_INTTM000( void );
/* added functions in timer_user.c for millisecond timer */
void SetMsecTimer(int time); /* set the timer */
BOOL CheckMsecTimer(void); /* check the timer */
#endif
4.2.7 Timer.c
/*
*****************************************************************************
**
** This device driver was created by Applilet for the V850ES/KJ1+,
V850ES/KG1+,
** V850ES/KF1+ and V850ES/KE1+ 32-Bit Single-Chip Microcontrollers
**
** Copyright(C) NEC Electronics Corporation 2002-2004
** All rights reserved by NEC Electronics Corporation
**
** This program should be used on your own responsibility.
89