Technical information

CSI to SPI Peripheral Communication in V850ES Microcontrollers
2. void CALL_CSI00_Receive( void ): This routine is called when a reception is complete.
Code was added here to set a flag, CSI11_ReceiveDone, to indicate to the main program that
receive is complete.
The following routines were written and added in serial_user.c; they were not generated by
Applilet.
1. void CSI00_SetType3(void): This routine disables the CSI00 peripheral temporarily, sets the
peripheral for Type-3 operation, and enables the peripheral again.
2. void CSI00_SetType4(void): This routine disables the CSI00 peripheral temporarily, sets the
peripheral for Type-4 operation, and enables the peripheral again.
2.7.8 Files for Temperature Sensor Routines
The following files were written for temperature sensor handling.
2.7.8.1 Temper.h
The header file temper.h contains declarations for the functions for temperature sensor access.
2.7.8.2 Temper.c
The source file temper.c contains the following functions for temperature sensor access:
1. MD_STATUS Temp_Init(void): Initialize temperature sensors and CSI00 serial channel for
access.
2. short Temp_Read_1(void): Read temperature value from temperature sensor 1 (MAX6627),
returns temperature as a signed 16-bit value, of temperature in degrees Centigrade × 128.
3. short Temp_Read_2(void): Read temperature value from temperature sensor 2 (DS1722),
returns temperature as a signed 16-bit value, of temperature in degrees Centigrade × 128.
4. void Temp_Display(short temp); Displays the temperature in the two-digit LED by scrolling
the signed decimal value of the temperature through the digits.
2.7.9 Other Demonstration Program Files Not Generated by Applilet
The demonstration program also includes the following files, not generated by Applilet.
Table 7. Program Files Not Generated By Applilet
File Function
Sw_vkj1.h Header file for push-button switch input
Sw_vkj1.c Code to read and debounce pushbutton switches
Led_vkj1.h Header file for seven-segment LED patterns and functions
Led_vkj1.c Code to display data in seven-segment LEDs
36