background image

Rev.1.01    2007.02.16 
RJJ10J1643-0101

 

40

 

Program example 

 

 

#include  ”rapi_sif_r8c_13.h” 

 

 

 

void Notify(unsigned char result) { 
    if  ((result&RAPI_OVER_ERR)  ==  RAPI_OVER_ERR)  { 
        /*  Overrun  error  */ 
    } 
    if  ((result&RAPI_FRAMING_ERR)  ==  RAPI_FRAMING_ERR)  { 
        /*  Framing  error  */ 
    } 
    if  ((result&RAPI_PARITY_ERR)  ==  RAPI_PARITY_ERR)  { 
        /*  Parity  error  */ 
    } 
    if  ((result&RAPI_TX_END)  ==  RAPI_TX_END)  { 
        /*  Transmission  completion  */ 
    } 
    if  ((result&RAPI_RX_END)  ==  RAPI_RX_END)  { 
        /*  Reception  completion  */ 
    } 

 

 

 

Boolean func( void ) 

    ……………… 
    /* Set callback functions of RAPI_COM1 to serial driver */ 
    return  __ConfigSerialDriverNotify(  RAPI_COM1,  Notify  ); 
    ……………… 

 

Содержание Embedded Application Programming Interface

Страница 1: ...ok over all the business of both companies Therefore although the old company name remains in this document it is a valid Renesas Electronics document We appreciate your understanding Renesas Electron...

Страница 2: ...t for an application categorized as Specific or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics The quality grade of each Renesas...

Страница 3: ...Renesas Embedded Application Programming Interface Reference manual User s Manual Rev 1 01 2007 02...

Страница 4: ...reateInputCapture and __CreateOutputCompare External signal deleted from the timer RD count source for the R8C in __CreateInputCapture and __CreateOutputCompare Following statements added to the item...

Страница 5: ...pt Error in writing of __CreateInput Capture and __CreateOutputCapture corrected Explanation added to Section 2 1 Overview Causes of clearing of timer W and timer RC counters in __CreateInputCapture d...

Страница 6: ...eADC Error in writing of H8 300H interrupt set values in __CreateOutputCompare corrected Error in writing of timer RD and timer RD symbol name corrected Description of gate function of M16C in __Creat...

Страница 7: ...ter Driver 16 3 Standard Types 18 4 Library Reference 19 4 1 API List by Peripheral Facility 19 4 2 Description of Each API 21 4 2 1 Serial I O 22 __BasicOpenSerialDriver 22 __BasicCloseSerialDriver 2...

Страница 8: ...asurementMode 99 __DestroyPulseWidthMeasurementMode 101 __GetPulseWidthMeasurementMode 103 __CreateInputCapture 105 __EnableInputCapture 115 __DestroyInputCapture 117 __GetInputCapture 119 __CreateOut...

Страница 9: ...Rev 1 01 2007 02 16 RJJ10J1643 0101 7 __GetADC 197 __GetADCAll 198 __GetADCStatus 199 __ClearADCStatus 200...

Страница 10: ...Rev 1 01 2007 02 16 RJJ10J1643 0101 8 1 Introduction The Renesas Embedded Application Programming Interface API is a unified API for the microcomputers made by Renesas Technology Corporation...

Страница 11: ...be sure to include this file rapi_io_port_xxx_yyy h xxx family name yyy series name This is the header file for I O port driver APIs To use I O port driver APIs be sure to include this file rapi_sif_...

Страница 12: ...hich sets or clears the operating conditions of timers as well as controls the timer operation 3 I O port control feature It comprises an I O port driver which sets or clears the usage conditions of I...

Страница 13: ...serial interface driver sets serial communication clears settings transmit receives data and controls the status of serial communication There are two kinds of serial interface driver a single data t...

Страница 14: ...preset callback function 2 4 3 Pulse Width Modulation Mode PWM Mode In this mode the timer outputs pulses in a given width successively When an underflow or an overflow interrupt occurs it calls a pre...

Страница 15: ...7 Output Compare Mode In this mode the timer generates an interrupt request when the timer counter and a comparison value match When a compare match interrupt or an underflow or an overflow interrupt...

Страница 16: ...Rev 1 01 2007 02 16 RJJ10J1643 0101 14 2 5 I O Port Driver The I O port driver sets the I O port for input or output writes data to the I O port and reads data from the I O port...

Страница 17: ...6 RJJ10J1643 0101 15 2 6 External Interrupt Driver The external interrupt driver sets external interrupts controls external interrupts acquires the status of external interrupt flags and clears extern...

Страница 18: ...program example is shown for the A D converter operating in single shot mode under the conditions given below CPU R8C Operating clock fAD divided by 2 Resolution 10 bits Analog input pin AN0 pin A D...

Страница 19: ...__CreateADC RAPI_ONE_SHOT RAPI_AN0 RAPI_FAD2 RAPI_WITH_SAMPLE_HOLD RAPI_AD_OFF RAPI_10BIT 1 0 0 while 1 Disable A D converter __EnableADC RAPI_AN0 RAPI_AD_ON 1 Check a flag bit of A D converter inter...

Страница 20: ...r details about the set values refer to the description of each API Standard type Description Boolean The Boolean type represents the enum type data that indicates whether successful RAPI_TRUE 1 or fa...

Страница 21: ...lSending Starts transmission 17 __StopSerialReceiving Stops reception 18 __StopSerialSending Stops transmission 19 __PollingSerialReceiving Receives by polling 20 Multi data serial I O __PollingSerial...

Страница 22: ...er register 47 __EnableTimerRegister Controls operation of timer register 48 __ClearTimerRegister Clears timer register 49 Timer __GetTimerRegister Gets timer register value 50 __SetIOPort Sets I O po...

Страница 23: ...rformed by the function It also shows the syntax of the function followed by a brief explanation of arguments Description Describes the function and how to use it in detail Return value Explains the r...

Страница 24: ...el 1 RAPI_COM2 SCI3 channel 2 RAPI_COM3 SCI3 channel 3 Return value If the serial port specification is incorrect RAPI_FALSE is returned otherwise RAPI_TRUE is returned Functionality Serial I O Refere...

Страница 25: ...COM2 SCI3 channel 2 RAPI_COM3 SCI3 channel 3 Return value If the serial port specification is incorrect RAPI_FALSE is returned otherwise RAPI_TRUE is returned Functionality Serial I O Reference __Basi...

Страница 26: ...ollowing values can be set If the API is used in clock synchronous serial communication mode do not set these values M16C UART0 UART1 UART2 RAPI_BIT_7 Transfer data length 7 bits RAPI_BIT_8 Transfer d...

Страница 27: ..._F8 f8SIO RAPI_SIO_BCSS_F32 f32SIO For the _CTS _RTS function the following values can be set If the internal clock is selected for use in clock synchronous serial communication mode the _RTS function...

Страница 28: ...on mode do not set these values R8C UART0 UART1 RAPI_STPB_1 1 stop bit RAPI_STPB_2 2 stop bits For the parity bit of clock asynchronous serial communication the following values can be set If the API...

Страница 29: ...n clock synchronous serial communication mode do not set these values H8 300H SCI3 channel 1 SCI3 channel 2 SCI3 channel 3 RAPI_STPB_1 1 stop bit RAPI_STPB_2 2 stop bits For the parity bit of clock as...

Страница 30: ...U used If an undefined value is specified in the first argument operation of the API cannot be guaranteed Program example include rapi_sif_r8c_13 h Boolean func void Set the data of RAPI_COM1 to seria...

Страница 31: ...M2 SCI3 channel 2 RAPI_COM3 SCI3 channel 3 Return value If data reception in serial communication was successfully started RAPI_TRUE is returned if failed RAPI_FALSE is returned Functionality Serial I...

Страница 32: ...el 1 RAPI_COM2 SCI3 channel 2 RAPI_COM3 SIC3 channel 3 Return value If data transmission in serial communication was successfully started RAPI_TRUE is returned if failed RAPI_FALSE is returned Functio...

Страница 33: ...ART2 RAPI_RX_INCOMPLETE Reception not complete yet Other than above Reception complete The value read from the UARTi receive buffer register i 0 to 2 M16C SI O3 SI O4 RAPI_RX_INCOMPLETE Reception not...

Страница 34: ...le serial ports differ with each CPU used If an undefined value is specified in the argument operation of the API cannot be guaranteed Program example include rapi_sif_r8c_13 h void func void unsigned...

Страница 35: ...COM2 UART1 H8 300H RAPI_COM1 SCI3 channel 1 RAPI_COM2 SCI3 channel 2 RAPI_COM3 SCI3 channel 3 Return value If no data exists in the transmit buffer RAPI_TRUE is returned if data exists RAPI_FALSE is r...

Страница 36: ...I_COM2 SCI3 channel 2 RAPI_COM3 SCI3 channel 3 Return value If data reception in serial communication was successfully stopped RAPI_TRUE is returned if failed RAPI_FALSE is returned Functionality Seri...

Страница 37: ...ue If data transmission in serial communication was successfully stopped RAPI_TRUE is returned if failed RAPI_FALSE is returned Functionality Serial I O Reference __BasicStartSerialSending Remark For...

Страница 38: ...API_COM2 SCI3 channel 2 SIO3_COM3 SIO3 channel 3 Return value If the serial port specification is incorrect RAPI_FALSE is returned otherwise RAPI_TRUE is returned Functionality Serial I O Reference __...

Страница 39: ...API_COM2 SCI3 channel 2 SIO3_COM3 SIO3 channel 3 Return value If the serial port specification is incorrect RAPI_FALSE is returned otherwise RAPI_TRUE is returned Functionality Serial I O Reference __...

Страница 40: ...1 SCI3 channel 1 RAPI_COM2 SCI3 channel 2 RAPI_COM3 SCI3 channel 3 func The function to be registered in func must be supplied to the serial I O driver by the user The serial I O driver calls the func...

Страница 41: ...1 b0 0 0 X X 0 0 0 0 0 Not completed 1 Completed 0 Not completed 1 Completed Reception completed Transmission completed b7 b6 b5 b4 b3 b2 b1 b0 0 0 X X 0 X X X 0 No error 1 Error occurred 0 No error 1...

Страница 42: ...un error if result RAPI_FRAMING_ERR RAPI_FRAMING_ERR Framing error if result RAPI_PARITY_ERR RAPI_PARITY_ERR Parity error if result RAPI_TX_END RAPI_TX_END Transmission completion if result RAPI_RX_EN...

Страница 43: ...eturn value If serial communication was successfully set RAPI_TRUE is returned if settings failed RAPI_FALSE is returned Functionality Serial I O Reference __BasicSetSerialFormat Remark The specifiabl...

Страница 44: ...evel 5 RAPI_INT_TX_LV_6 Transmit interrupt priority level 6 RAPI_INT_TX_LV_7 Transmit interrupt priority level 7 RAPI_INT_RX_DIS Receive interrupt disabled RAPI_INT_RX_LV_1 Receive interrupt priority...

Страница 45: ...rity level 5 RAPI_INT_RX_LV_6 Receive interrupt priority level 6 RAPI_INT_RX_LV_7 Receive interrupt priority level 7 H8 300H RAPI_COM1 SCI3 channel 1 RAPI_COM2 SCI3 channel 2 RAPI_COM3 SCI3 channel 3...

Страница 46: ...Rev 1 01 2007 02 16 RJJ10J1643 0101 44 Boolean func void Set interrupt of RAPI_COM1 to serial driver return __SetSerialInterrupt RAPI_COM1 RAPI_INT_TX_LV_1 RAPI_INT_RX_LV_2...

Страница 47: ...I_COM1 UART0 RAPI_COM2 UART1 H8 300H RAPI_COM1 SCI3 channel 1 RAPI_COM2 SCI3 channel 2 RAPI_COM3 SCI3 channel 3 Return value If reception of serial communication was successfully started RAPI_TRUE is...

Страница 48: ...Rev 1 01 2007 02 16 RJJ10J1643 0101 46 unsigned int buffer 10 void func void Get 5 word data received in serial communication __StartSerialReceiving RAPI_COM1 5 buffer...

Страница 49: ...llowing values can be set M16C RAPI_COM1 UART0 RAPI_COM2 UART1 RAPI_COM3 UART2 RAPI_COM4 SI O3 RAPI_COM5 SI O4 R8C RAPI_COM1 UART0 RAPI_COM2 UART1 H8 300H RAPI_COM1 SCI3 channel 1 RAPI_COM2 SCI3 chann...

Страница 50: ...Rev 1 01 2007 02 16 RJJ10J1643 0101 48 unsigned int buffer 10 void func void Set 5 word data to transmit buffer of serial communication __StartSerialSending RAPI_COM1 5 buffer...

Страница 51: ...I_COM2 SCI3 channel 2 RAPI_COM3 SCI3 channel 3 Return value If reception of serial communication was successfully stopped RAPI_TRUE is returned if failed RAPI_FALSE is returned Functionality Serial I...

Страница 52: ...e If transmission of serial communication was successfully stopped RAPI_TRUE is returned if failed RAPI_FALSE is returned Functionality Serial I O Reference __StartSerialReceiving Remark For the M16C...

Страница 53: ...RAPI_COM1 UART0 RAPI_COM2 UART1 H8 300H RAPI_COM1 SCI3 channel 1 RAPI_COM2 SCI3 channel 2 RAPI_COM3 SCI3 channel 3 Return value Out of the receive data counts requested the number of unreceived data i...

Страница 54: ...ction is registered data For data the following values can be set M16C RAPI_COM1 UART0 RAPI_COM2 UART1 RAPI_COM3 UART2 RAPI_COM4 SI O3 RAPI_COM5 SI O4 R8C RAPI_COM1 UART0 RAPI_COM2 UART1 H8 300H RAPI_...

Страница 55: ...ed int buffer 10 count void func void Transmission interrupt disable __SetSerialInterrupt RAPI_COM1 RAPI_INT_TX_DIS RAPI_INT_RX_DIS Start transmission __StartSerialSending RAPI_COM1 5 buffer do count...

Страница 56: ...A channel 3 RAPI_TIMER_A4 Uses timer A channel 4 RAPI_TIMER_B0 Uses timer B channel 0 RAPI_TIMER_B1 Uses timer B channel 1 RAPI_TIMER_B2 Uses timer B channel 2 RAPI_F1 Selects f1 for the count source...

Страница 57: ...rce RAPI_FRING Selects fRING for the count source RAPI_FOCO Selects foco for the count source RAPI_FC32 Selects fC32 for the count source RAPI_TIMER_Y_ UNDERFLOW Selects the underflow of timer Y for t...

Страница 58: ...value is RAPI_F1 Operating states set Specify one from RAPI_TIMER_ON RAPI_TIMER_OFF The default value is RAPI_TIMER_OFF Specifiable definition values when timer RB is used RAPI_TIMER_RB specified Cou...

Страница 59: ...oad facility Specifiable definition values when timer A is used RAPI_TIMER_A specified Clock Specify one from RAPI_TA_F8 RAPI_TA_F32 RAPI_TA_F128 RAPI_TA_F256 RAPI_TA_F512 RAPI_TA_F2048 RAPI_TA_F4096...

Страница 60: ...lue for the timer register when using timer Y or timer Z specify the set value for the primary register in 8 bits H8 300H Specify the set value for the timer reload register in 8 bits This setting is...

Страница 61: ...Rev 1 01 2007 02 16 RJJ10J1643 0101 59 void func void Set up timer X as timer mode __CreateTimer RAPI_TIMER_X RAPI_TIMER_ON RAPI_F8 5 0x80 0x80 TimerIntFunc...

Страница 62: ...API_TIMER_B1 Selects timer B channel 1 RAPI_TIMER_B2 Selects timer B channel 2 RAPI_TIMER_ON Sets the timer that is set to timer mode to start operating RAPI_TIMER_OFF Sets the timer that is set to ti...

Страница 63: ...ed value is specified in the argument operation of the API cannot be guaranteed The specifiable timers differ with each CPU used Program example include rapi_timer_r8c_13 h void func void Disable time...

Страница 64: ...timer B channel 1 RAPI_TIMER_B2 Selects timer B channel 2 R8C RAPI_TIMER_X Selects timer X RAPI_TIMER_Y Selects timer Y RAPI_TIMER_Z Selects timer Z RAPI_TIMER_RA Selects timer RA RAPI_TIMER_RB Selec...

Страница 65: ...Rev 1 01 2007 02 16 RJJ10J1643 0101 63 void func void Destroy the setting of timer Z as timer mode __DestroyTimer RAPI_TIMER_Z...

Страница 66: ...channel 0 RAPI_TIMER_B1 Uses timer B channel 1 RAPI_TIMER_B2 Uses timer B channel 2 RAPI_EV_EXTERNAL Selects the external signal input to TAiIN pin when using timer Ai or TBiIN pin when using timer Bi...

Страница 67: ...EE_RUN The default value is RAPI_AUTO_RELOAD Count direction Specify one from RAPI_UP_COUNT RAPI_DOWN_COUNT The default value is RAPI_DOWN_COUNT The count direction can only be set when the UDF regist...

Страница 68: ...I_FALLING Specifiable definition values when timer Y is used RAPI_TIMER_Y specified Operating states set Specify one from RAPI_TIMER_ON RAPI_TIMER_OFF The default value is RAPI_TIMER_OFF Write control...

Страница 69: ...RAPI_FALLING Specifiable definition values when timer V is used RAPI_TIMER_V specified Interrupt If overflow interrupt requests are enabled specify RAPI_OVERFLOW If no interrupts are specified No inte...

Страница 70: ...EventCounter __DestroyEventCounter __GetEventCounter Remark If an undefined value is specified in the first argument operation of the API cannot be guaranteed The specifiable timers differ with each C...

Страница 71: ...channel 4 RAPI_TIMER_B0 Selects timer B channel 0 RAPI_TIMER_B1 Selects timer B channel 1 RAPI_TIMER_B2 Selects timer B channel 2 RAPI_TIMER_ON Sets the timer that is set to event counter mode to sta...

Страница 72: ...entCounter __GetEventCounter Remark If an undefined value is specified in the argument operation of the API cannot be guaranteed The specifiable timers differ with each CPU used Program example includ...

Страница 73: ...mer B channel 0 RAPI_TIMER_B1 Selects timer B channel 1 RAPI_TIMER_B2 Selects timer B channel 2 R8C RAPI_TIMER_X Selects timer X RAPI_TIMER_Y Selects timer Y RAPI_TIMER_RA Selects timer RA H8 300H RAP...

Страница 74: ...Rev 1 01 2007 02 16 RJJ10J1643 0101 72 void func void Destroy the setting of timer Y as event counter mode __DestroyEventCounter RAPI_TIMER_Y...

Страница 75: ...ects timer B channel 1 RAPI_TIMER_B2 Selects timer B channel 2 R8C RAPI_TIMER_X Selects timer X RAPI_TIMER_Y Selects timer Y RAPI_TIMER_RA Selects timer RA H8 300H RAPI_TIMER_B1 Selects timer B1 RAPI_...

Страница 76: ...is incorrect RAPI_FALSE is returned otherwise RAPI_TRUE is returned Functionality Timer event counter mode Reference __CreateEventCounter __EnableEventCounter __DestroyEventCounter Remark If an undefi...

Страница 77: ...the count source RAPI_F32 Selects f32 for the count source RAPI_FC32 Selects fC32 for the count source RAPI_TIMER_ON Sets the timer to start operating in __CreatePulseWidthModulationMode RAPI_TIMER_O...

Страница 78: ...es timer Y RAPI_TIMER_Z Uses timer Z RAPI_TIMER_RB Uses timer RB RAPI_F1 Selects f1 for the count source RAPI_F2 Selects f2 for the count source RAPI_F8 Selects f8 for the count source RAPI_FRING Sele...

Страница 79: ..._TV_F64 Timer V counts on falling edges of internal clock 64 RAPI_TV_F128 Timer V counts on falling edges of internal clock 128 RAPI_TIMER_ON Sets the timer to start operating in __CreatePulseWidthMod...

Страница 80: ...e interrupt control register H8 300H Specify the interrupt priority level 0 1 to be set in the interrupt control register For the CPUs that do not have an interrupt control register specify 0 data3 M1...

Страница 81: ...timers differ with each CPU used For the H8 300H make sure that comparison value A comparison value B When used for the H8 300H this API specify when freeing it from module stanby state Program examp...

Страница 82: ...4 RAPI_TIMER_ON Sets the timer that is set to pulse width modulation mode to start operating RAPI_TIMER_OFF Sets the timer that is set to pulse width modulation mode to stop operating R8C RAPI_TIMER_Y...

Страница 83: ...fied in the argument operation of the API cannot be guaranteed The specifiable timers differ with each CPU used Program example include rapi_timer_r8c_13 h void func void Enable timer Y as pulse width...

Страница 84: ...R8C RAPI_TIMER_Y Selects timer Y RAPI_TIMER_Z Selects timer Z RAPI_TIMER_RB Selects timer RB H8 300H RAPI_TIMER_V Selects timer V Return value If the timer specification is incorrect RAPI_FALSE is re...

Страница 85: ...hannel 2 RAPI_F1 Selects f1 for the count source RAPI_F2 Selects f2 for the count source RAPI_F8 Selects f8 for the count source RAPI_F32 Selects f32 for the count source RAPI_FC32 Selects fC32 for th...

Страница 86: ...iable definition values when timer X is used RAPI_TIMER_X specified Count source Specify one from RAPI_F1 RAPI_F2 RAPI_F8 RAPI_F32 The default value is RAPI_F1 Operating states set Specify one from RA...

Страница 87: ...nal clock 32 RAPI_TRD_F40M Timer RD counts with internal clock 40M RAPI_TIMER_ON Sets the timer to start operating in __CreatePulsePeriodMeasurementMode RAPI_TIMER_OFF Sets the timer to stop operating...

Страница 88: ...No interrupt request is set Input pin Specify one from RAPI_FTIOA RAPI_FTIOB The default value is RAPI_FTIOA Specifiable definition values when timer RC is used RAPI_TIMER_RC specified Count source Sp...

Страница 89: ...R8C When using timer X specify the set value for the timer register data4 M16C H8 300H Specify 0 R8C Specify the set value for the prescaler register Return value If the timer specification is incorre...

Страница 90: ...RAPI_TIMER_ON Sets the timer that is set to pulse period measurement mode to start operating RAPI_TIMER_OFF Sets the timer that is set to pulse period measurement mode to stop operating R8C RAPI_TIMER...

Страница 91: ...pulse period measurement mode Reference __CreatePulsePeriodMeasurementMode __DestroyPulsePeriodMeasurementMode __GetPulsePeriodMeasurementMode Remark If an undefined value is specified in the argument...

Страница 92: ...MER_RA Selects timer RA H8 300H RAPI_TIMER_W Selects timer W RAPI_TIMER_Z0 Selects timer Z channel 0 RAPI_TIMER_Z1 Selects timer Z channel 1 RAPI_TIMER_RC Selects timer RC RAPI_TIMER_RD 0 Selects time...

Страница 93: ...8 300H this API places a specified timer into module stanby state after discarding it Program example include rapi_timer_r8c_13 h void func void Destroy the setting of timer X as pulse period measurem...

Страница 94: ...lects timer B channel 2 R8C RAPI_TIMER_X Selects timer X RAPI_TIMER_RA Selects timer RA H8 300H RAPI_TIMER_W Selects timer W RAPI_TIMER_Z0 Selects timer Z channel 0 RAPI_TIMER_Z1 Selects timer Z chann...

Страница 95: ...1 The value of general register B The value of general register D is stored When using timer RD RAPI_TIMER_RD specified 0 The value of general register A The value of general register C is stored 1 Th...

Страница 96: ...ses timer B channel 1 RAPI_TIMER_B2 Uses timer B channel 2 RAPI_F1 Selects f1 for the count source RAPI_F2 Selects f2 for the count source RAPI_F8 Selects f8 for the count source RAPI_F32 Selects f32...

Страница 97: ...ER_ON RAPI_TIMER_OFF The default value is RAPI_TIMER_OFF Measurement pulse Specify one from RAPI_FALLING_RISING RAPI_RISING_FALLING The default value is RAPI_FALLING_RISING Specifiable definition valu...

Страница 98: ...Mode RAPI_TIMER_OFF Sets the timer to stop operating in __CreatePulsePeriodMeasurementMode RAPI_OVERFLOW Enables overflow interrupt RAPI_RISING_ RISING Selects measurement of an interval from the rise...

Страница 99: ...RC_F8 RAPI_TRC_F32 RAPI_TRC_F40M The default value is RAPI_RC_F1 Operating states set Specify one from RAPI_TIMER_ON RAPI_TIMER_OFF The default value is RAPI_TIMER_OFF Interrupt If overflow interrupt...

Страница 100: ...s incorrect RAPI_FALSE is returned otherwise RAPI_TRUE is returned Functionality Timer pulse width measurement mode Reference __EnablePulseWidthMeasurementMode __DestroyPulseWidthMeasurementMode __Get...

Страница 101: ...surement mode to start operating RAPI_TIMER_OFF Sets the timer that is set to pulse width measurement mode to stop operating R8C RAPI_TIMER_X Selects timer X RAPI_TIMER_RA Selects timer RA RAPI_TIMER_...

Страница 102: ...atePulseWidthMeasurementMode __DestroyPulseWidthMeasurementMode __GetPulseWidthMeasurementMode Remark If an undefined value is specified in the argument operation of the API cannot be guaranteed The s...

Страница 103: ...IMER_Z0 Selects timer Z channel 0 RAPI_TIMER_Z1 Selects timer Z channel 1 RAPI_TIMER_RC Selects timer RC RAPI_TIMER_RD 0 Selects timer RD channel 0 RAPI_TIMER_RD 1 Selects timer RD channel 1 RAPI_TIME...

Страница 104: ...01 2007 02 16 RJJ10J1643 0101 102 Program example include rapi_timer_r8c_13 h void func void Destroy the setting of timer X as pulse width measurement mode __DestroyPulseWidthMeasurementMode RAPI_TIM...

Страница 105: ...ects timer B channel 2 R8C RAPI_TIMER_X Selects timer X RAPI_TIMER_RA Selects timer RA H8 300H RAPI_TIMER_W Selects timer W RAPI_TIMER_Z0 Selects timer Z channel 0 RAPI_TIMER_Z1 Selects timer Z channe...

Страница 106: ...red 1 The value of general register B The value of general register D is stored When using timer RD RAPI_TIMER_RD specified 0 The value of general register A The value of general register C is stored...

Страница 107: ...elects overflow of bit 14 for the base timer interrupt RAPI_OVERFLOW_BIT15 Selects overflow of bit 15 for the base timer interrupt Specifiable definition values when timer S is used RAPI_TIMER_S speci...

Страница 108: ...errupt RAPI_COUNT_CLEA R_A Selects GRA input capture to counter clear factor RAPI_COUNT_CLEA R_B Selects GRB input capture to counter clear factor RAPI_COUNT_CLEA R_C Selects GRC input capture to coun...

Страница 109: ...R_F8 RAPI_TRD_FILTER_F32 RAPI_TRD_FILTER_F The default is RAPI_TRD_FILTER_F32 H8 300H RAPI_TIMER_W Uses timer W RAPI_TIMER_Z0 Uses timer Z channel 0 RAPI_TIMER_Z1 Uses timer Z channel 1 RAPI_TIMER_RC...

Страница 110: ...nels 0 and 1 RAPI_TRC_FILTER_F1 Use sampling frequency f1 for timer RC digital filter function RAPI_TRC_FILTER_F8 Use sampling frequency f8 for timer RC digital filter function RAPI_TRC_FILTER_F32 Use...

Страница 111: ...f counter clear specify RAPI_COUNT_CLEAR_A RAPI_COUNT_CLEAR_B RAPI_COUNT_CLEAR_C or RAPI_COUNT_CLEAR_D respectively Synchronization If the timer is synchronized on channels 0 and 1 specify RAPI_TIMER_...

Страница 112: ...TER_F1 RAPI_TRD_FILTER_F8 RAPI_TRD_FILTER_F32 RAPI_TRD_FILTER_F The default is RAPI_TRD_FILTER_F32 data2 M16C Specify a pointer to the array in which the interrupt priority level is stored 0 Specify t...

Страница 113: ...ent registers 0 7 Measurement pulse Specify one from RAPI_IC_RISING RAPI_IC_FALLING RAPI_IC_BOTH If no measurement pulses are specified the time measurement register is set to No time measurement perf...

Страница 114: ...t pulse as active edge RAPI_FILTER_ ON Selects digital filter on If not select RAPI_FILTER_ON No digital filter is set data4 M16C Specify a pointer to the array in which the set value for each registe...

Страница 115: ...nction for IC OC interrupt 1 If this pointer is not specified 0 is set R8C H8 300H Specify a pointer to the array in which the callback function is stored If this pointer is not specified RAPI_NULL is...

Страница 116: ...Rev 1 01 2007 02 16 RJJ10J1643 0101 114 void func void Set up timer C as imput capture mode __CreateInputCapture RAPI_TIMER_C RAPI_TIMER_ON RAPI_BOTH RAPI_F32 RAPI_FRING128 5 TimerIntFunc...

Страница 117: ...mer RD0 channe 1 RAPI_TIMER_ON Sets the timer that is set to input capture mode to start operating RAPI_TIMER_OFF Sets the timer that is set to input capture mode to stop operating H8 300H RAPI_TIMER_...

Страница 118: ...16 RJJ10J1643 0101 116 The specifiable timers differ with each CPU used Program example include rapi_timer_r8c_13 h void func void Enable timer C as input capture mode __EnableInputCapture RAPI_TIMER...

Страница 119: ...channel 0 RAPI_TIMER_Z1 Selects timer Z channel 1 RAPI_TIMER_RC Selects timer RD0 RAPI_TIMER_RD0 Selects timer RD0 channe 0 RAPI_TIMER_RD1 Selects timer RD0 channe 1 RAPI_TIMER_RD2 Selects timer RD0...

Страница 120: ...Rev 1 01 2007 02 16 RJJ10J1643 0101 118 void func void Destroy the setting of timer C as input capture mode __DestroyInputCapture RAPI_TIMER_C...

Страница 121: ...D0 RAPI_TIMER_RD0 Selects timer RD0 channe 0 RAPI_TIMER_RD1 Selects timer RD0 channe 1 RAPI_TIMER_RD2 Selects timer RD0 channe 2 RAPI_TIMER_RD3 Selects timer RD0 channe 3 data2 M16C Specify a pointer...

Страница 122: ...er B 3 Stores the value of general register C 4 Stores the value of general register D Return value If the timer specification is incorrect RAPI_FALSE is returned otherwise RAPI_TRUE is returned Funct...

Страница 123: ...mer to stop operating in __CreateOutputCompare RAPI_OVERFLOW_BIT14 Selects overflow of bit 14 for the base timer interrupt RAPI_OVERFLOW_BIT15 Selects overflow of bit 15 for the base timer interrupt S...

Страница 124: ..._COUNT_CLEAR_B Specifies GRB compare match for the cause of counter clear RAPI_COUNT_CLEAR_C Specifies GRC compare match for the cause of counter clear RAPI_COUNT_CLEAR_D Specifies GRD compare match f...

Страница 125: ...n values when timer C is used RAPI_TIMER_C specified Count source Specify one from RAPI_F1 RAPI_F8 RAPI_F32 RAPI_FRING_FAST The default value is RAPI_F1 Operating states set Specify one from RAPI_TIME...

Страница 126: ...To specify GRA GRB GRC or GRD input capture for the cause for which the counter is cleared select RAPI_COUNT_CLEAR_A RAPI_COUNT_CLEAR_B RAPI_COUNT_CLEAR_C or RAPI_COUNT_CLEAR_D respectively If cleared...

Страница 127: ...r RC counts with internal clock 8 RAPI_TRC_F40M Timer RC counts with internal clock 40M RAPI_TRD_F1 Timer RD counts with internal clock RAPI_TRD_F2 Timer RD counts with internal clock 2 RAPI_TRD_F4 Ti...

Страница 128: ...urce Specify one from RAPI_TZ_F1 RAPI_TZ_F2 RAPI_TZ_F4 RAPI_TZ_F8 The default value is RAPI_TZ_F1 Operating states set Specify one from RAPI_TIMER_ON RAPI_TIMER_OFF The default value is RAPI_TIMER_OFF...

Страница 129: ...atch B compare match C or compare match D interrupt requests are enabled specify RAPI_COMPARE_MATCH_A RAPI_COMPARE_MATCH_B RAPI_COMPARE_MATCH_C or RAPI_COMPARE_MATCH_D respectively If no interrupts ar...

Страница 130: ...channel 3 in 16 bits 12 Specify the set value for waveform generation register 4 in 16 bits Specify the comparison value of channel 4 in 16 bits 13 Specify the set value for waveform generation regis...

Страница 131: ...on value of general register B in 16 bits 6 Specify the comparison value of general register C in 16 bits 7 Specify the comparison value of general register D in 16 bits To specify output operation fo...

Страница 132: ...generation facility is enabled 1 Specify the set value for interrupt enable register 0 Specify the channel for which IO CO interrupt 0 request is enabled 2 Specify the set value for interrupt enable r...

Страница 133: ...ay in which the callback function is stored If this pointer is not specified RAPI_NULL is set H8 300H Specify a pointer to the variable in which the callback function is stored If this pointer is not...

Страница 134: ...void void func void unsigned int p_func void TimerIntFunc0 void TimerIntFunc1 void TimerIntFunc2 unsigned char p_ic 1 2 3 unsigned int p_cmp 0x1234 0x9876 Set up timer C as output compare mode __Creat...

Страница 135: ...D channel 1 RAPI_TIMER_RE Selects timer RE RAPI_TIMER_ON Sets the timer that is set to output compare mode to start operating RAPI_TIMER_OFF Sets the timer that is set to output compare mode to stop o...

Страница 136: ...10J1643 0101 134 guaranteed The specifiable timers differ with each CPU used Program example include rapi_timer_r8c_13 h void func void Enable timer C as output compare mode __EnableOutputCompare RAPI...

Страница 137: ..._TIMER_Z0 Selects timer Z channel 0 RAPI_TIMER_Z1 Selects timer Z channel 1 RAPI_TIMER_RC Selects timer RD0 RAPI_TIMER_RD0 Selects timer RD0 channe 0 RAPI_TIMER_RD1 Selects timer RD0 channe 1 RAPI_TIM...

Страница 138: ...Rev 1 01 2007 02 16 RJJ10J1643 0101 136 void func void Destroy the setting of timer C as output compare mode __DestroyOutputCompare RAPI_TIMER_C...

Страница 139: ...l 0 RAPI_TIMER_B1 Selects timer B channel 1 RAPI_TIMER_B2 Selects timer B channel 2 RAPI_TIMER_S Selects timer S R8C RAPI_TIMER_C Selects timer C RAPI_TIMER_X Selects timer X RAPI_TIMER_Y Selects time...

Страница 140: ...set value for the count source divide by n register 5 Specify the set value for time measurement control register 0 6 Specify the set value for time measurement control register 1 7 Specify the set va...

Страница 141: ...imer Y RAPI_TIMER_Y specified 0 Specify the set value for the timer count source setup register 1 Specify the set value for the prescaler Y register 2 Specify the set value for the timer Y primary reg...

Страница 142: ...t value for the timer RD status register i i 0 1 12 Specify the set value for the timer RD interrupt enable register i i 0 1 13 Specify the set value for the timer RD counter i i 0 1 14 Specify the se...

Страница 143: ...ter 5 Specify the set value for the timer counter 6 Specify the set value for general register A i i 0 1 7 Specify the set value for general register B i i 0 1 8 Specify the set value for general regi...

Страница 144: ...gister D_i i 0 1 11 Specify the set value for timer RD control register_i i 0 1 12 Specify the set value for timer RD I O control register A_i i 0 1 13 Specify the set value for timer RD I O control r...

Страница 145: ...IMER_B1 Selects timer B channel 1 RAPI_TIMER_B2 Selects timer B channel 2 RAPI_TIMER_S Selects timer S RAPI_TIMER_ON Sets the selected timer to start operating RAPI_TIMER_OFF Sets the selected timer t...

Страница 146: ...ister manipulation Reference __SetTimerRegister __ClearTimerRegister __GetTimerRegister Remark If an undefined value is specified in the argument operation of the API cannot be guaranteed The specifia...

Страница 147: ...ects timer B channel 1 RAPI_TIMER_B2 Selects timer B channel 2 RAPI_TIMER_S Selects timer S R8C RAPI_TIMER_C Selects timer C RAPI_TIMER_X Selects timer X RAPI_TIMER_Y Selects timer Y RAPI_TIMER_Z Sele...

Страница 148: ...er register manipulation Reference __SetTimerRegister __EnableTimerRegister __GetTimerRegister Remark If an undefined value is specified in the argument operation of the API cannot be guaranteed The s...

Страница 149: ...annel 0 RAPI_TIMER_B1 Selects timer B channel 1 RAPI_TIMER_B2 Selects timer B channel 2 RAPI_TIMER_S Selects timer S R8C RAPI_TIMER_C Selects timer C RAPI_TIMER_X Selects timer X RAPI_TIMER_Y Selects...

Страница 150: ...ue of the count source divide by n register 5 Store the value of time measurement control register 0 6 Store the value of time measurement control register 1 7 Store the value of time measurement cont...

Страница 151: ...up register 1 Store the value of the prescaler X register 2 Store the value of the timer X register 3 Store the value of the timer X mode register When using timer Y RAPI_TIMER_Y specified 0 Store the...

Страница 152: ...timer RD I O control register Ai i 0 1 10 Specify the set value for the timer RD I O control register Ci i 0 1 11 Specify the set value for the timer RD status register i i 0 1 12 Specify the set val...

Страница 153: ...the value of the timer output master enable register 5 Store the value of the timer output control register 6 Store the value of timer counter_i i 0 1 7 Store the value of general register A_i i 0 1...

Страница 154: ..._i i 0 1 10 Specify the set value for general register D_i i 0 1 11 Specify the set value for timer RD control register_i i 0 1 12 Specify the set value for timer RD I O control register A_i i 0 1 13...

Страница 155: ...ORT_1_2 Port P12 RAPI_PORT_1_3 Port P13 RAPI_PORT_1_4 Port P14 RAPI_PORT_1_5 Port P15 RAPI_PORT_1_6 Port P16 RAPI_PORT_1_7 Port P17 RAPI_PORT_2_0 Port P20 RAPI_PORT_2_1 Port P21 RAPI_PORT_2_2 Port P22...

Страница 156: ...P01 RAPI_PORT_0_2 Port P02 RAPI_PORT_0_3 Port P03 RAPI_PORT_0_4 Port P04 RAPI_PORT_0_5 Port P05 RAPI_PORT_0_6 Port P06 RAPI_PORT_0_7 Port P07 RAPI_PORT_1_0 Port P10 RAPI_PORT_1_1 Port P11 RAPI_PORT_1_...

Страница 157: ..._6 Port P36 RAPI_PORT_3_7 Port P37 RAPI_PORT_5_0 Port P50 RAPI_PORT_5_1 Port P51 RAPI_PORT_5_2 Port P52 RAPI_PORT_5_3 Port P53 RAPI_PORT_5_4 Port P54 RAPI_PORT_5_5 Port P55 RAPI_PORT_5_6 Port P56 RAPI...

Страница 158: ...port for input RAPI_PORT_OUTPUT Sets a selected port for output RAPI_PULLED_HIGH Sets a selected port to be pulled high RAPI_NOT_PULLED_HIGH Sets a selected port not to be pulled high data2 M16C Speci...

Страница 159: ...Rev 1 01 2007 02 16 RJJ10J1643 0101 157 Program example include rapi_io_port_r8c_13 h void func void Set up port P03 as input port __SetIOPort RAPI_PORT_0_3 RAPI_PORT_INPUT RAPI_PULLED_HIGH 0 0...

Страница 160: ...RAPI_PORT_2_0 Port P20 RAPI_PORT_2_1 Port P21 RAPI_PORT_2_2 Port P22 RAPI_PORT_2_3 Port P23 RAPI_PORT_2_4 Port P24 RAPI_PORT_2_5 Port P25 RAPI_PORT_2_6 Port P26 RAPI_PORT_2_7 Port P27 RAPI_PORT_3_0 Po...

Страница 161: ...ORT_2_7 Port P27 RAPI_PORT_3_0 Port P30 RAPI_PORT_3_1 Port P31 RAPI_PORT_3_2 Port P32 RAPI_PORT_3_3 Port P33 RAPI_PORT_3_4 Port P34 RAPI_PORT_3_5 Port P35 RAPI_PORT_3_7 Port P37 RAPI_PORT_4_2 Port P42...

Страница 162: ...7 PortP97 RAPI_PORT_B_0 PortPB0 RAPI_PORT_B_1 PortPB1 RAPI_PORT_B_2 PortPB2 RAPI_PORT_B_3 PortPB3 RAPI_PORT_B_4 PortPB4 RAPI_PORT_B_5 PortPB5 RAPI_PORT_B_6 PortPB6 RAPI_PORT_B_7 PortPB7 RAPI_PORT_C_0...

Страница 163: ...onality I O port Reference __SetIOPort __WriteIOPort __SetIOPortRegister __ReadIOPortRegister __WriteIOPortRegister Remark If an undefined value is specified in the first argument operation of the API...

Страница 164: ...0 RAPI_PORT_2_1 Port P21 RAPI_PORT_2_2 Port P22 RAPI_PORT_2_3 Port P23 RAPI_PORT_2_4 Port P24 RAPI_PORT_2_5 Port P25 RAPI_PORT_2_6 Port P26 RAPI_PORT_2_7 Port P27 RAPI_PORT_3_0 Port P30 RAPI_PORT_3_1...

Страница 165: ...ort P27 RAPI_PORT_3_0 Port P30 RAPI_PORT_3_1 Port P31 RAPI_PORT_3_2 Port P32 RAPI_PORT_3_3 Port P33 RAPI_PORT_3_4 Port P34 RAPI_PORT_3_5 Port P35 RAPI_PORT_3_7 Port P37 RAPI_PORT_4_3 Port P43 RAPI_POR...

Страница 166: ...RT_C_1 PortPC1 RAPI_PORT_C_2 PortPC2 RAPI_PORT_C_3 PortPC3 RAPI_PORT_D_0 PortPD0 RAPI_PORT_D_1 PortPD1 RAPI_PORT_D_2 PortPD2 RAPI_PORT_D_3 PortPD3 RAPI_PORT_D_4 PortPD4 RAPI_PORT_D_5 PortPD5 RAPI_PORT...

Страница 167: ...defined value is specified in the first argument operation of the API cannot be guaranteed The specifiable I O ports differ with each CPU used Program example include rapi_io_port_r8c_13 h void func v...

Страница 168: ...ed to port settings are described below RAPI_LATCH Set to read the port latch regardless of whether the port is set for input or output Specifiable only when port P1 is used R8C The definition values...

Страница 169: ...ort P1 is used When using any other port set 0 for this data R8C Specify the set value for the port P1 drive capacity register Specifiable only when port P1 is used When using any other port set 0 for...

Страница 170: ...RAPI_PORT_1 Port P1 register RAPI_PORT_2 Port P2 register RAPI_PORT_3 Port P3 register RAPI_PORT_4 Port P4 register RAPI_PORT_6 Port P6 register H8 300H RAPI_PORT_1 Port P1 register RAPI_PORT_2 Port...

Страница 171: ...ts in port B of the H8 300H that are used as analog input pins cannot be used as input ports Program example include rapi_io_port_r8c_13 h void func void unsigned int data Get the value of port P1 reg...

Страница 172: ...P1 register RAPI_PORT_2 Port P2 register RAPI_PORT_3 Port P3 register RAPI_PORT_4 Port P4 register RAPI_PORT_6 Port P6 register H8 300H RAPI_PORT_1 Port P1 register RAPI_PORT_2 Port P2 register RAPI_P...

Страница 173: ...Rev 1 01 2007 02 16 RJJ10J1643 0101 171 Program example include rapi_io_port_r8c_13 h void func void Set the data to port P1 register __WriteIOPortRegister RAPI_PORT_1 0xFF...

Страница 174: ...INT5 Uses _INT5 interrupt RAPI_KEY Uses key input interrupt RAPI_INT_RISING Specifies a rising edge for the active edge of a selected external interrupt RAPI_INT_FALLING Specifies a falling edge for t...

Страница 175: ...ng edge is the active edge RAPI_KI3_RISING Enables _KI3 pin input whose rising edge is the active edge Specifiable definition values when _INT0 to _INT3 interrupt is used RAPI_INT0 to RAPI_INT3 specif...

Страница 176: ...ied Polarity Specify one from RAPI_INT_RISING RAPI_INT_FALLING The default value is RAPI_INT_FALLING Interrupt request Specify one from RAPI_NOT_INT_REQUEST RAPI_INT_REQUEST The default value is RAPI_...

Страница 177: ...eration of the API cannot be guaranteed The specifiable external interrupts differ with each CPU used For the R8C if its CPU type is the one that does not accept specification of both edges for interr...

Страница 178: ...3 Uses _INT3 interrupt RAPI_INT4 Uses _INT4 interrupt RAPI_INT5 Uses _INT5 interrupt RAPI_KEY Uses key input interrupt R8C RAPI_INT0 Uses _INT0 interrupt RAPI_INT1 Uses _INT1 interrupt RAPI_INT2 Uses...

Страница 179: ...terrupt Reference __SetInterrupt __GetInterruptFlag __ClearInterruptFlag Remark If an undefined value is specified in the first argument operation of the API cannot be guaranteed The specifiable exter...

Страница 180: ..._INT5 Uses _INT5 interrupt RAPI_KEY Uses key input interrupt R8C RAPI_INT0 Uses _INT0 interrupt RAPI_INT1 Uses _INT1 interrupt RAPI_INT2 Uses _INT2 interrupt RAPI_INT3 Uses _INT3 interrupt RAPI_KEY Us...

Страница 181: ...InterruptFlag Remark If an undefined value is specified in the first argument operation of the API cannot be guaranteed The specifiable external interrupts differ with each CPU used Program example in...

Страница 182: ...PI_INT1 Uses _INT1 interrupt RAPI_INT2 Uses _INT2 interrupt RAPI_INT3 Uses _INT3 interrupt RAPI_KEY Uses key input interrupt H8 300H RAPI_IRQ0 Uses IRQ0 interrupt RAPI_IRQ1 Uses IRQ1 interrupt RAPI_IR...

Страница 183: ...JJ10J1643 0101 181 be guaranteed The specifiable external interrupts differ with each CPU used Program example include rapi_interrupt_r8c_13 h void func void Clear status of _INT0 interrupt __ClearInt...

Страница 184: ...eat sweep mode 0 RAPI_REPEAT_SWEEP1 Selects repeat sweep mode 1 RAPI_SIMULTANEOUS_ SAMPLE_SWEEP Selects simultaneous sampling sweep mode RAPI_DELAYED_TRIGGER0 Selects delayed trigger mode 0 RAPI_DELAY...

Страница 185: ...the AD converter s resolution to 10 bits RAPI_8BIT Sets the AD converter s resolution to 8 bits RAPI_AD_ON Sets the AD converter to start operating RAPI_AD_OFF Sets the AD converter to stop operating...

Страница 186: ...The default value is RAPI_WITHOUT_SAMPLE_HOLD Trigger Specify one from RAPI_SOFTWARE_TRIGGER RAPI_EXTERNAL_TRIGGER The default value is RAPI_SOFTWARE_TRIGGER Specifiable definition values when single...

Страница 187: ...UT_SAMPLE_HOLD The default value is RAPI_WITHOUT_SAMPLE_HOLD Trigger Specify one from RAPI_SOFTWARE_TRIGGER RAPI_EXTERNAL_TRIGGER The default value is RAPI_SOFTWARE_TRIGGER Specifiable definition valu...

Страница 188: ...in for the analog input pin RAPI_AN4 Uses AN4 pin for the analog input pin RAPI_AN5 Uses AN5 pin for the analog input pin RAPI_AN6 Uses AN6 pin for the analog input pin RAPI_AN7 Uses AN7 pin for the a...

Страница 189: ...Specifiable definition values when repeat mode is used RAPI_REPEAT specified Input pin Specify one from RAPI_AN0 RAPI_AN1 RAPI_AN2 RAPI_AN3 RAPI_AN4 RAPI_AN5 RAPI_AN6 RAPI_AN7 RAPI_AN8 RAPI_AN9 RAPI_A...

Страница 190: ...AD converter to stop operating in __CreateAD RAPI_RISING_TRIGGER Includes a rising edge external trigger in the A D conversion start condition RAPI_FALLING_TRIGGER Includes a falling edge external tri...

Страница 191: ...ating states set Specify one from RAPI_AD_ON RAPI_AD_OFF The default value is RAPI_AD_OFF Trigger Specify one from RAPI_RISING_TRIGGER RAPI_FALLING_TRIGGER If no triggers are specified Trigger input d...

Страница 192: ...nality A D converter Reference __EnableADC __DestroyADC __GetADC __GetADCAll Remark If an undefined value is specified in the first argument operation of the API cannot be guaranteed The specifiable a...

Страница 193: ...when one shot mode or repeat mode is used RAPI_AN6 Uses AN6 pin for the analog input pin Selectable only when one shot mode or repeat mode is used RAPI_AN7 Uses AN7 pin for the analog input pin Selec...

Страница 194: ...AN32 pin for the analog input pin Selectable only when one shot mode or repeat mode is used RAPI_P0_GROUP Uses port P0 group for the analog input pin Selectable only when sweep mode repeat sweep mode...

Страница 195: ...mode is used RAPI_AN5 Uses AN5 pin for the analog input pin Selectable only when one shot mode or repeat mode is used RAPI_AN6 Uses AN6 pin for the analog input pin Selectable only when one shot mode...

Страница 196: ...g data2 M16C The set value differs with the A D conversion mode used One shot mode Specify 1 Repeat mode Single sweep mode Specify 2 4 6 or 8 Repeat sweep mode 0 Simultaneous sampling mode Delayed tri...

Страница 197: ...Rev 1 01 2007 02 16 RJJ10J1643 0101 195 void func void Disable A D converter __EnableADC RAPI_AN0 RAPI_AD_OFF 1...

Страница 198: ...ue If converter setting was successfully discarded RAPI_TRUE is returned if failed RAPI_FALSE is returned Functionality A D converter Reference __CreateADC __EnableADC __GetADC __GetADCAll Remark When...

Страница 199: ...register 4 RAPI_AD5 Selects A D register 5 RAPI_AD6 Selects A D register 6 RAPI_AD7 Selects A D register 7 R8C Specify 0 H8 300H RAPI_ADDRA Selects A D data register A RAPI_ADDRB Selects A D data reg...

Страница 200: ...bytes 1 A D register 1 2 A D register 2 3 A D register 3 4 A D register 4 5 A D register 5 6 A D register 6 7 A D register 7 R8C 2 bytes A D register H8 300H 0 A D register A 8 bytes 1 A D register B...

Страница 201: ...is stored in the second low order bit of status When used in the M16C the value of A D conversion status register 0 is stored in the 8 high order bits of status Configuration of status Value of A D c...

Страница 202: ...pecify the value of A D conversion status register 0 in the 8 high order bits of status Write 0 to the bits to be cleared and 1 to the bits that do not need to be cleared Configuration of status Value...

Страница 203: ...Rev 1 01 2007 02 16 RJJ10J1643 0101 201 Renesas Embedded Application Programming Interface Reference Manual Rev 1 01 Issued April 2007...

Страница 204: ...1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan Renesas Embedded Application Programming Interface REJ10J1502 0101 Reference manual...

Отзывы: