Renesas M16C/62P Group Bedienungsanleitung
- Schauen Sie die Anleitung online durch oderladen Sie diese herunter
- 98 Seiten
- 0.51 mb
Zur Seite of
Ähnliche Gebrauchsanleitungen
-
Computer Hardware
Renesas 7542
4 Seiten 0.15 mb -
Computer Hardware
Renesas HS1653ECN61H
36 Seiten 0.35 mb -
Computer Hardware
Renesas 3803L
4 Seiten 0.24 mb -
Computer Hardware
Renesas M3T-DUMMY64
4 Seiten 0.11 mb -
Computer Hardware
Renesas H8/3644 Series
22 Seiten 0.42 mb -
Computer Hardware
Renesas M30260T-48FPD
4 Seiten 0.21 mb -
Computer Hardware
Renesas DP-64S
15 Seiten 0.29 mb -
Computer Hardware
Renesas M34502T-MCU
38 Seiten 0.22 mb
Richtige Gebrauchsanleitung
Die Vorschriften verpflichten den Verkäufer zur Übertragung der Gebrauchsanleitung Renesas M16C/62P Group an den Erwerber, zusammen mit der Ware. Eine fehlende Anleitung oder falsche Informationen, die dem Verbraucher übertragen werden, bilden eine Grundlage für eine Reklamation aufgrund Unstimmigkeit des Geräts mit dem Vertrag. Rechtsmäßig lässt man das Anfügen einer Gebrauchsanleitung in anderer Form als Papierform zu, was letztens sehr oft genutzt wird, indem man eine grafische oder elektronische Anleitung von Renesas M16C/62P Group, sowie Anleitungsvideos für Nutzer beifügt. Die Bedingung ist, dass ihre Form leserlich und verständlich ist.
Was ist eine Gebrauchsanleitung?
Das Wort kommt vom lateinischen „instructio”, d.h. ordnen. Demnach kann man in der Anleitung Renesas M16C/62P Group die Beschreibung der Etappen der Vorgehensweisen finden. Das Ziel der Anleitung ist die Belehrung, Vereinfachung des Starts, der Nutzung des Geräts oder auch der Ausführung bestimmter Tätigkeiten. Die Anleitung ist eine Sammlung von Informationen über ein Gegenstand/eine Dienstleistung, ein Hinweis.
Leider widmen nicht viele Nutzer ihre Zeit der Gebrauchsanleitung Renesas M16C/62P Group. Eine gute Gebrauchsanleitung erlaubt nicht nur eine Reihe zusätzlicher Funktionen des gekauften Geräts kennenzulernen, sondern hilft dabei viele Fehler zu vermeiden.
Was sollte also eine ideale Gebrauchsanleitung beinhalten?
Die Gebrauchsanleitung Renesas M16C/62P Group sollte vor allem folgendes enthalten:
- Informationen über technische Daten des Geräts Renesas M16C/62P Group
- Den Namen des Produzenten und das Produktionsjahr des Geräts Renesas M16C/62P Group
- Grundsätze der Bedienung, Regulierung und Wartung des Geräts Renesas M16C/62P Group
- Sicherheitszeichen und Zertifikate, die die Übereinstimmung mit entsprechenden Normen bestätigen
Warum lesen wir keine Gebrauchsanleitungen?
Der Grund dafür ist die fehlende Zeit und die Sicherheit, was die bestimmten Funktionen der gekauften Geräte angeht. Leider ist das Anschließen und Starten von Renesas M16C/62P Group zu wenig. Eine Anleitung beinhaltet eine Reihe von Hinweisen bezüglich bestimmter Funktionen, Sicherheitsgrundsätze, Wartungsarten (sogar das, welche Mittel man benutzen sollte), eventueller Fehler von Renesas M16C/62P Group und Lösungsarten für Probleme, die während der Nutzung auftreten könnten. Immerhin kann man in der Gebrauchsanleitung die Kontaktnummer zum Service Renesas finden, wenn die vorgeschlagenen Lösungen nicht wirksam sind. Aktuell erfreuen sich Anleitungen in Form von interessanten Animationen oder Videoanleitungen an Popularität, die den Nutzer besser ansprechen als eine Broschüre. Diese Art von Anleitung gibt garantiert, dass der Nutzer sich das ganze Video anschaut, ohne die spezifizierten und komplizierten technischen Beschreibungen von Renesas M16C/62P Group zu überspringen, wie es bei der Papierform passiert.
Warum sollte man Gebrauchsanleitungen lesen?
In der Gebrauchsanleitung finden wir vor allem die Antwort über den Bau sowie die Möglichkeiten des Geräts Renesas M16C/62P Group, über die Nutzung bestimmter Accessoires und eine Reihe von Informationen, die erlauben, jegliche Funktionen und Bequemlichkeiten zu nutzen.
Nach dem gelungenen Kauf des Geräts, sollte man einige Zeit für das Kennenlernen jedes Teils der Anleitung von Renesas M16C/62P Group widmen. Aktuell sind sie genau vorbereitet oder übersetzt, damit sie nicht nur verständlich für die Nutzer sind, aber auch ihre grundliegende Hilfs-Informations-Funktion erfüllen.
Inhaltsverzeichnis der Gebrauchsanleitungen
-
Seite 1
www.renesas.com Reference Manual REC10 B 0002-0100 M16C/62P Group Renesas Embedded Application Programming Interface Reference Manual Rev .1.00 Revision Date: Nov .1, 2007[...]
-
Seite 2
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 2 Renesas Embedded Application Programming Interface Reference Manual <M16C/62P Group>[...]
-
Seite 3
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 3 T able of Contents T able of Contents ............................................................... 3 1. Introduction ................................................................... 5 2. Driver ....................................................................... 6 2.1 Overview ......................[...]
-
Seite 4
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 4 __DestroyT imer .......................................................... 43 __CreateEven tCounter ..................................................... 44 __EnableEve ntCounter ..................................................... 47 __DestroyEventC ounter ..................................................[...]
-
Seite 5
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 5 1. Introduction The Renesas Embe dded Applicati o n Programmin g Interface (API) is a unified API for the microcomputers ma de by Re nesas T e chnology Corporation.[...]
-
Seite 6
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 6 2. Driver 2.1 Overview The library described herein pr ovid es a peripheral facility control program (peripheral driver) for microc omputers. Use of t he Renesas API perm its the peripheral driver t o be built into a user program. 2.2 Driver Features The library described herein has the following features av[...]
-
Seite 7
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 7 2.3 Serial Interface Driver The serial interf ace driver sets serial communicati on, clears settings, transmit/recei ves data, and controls the status of serial communicat ion. There are two kinds of serial in terface driver: a single-data transm ission/recept ion API and a multi-data transmission/reception [...]
-
Seite 8
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 8 2.4 Timer Driver The timer driver sets th e timer , clears timer settings, c o ntrols timer oper ation, and acquires a counter value with respect to the following mod es: • Timer mode • Event counter mode • Pulse width modulation mode (PWM mode) • Pulse period m easurement mode • Pulse width measur[...]
-
Seite 9
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 9 2.5 I/O Port Driver The I/O port driver sets the I/O port for inpu t or output, writes data to th e I/O port, and reads data from the I/O port.[...]
-
Seite 10
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 10 2.6 External Interrupt Driver The external interru pt driver sets external interrupts, controls external interru pts, acquires the status of ext e rnal interrupt fl ags, and clears external interrupt flags.[...]
-
Seite 11
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 11 2.7 A/D Converter Drive r The A/D converter dr iver sets the A/ D converter , controls t he A/D converter , clears settings of the A/D con verter , acquires the A/D convert er value, acquires the status of the A/D converter , and clears the status of the A/D converter .[...]
-
Seite 12
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 12 3. St andard T ypes This section describes the st andard types defined in the library . For details about the set values, refer to the description of each API. St andard type Description Boolean The Boolean type represents the enum-type data that indic ates whether successful (R API_TRUE (= 1)) or failed (R[...]
-
Seite 13
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 13 4. Library Reference 4.1 API List by Peripheral Facility The table below lists the Renesas Embedded APIs classified by peripheral facility . NO Facility classification API A PI operation 1 __BasicOpenSerialDriver Opens serial port 2 __BasicCloseSerial Driver Closes serial port 3 __BasicSetSerialFormat Sets [...]
-
Seite 14
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 14 35 __CreatePulseWidthMeasure mentMode Sets pulse width measurement mode 36 __EnablePulseWidthMeasurem entMode Controls operat ion of puls e width measurement mode 37 __DestroyPulseWidthMeasurementMode Clears s etting of pulse width measurement mode 38 __GetPulseWidthMeasurementMode Acquir es meas ured value[...]
-
Seite 15
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 15 4.2 Description of Each API This section describes each API and explains how to use them, showing a program example for each. The description of eac h API is divided int o the followin g items. • Synop sis : Outlines the content of processing performed by the f unction. It also shows the syntax of the fun[...]
-
Seite 16
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 16 4.2.1 Serial I/O __BasicOpenSerialDriver Synopsis <Open a serial port> Boolean __BasicOpenSerialDri ver(unsigned long data) data Setup data Description Opens and initializes a specifi ed seri al port. For dat a, the follo wing values can be set. RAPI_COM1 UART0 RAPI_COM2 UART1 RAPI_COM3 UART2 RAPI_COM[...]
-
Seite 17
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 17 __BasicCloseSerialDriver Synopsis <Close a serial port> Boolean __BasicClos eSerialDri ver(unsigned long dat a) data Setup data Description Closes a specified serial p ort. For data, the following values can be set. RAPI_COM1 UART0 RAPI_COM2 UART1 RAPI_COM3 UART2 RAPI_COM4 SI/O3 RAPI_COM5 SI/O4 Return[...]
-
Seite 18
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 18 __BasicSetSerialFormat Synopsis <Set serial communication> Boolean __Bas icSetSerialFormat(unsign ed long dat a1, unsigned cha r dat a2) data1 Setup data 1 data2 Setup data 2 Description Sets serial communication according to specified parameters. [data1] For data1, the following values can be set. T [...]
-
Seite 19
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 19 If the API is used in clock synchronous seri a l communication mode, do not set these values. (UART0, UAR T 1, UART2) RAPI_P ARIT Y_NON No parity bit R API_P ARITY_EVEN Even parity bit RAPI_P ARITY_ ODD Odd parity bit For the clock polarity of serial communic atio n , the following values can be set. If the[...]
-
Seite 20
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 20 If serial communication was successfully set, R API_TRUE is returned; if settings failed, RAPI_F ALSE is returned. Functionality Serial I/O Reference Remark • If an undefined value is spec ified in the first argument, operation of the A PI cannot be guaranteed. Program example #include ”rapi_sif_m16c_62[...]
-
Seite 21
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 21 __BasicSt artSerialReceiving Synopsis <Receive 1 data> Boolean __Bas icSt artSerialReceiving(uns igned long dat a) data Setup data Description S tarts receiving 1 data of serial communication. [data] For data, the following values can be set. RAPI_COM1 UART0 RAPI_COM2 UART1 RAPI_COM3 UART2 RAPI_COM4 S[...]
-
Seite 22
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 22 __BasicSt artSerialSending Synopsis <Transmit 1 dat a> Boolean _Basic St artSerialSending( unsigned long dat a1, unsigned int da ta2) data Setup data data T ransmit data Description S tarts sending 1 data of serial communication. For dat a1, the following values can be set. RAPI_COM1 UART0 RAPI_COM2 U[...]
-
Seite 23
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 23 __BasicReceivingSt atusRead Synopsis <Read receive status> unsigned int _ _BasicRece ivingSt atusRead(unsigned lo ng dat a) data Setup data Description Returns the re ceive status of serial communication. [data] For data, the following values can be set. RAPI_COM1 UART0 RAPI_COM2 UART1 RAPI_COM3 UART2[...]
-
Seite 24
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 24 __BasicSendingSt atusRead Synopsis <Read transmit status> Boolean __BasicSe ndingS ta tus R ea d(uns igne d long data) data Setup data Description Returns the transmit status of serial comm unication. For data, the following values can be set. RAPI_COM1 UART0 RAPI_COM2 UART1 RAPI_COM3 UART2 RAPI_COM4 [...]
-
Seite 25
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 25 __BasicStopSerialReceiving Synopsis <S top reception> Boolean Rapi_B asicS topSerialReceiving(unsigned long da t a) data Setup data Description S tops receiving data in serial communication [data] For data, the following values can be set. RAPI_COM1 UART0 RAPI_COM2 UART1 RAPI_COM3 UART2 Return value I[...]
-
Seite 26
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 26 __BasicStopSerialSending Synopsis <S top transmission> Boolean __Bas icSt opSerialSending(uns igned long da t a) data Setup data Description S tops transmitting data in serial communication. [data] For data, the following values can be set. RAPI_COM1 UART0 RAPI_COM2 UART1 RAPI_COM3 UART2 Return value [...]
-
Seite 27
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 27 __OpenSerialDriver Synopsis <Open a serial port> Boolean __OpenSeria lDriver(unsigned long da ta) data Setup data Description Opens and initializes a specifi ed seri al port. [data] For data, the following values can be set. RAPI_COM1 UART0 RAPI_COM2 UART1 RAPI_COM3 UART2 RAPI_COM4 SI/O3 RAPI_COM5 SI/[...]
-
Seite 28
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 28 __CloseSerialDriver Synopsis <Close a serial port> Boolean __Clos eSerialDriver(unsigne d long data) data Setup data Description Closes a specif ied serial port. [data] For data, the following values can be set. RAPI_COM1 UART0 RAPI_COM2 UART1 RAPI_COM3 UART2 RAPI_COM4 SI/O3 RAPI_COM5 SI/O4 Return val[...]
-
Seite 29
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 29 __ConfigSerialDriverNotify Synopsis <Register a notifi cation function> Boolean __ConfigSerialDriv erNotify(unsigned lo ng data, V oidFuncNoti fy *func) data Setup data func Function pointer to be registered Description Regist ers the notification f unction necessary to get various transmit/rece ive i[...]
-
Seite 30
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 30 Return value If the serial port specification is inco rr ect, RAPI_F ALSE is returned; otherwise, RAPI_TRUE is returned. Functionality Serial I/O Reference __S tartSerialReceiving , __S tartSerialSending Remark • If an undefined value is specified in the fi rst argument, operation of the API cannot be gua[...]
-
Seite 31
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 31 __SetSerialFormat Synopsis <Set serial communication> Boolean __SetSeria lFormat(unsigned long dat a1, unsigned char da ta 2) data1 Setup data 1 data2 Setup data 2 Description Sets serial communication according to spec ified parameters. For details about parameters, refer to the description of __Basi[...]
-
Seite 32
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 32 __SetSerialInterrupt Synopsis < Set serial inte rrupts> Boolean __SetSerialInterrupt(unsigne d l ong da t a) data Setup data Description Sets serial interrupts accord ing to specified parameters. [data] For data, the following values can be set. RAPI_COM1 UART0 RAPI_COM2 UART1 RAPI_COM3 UART2 RAPI_COM[...]
-
Seite 33
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 33 Functionality Serial I/O Reference Remark • If an undefined value is specified in the ar gument, operation of the API cann ot be guaranteed. Program example #include ”rapi_sif_m16c_62p” Boolean func( void ) { /* Set interrupt of RAPI_COM1 to serial driver */ return __SetSerialInterrupt( RAPI_COM1 | RA[...]
-
Seite 34
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 34 __St artSerialReceiving Synopsis <S tart reception> Boolean __S tartSerialReceiv i ng(unsigned long da ta, unsigned char wordNum, unsigned int *Rcv DtBuf) data Setup data wordNum Number of words received RcvDtBuf Pointer to the buffer in which received data is stored Description S tarts reception of s[...]
-
Seite 35
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 35 __St artSerialSending Synopsis <S tart transmission> Boolean __S tartSerialSending(unsigne d long dat a, unsigned char w ordNum, unsigned int *SndDtBuf) data Setup data wordNum Number of words transmitted SndDtBuf Pointer to the transmit data Description S tarts transmission of serial communication an[...]
-
Seite 36
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 36 __StopSerialReceiving Synopsis <S top reception> Boolean __StopSerialReceiving( u nsigned long data) data Setup data Description S tops reception of serial communic ation. [data] For data, the following values can be set. RAPI_COM1 UART0 RAPI_COM2 UAR T1 RAPI_COM3 UART2 Return value If reception of se[...]
-
Seite 37
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 37 __StopSerialSending Synopsis <S top transmission> Boolean __S topSerialSending(unsigned long data) data Setup data Description S tops transmission of serial communicatio n. [data] For data, the following values can be set. RAPI_COM1 UART0 RAPI_COM2 UART1 RAPI_COM3 UART2 Return value If transmission of[...]
-
Seite 38
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 38 __PollingSerialReceiving Synopsis <Polling reception> Boolean __PollingSerialRecei ving(unsigned lon g data ) data Setup data Description Performs reception of serial communicatio n by polling. This API gets received data by an amount specified by __St a rtSerialReceivi ng. When ac quisition of receiv[...]
-
Seite 39
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 39 __PollingSerialSending Synopsis <Polling transmission> Boolean __PollingSerialSe nding(unsigne d long data) data Setup data Description Performs transmission of serial communicati on by polling. This API sends transmit data by an amount specified by __St artSerialS ending from the transmit data buffer[...]
-
Seite 40
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 40 4.2.2 Timer __CreateTimer Synopsis <Set timer mode> Boolean __Cre ateT imer(unsigned long dat a1, unsigned int dat a2, unsigned int dat a3, unsigned int dat a4, void* func) data1 Setup data 1 data2 Setup data 2 data3 Setup data 3 data4 Setup data 4 func Callback function pointer (S pecify 0 if no call[...]
-
Seite 41
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 41 (Count sou rce) S pecify one from { RAPI_ F1, RAPI_F2, RAPI_F8, RAPI_F32, RAPI_FC32 }. The default value is RAPI_F2. (Operating states set) Specify one from { RAPI_TIMER_ON, RAPI_TI MER_OFF }. The default value is RAPI_TIMER_OFF . (Pulse output state) S pecify one from { RAPI_PULSE_ON, RAPI_PULSE_OFF }. The[...]
-
Seite 42
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 42 __EnableTimer Synopsis <Control o peration of timer mode> Boolean __EnableT imer(unsigned long dat a) data Setup data Description Controls operation of the tim er that is se t to specified timer mode by starting or stopping it. [data] For data, the following definition values can b e set. T o set mult[...]
-
Seite 43
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 43 __DestroyTimer Synopsis <Discard settings of timer mode> Boolean __DestroyT imer(unsigned long dat a) data Setup data Description Discards settings of the timer that is set to specified timer mode. [data] For data, the following definition values can be set. RAPI_TIMER_A0 Selects timer A channel 0. RA[...]
-
Seite 44
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 44 __CreateEventCounter Synopsis <Set event counter mode> Boolean __Cre ateEventCounter(unsigne d long data 1, unsigned int data2, unsigned int data3, unsigne d int data4, void* fu nc) data1 Setup data 1 data2 Setup data 2 data3 Setup data 3 data4 Setup data 4 func Callback function pointer (S pecify 0 i[...]
-
Seite 45
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 45 RAPI_UP_COUNT Selects up-count for the count operation. RAPI_DOWN_COUNT Selects down-count for the count operation. RAPI_UDF_REGISTER Selects the UDF register for the cause of up/down switching. RAPI_T AIOUT Selects the input signal at T A iOU T pin for the cause of up/do wn switching. RAPI_RISING Selects t[...]
-
Seite 46
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 46 [data4] Specify 0. Return value If the timer specification is incorrect, R API_F ALSE is returned; other wise, RAPI_TRUE is returned. Functionality T imer (event counter mode) Reference __EnableEventCounter , __DestroyEventCounter , __GetEve ntCounter Remark • If an undefined value is specified i n the fi[...]
-
Seite 47
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 47 __EnableEventCounter Synopsis <Control operation of event counter mode> Boolean __Enable E ventCounter(uns igned long data) data Setup data Description Controls operation of the timer that is set to specified timer mode b y starting or stopping it. [data] For data, the following definition values can [...]
-
Seite 48
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 48 __DestroyEventCounter Synopsis <Discard settings of event counter mode> Boolean __Des troyEventCounter(unsigne d long data ) data Setup data Description Discards settings of the timer that is set to specified timer mode. [data] For data, the following definition values can be set. RAPI_TIMER_A0 Select[...]
-
Seite 49
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 49 __GetEventCounter Synopsis <Get event counter mode counter value> Boolean __GetEv entCounter(unsigned long da ta 1, unsigned int *dat a2) data1 Setup data 1 data2 Pointer to the buffer in which counter value is stored Description Gets the counter value of the timer that is set to specified event count[...]
-
Seite 50
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 50 __CreatePulseWid thMo dulationMode Synopsis <Set pulse width modulation mode> Boolean __Cre atePuls eWid thModulationMode(unsig ned long dat a1, unsigned int dat a2, unsigned int* dat a3, void* dat a4) data1 Setup data 1 data2 Setup data 2 data3 Setup data 3 func Callback function pointer (S pecify 0 [...]
-
Seite 51
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 51 RAPI_F ALLING Select s the falling edge of T A iIN pin input signal as active edge. • Specifiable definition values when timer A is used (R API_TIMER_A0 to RAPI_TIMER_A4 specified) (Count source) S pecify one from { RAPI_F1, R API_F2, RAPI_F32, RAPI_FC32 }. The default value is RAPI_F2. (Operating states [...]
-
Seite 52
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 52 void func( void ) { unsigned int p_tim[] = {0xAA, 0xBB, 0xCC}; /* Set up timer A3 as pulse width modulation mode */ __CreatePulseWidthModulationMode( RAPI_TIMER_A3|RAPI_TIMER_ON|RAPI_F8, 5, p_tim, TimerIntFunc); }[...]
-
Seite 53
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 53 __EnablePulseWid thModulationMode Synopsis <Control operation of puls e width modulation mode> Boolean __Enable PulseWidthMod ulationMode(unsigned long da t a) data Setup data Description Controls operation of the time r that is se t to specified pulse width modulation mode b y starting or stopping it[...]
-
Seite 54
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 54 __DestroyPulseWid thModulationMode Synopsis <Discard settings of pulse width modulation mode> Boolean __Des troyPulseWid thModulationMode(unsig ned long data ) data Setup data Description Discards settings of the timer that is set to specified pulse width modulation mode. [data] For data, the followin[...]
-
Seite 55
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 55 __CreatePulsePeriodMeasurementMode Synopsis < Set pulse period measurement mode> Boolean __CreatePul sePeriodMeasu rem entMode(unsigned lon g data1, unsigned int data2, unsigne d int data3, u nsigned int dat a4, void* func) data1 Setup data 1 data2 Setup data 2 data3 Setup data 3 data4 Setup data 4 fu[...]
-
Seite 56
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 56 [data3] S pecify 0. [data4] S pecify 0. Return value If the timer specification is incorrect , RAPI_F ALSE is returned; otherwise, RAPI_TRUE is returned. Functionality Timer (pulse period measurement mode) Reference __EnablePu lsePeriodMeasurementMode , __DestroyPulsePeriodMeas urementMode , __GetPulsePerio[...]
-
Seite 57
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 57 __EnablePulsePeriodMeasurementMode Synopsis <Control operation of pulse pe riod me asurement mode> Boolean __EnablePu lsePeriodMeasurem entMode(unsigned lon g dat a) data Setup data Description Controls operation of the timer that is set to specified pulse period measur ement mode by starting or stopp[...]
-
Seite 58
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 58 __DestroyPulsePeriodMeasurementMode Synopsis <Discard settings of pulse period meas ureme nt mode> Boolean __Destro yPulsePeriodMeasuremen tMo d e(unsigned long data) data Setup data Description Discards settings of the timer that is set to specified pulse period measure ment mode. [data] For data, th[...]
-
Seite 59
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 59 __GetPulsePeriodMeasurementMode Synopsis <Get measured value in pulse peri od measurement mode> Boolean __GetPulsePeriod MeasurementM od e(unsigned long d ata1, unsigned int *data2) data1 Setup data 1 data2 Pointer to the buffer in which counter value is stored Description Gets the counter value of th[...]
-
Seite 60
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 60 __CreatePulseWid thMea surementMode Synopsis <Set pulse width measurement mode> Boolean __CreatePul seWidthMeasurementMode(unsigned long dat a1 , unsigned int dat a2, unsigned int dat a3, unsigned int da t a4, void* func) data1 Setup data 1 data2 Setup data 2 data3 Setup data 3 data4 Setup data 4 func[...]
-
Seite 61
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 61 [data4] S pecify 0. Return value If the timer specification is incorrect, R API_F ALSE is returned; otherwise, RAPI_TRUE is returned. Functionality T imer (pulse width measurement mode) Reference __EnablePulseWidthMeasurementMod e , __DestroyPulseW idthMeasurementMode , __GetPulseWidthMeasurementMode Remark[...]
-
Seite 62
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 62 __EnablePulseWid thMeasurementMode Synopsis <Control operation of pulse width measurement mode> Boolean __Enab l ePu lseWidthMeasurementMode(unsig ned long data) data Setup data Description Controls operation of the timer that is se t to specified pulse width measurement mode. [data] For data, the fol[...]
-
Seite 63
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 63 __DestroyPulseWid thMeasurement Mode Synopsis <Discard settings of pulse width measurement mode> Boolean __Destro yPulseWidthMeasurementMode(un sign ed long data) data Setup data Description Discards settings of the timer that is set to specified pulse width measurement mode. [data] For data, the foll[...]
-
Seite 64
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 64 __GetPulseWid thMeasurementMode Synopsis <Get measured value in pulse width measurement mode> Boolean __GetPulseWidthMeasurementMode(u nsign ed long d ata1, unsigned int *data2) data1 Setup data 1 data2 Pointer to the buffer in which counter value is stored Description Gets the counter value of the ti[...]
-
Seite 65
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 65 __SetTimerRegister Synopsis <Set timer register> Boolean __SetT imerRegister(unsigned long dat a1, unsigned int *dat a2) data1 Setup data 1 data2 Pointer to the buffer in which register value is stored Description Sets the registers of a specified timer . [data1] For data, the following definition val[...]
-
Seite 66
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 66 If an undefined value is specified in the first argum ent, operation of the API cannot be guaranteed. • The specifiable timers differ with each CPU used. Program example #include " rapi_timer_m16c_62p.h" void func( void ) { unsigned char data[] = {0,0,0,0,0,0,0}; /* Set up timer A0 register */ _[...]
-
Seite 67
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 67 __EnableTimerRegister Synopsis <Control operation of timer register> Boolean __Enable TimerRegister(uns igned long data ) data Setup data Description Controls operation of a spec ified timer by starting or stopping it. [data] For data, the following definition values can be set. T o set multiple defi [...]
-
Seite 68
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 68 __ClearTimerRegister Synopsis <Clear timer register> Boolean __Cle arTime rRegister(unsigned long dat a) data Setup data Description Sets the timer register of a specified timer to its initial value after reset. [data] For data, the following definition values can be set. RAPI_TIMER_A0 Selects timer A[...]
-
Seite 69
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 69 __GetTimerRegister Synopsis <Get timer register value> Boolean __GetT imerRegister(unsigned long dat a1, unsigned int *dat a2) data1 Setup data data2 Pointer to the buffer in which register value is stored Description Gets the counter value of a specified timer . [data] For data, the following definit[...]
-
Seite 70
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 70 Reference __SetT imerRegister , __EnableTimerRegister , __ClearTimerRegister Remark • If an undefined value is specified i n the first argument, operation of the AP I cannot be guaranteed. Program example #include " rapi_timer_m16c_62p.h" void func( void ) { unsigned int data[7]; /* Get the valu[...]
-
Seite 71
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 71 4.2.3 I/O Port __SetIOPort Synopsis <Set I/O port> Boolean __SetIOPort(uns igned long dat a1, unsigned int dat a2) data1 Setup data 1 data2 Setup data 2 Description Sets the operating conditions of a specified I/O port. [data1] For data1, the following definition values can be set. T o set multiple de[...]
-
Seite 72
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 72 RAPI_PORT_7_2 Port P7 2 RAPI_PORT_7_3 Port P7 3 RAPI_PORT_7_4 Port P7 4 RAPI_PORT_7_5 Port P7 5 RAPI_PORT_7_6 Port P7 6 RAPI_PORT_7_7 Port P7 7 RAPI_PORT_8_0 Port P8 0 RAPI_PORT_8_1 Port P8 1 RAPI_PORT_8_2 Port P8 2 RAPI_PORT_8_3 Port P8 3 RAPI_PORT_8_4 Port P8 4 RAPI_PORT_8_5 Port P8 5 RAPI_PORT_8_6 Port P[...]
-
Seite 73
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 73 Functionality I/O port Reference __ReadIOPort , __WriteIOPort , __SetIOPortRegister , __ReadIOPortRegister , __WriteIOPortRegister Remark • If an undefined value is specified i n the first argument, operation of the API cannot be guaranteed. Program example #include " rapi_io_port_m16c_62p.h" vo[...]
-
Seite 74
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 74 __ReadIOPort Synopsis <Read from I/O port> Boolean __Rea dIOPort(unsigned long da ta1, unsigned int *data2) data1 Setup data 1 data2 Pointer to the variable in which the value read from I/O port is stored. Description Gets the value of a specified I/O port. [data1] S pecify an I/O port from which data[...]
-
Seite 75
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 75 RAPI_PORT_9_6 Port P9 6 RAPI_PORT_9_7 Port P9 7 RAPI_PORT_10_0 Port P10 0 RAPI_PORT_10_1 Port P10 1 RAPI_PORT_10_2 Port P10 2 RAPI_PORT_10_3 Port P10 3 RAPI_PORT_10_4 Port P10 4 RAPI_PORT_10_5 Port P10 5 RAPI_PORT_10_6 Port P10 6 RAPI_PORT_10_7 Port P10 7 RAPI_PORT_1 1_0 Port P1 1 0 RAPI_PORT_1 1 _1 Port P1[...]
-
Seite 76
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 76 __WriteIOPort Synopsis <Write to I/ O port> Boolean __W riteIOPort(unsigned long dat a1, unsigned int da t a2) data1 Setup data 1 data2 Data to be written to I/O port Description Writes data to a specified I/O port. [data1] S pecify an I/O port to which data is written. The definition values correspon[...]
-
Seite 77
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 77 RAPI_PORT_9_6 Port P9 6 RAPI_PORT_9_7 Port P9 7 RAPI_PORT_10_0 Port P10 0 RAPI_PORT_10_1 Port P10 1 RAPI_PORT_10_2 Port P10 2 RAPI_PORT_10_3 Port P10 3 RAPI_PORT_10_4 Port P10 4 RAPI_PORT_10_5 Port P10 5 RAPI_PORT_10_6 Port P10 6 RAPI_PORT_10_7 Port P10 7 RAPI_PORT_1 1_0 Port P1 1 0 RAPI_PORT_1 1_1 Port P1 [...]
-
Seite 78
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 78 __SetIOPortRegister Synop sis <Set I/O port register> Boolean __Set IOPortRegiste r(unsigne d l ong da t a1, unsigned int da t a2, unsigned int dat a3, unsigned int dat a4) data1 Setup data 1 data2 Setup data 2 data3 Setup data 3 data4 Setup data 4 Description [dat a1] Set the operating cond ition of [...]
-
Seite 79
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 79 If an undefined value is specified in the first argum ent, operation of the API cannot be guaranteed. Program example #include " rapi_io_port_m16c_62p.h" void func( void ) { /* Set inputs/outputs of port P1 register */ __SetIOPortRegister(RAPI_PORT_1, 0xAA, 0, 0 ); }[...]
-
Seite 80
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 80 __ReadIOPortRegister Synopsis <Read from I/O port register> Boolean __ReadIOPortRegi ster(unsigned long data 1, unsigned int *dat a2) data1 Setup data 1 data2 Pointer to the var iable in which the val ue read from I/O port register i s stored. Description Gets the value of a specified I/O port from ea[...]
-
Seite 81
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 81 __WriteIOPortRegister Synopsis <Write to I/O port register> Boolean __W riteIOPortRegister(unsigned long dat a1, unsigned int dat a2) data1 Setup dat a 1 data2 Dat a to be written to I/O port register Description Writes the value for a specified I/O port to eac h relevant register . [data1] S pecify a[...]
-
Seite 82
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 82 4.2.4 External interrupt __SetInterrupt Synopsis <Set external interrupt> Boolean __SetInterrupt(uns igned long dat a1, unsigned int dat a2, void* func) data1 Setup data 1 data2 Setup data 2 func Callback function pointer (S pecify 0 if no callback functions are set.) Description Sets a specified exte[...]
-
Seite 83
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 83 Return value If the external interrupt specification is inc orrect, RAPI_F ALSE is returned; other wise, RAPI_TRUE is returned. Functionality External interrupt Reference __EnableInterrupt , __GetInterruptFlag , __ClearInterruptFlag Remark • If an undefined value is specified in the first argum ent, opera[...]
-
Seite 84
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 84 __EnableInterrupt Synopsis <Control external interrupt> Boolean __Enable Interrupt(unsigned long dat a1, unsigned int dat a2) data1 Setup data 1 data2 Setup data 2 Description Changes the operating conditi on of a specified external interrupt. [data1] RAPI_INT0 Uses _INT0 interrupt. RAPI_INT1 Uses _IN[...]
-
Seite 85
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 85 __GetInterruptFlag Synopsis <Get the status of external interrupt flag> Boolean __GetInterruptFlag (unsigned long dat a1, unsigned int *dat a2)) data1 Setup data 1 data2 Pointer to the buffer in which the acquired flag data is stored Description Gets the value of interrupt request fl ag of a specified[...]
-
Seite 86
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 86 __ClearInterruptFlag Synopsis <Clear external interrupt flag> Boolean __Cle arInterruptFlag(unsigne d long data ) data Setup data Description Clears the interrupt request flag of a specified exter nal interrupt. [data] RAPI_INT0 Uses _INT0 interrupt. RAPI_INT1 Uses _INT1 interrupt. RAPI_INT2 Uses _INT[...]
-
Seite 87
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 87 4.2.5 A/D converter __CreateADC Synopsis <Set A/D converter> Boolean __Cre ateADC(unsigned l ong data1 , unsigned int dat a2, unsigned int dat a3, void* func) data1 Setup data 1 data2 Number of analog input pins used by A/D converter data3 Setup data 3 func Callback function pointer (Specify 0 if no c[...]
-
Seite 88
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 88 RAPI_AN27 Uses AN 27 pin for the analog input pin. RAPI_P0_GROUP Uses port P 0 group for the analog input pin. RAPI_P10_GROUP Uses port P 10 group for the analog input pin. RAPI_P2_GROUP Uses port P 2 group for the analog input pin. RAPI_F AD Sets the AD converter ’s operating frequency to f AD . RAPI_F A[...]
-
Seite 89
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 89 (Input pin) S pecify one from { RA PI_AN0, RAPI_AN1, RAPI_AN2, R API_AN3, RAPI_AN4, RAPI_AN5, R API_AN6, RAPI_AN7, RAP I_AN00, R API_AN01, RA PI_AN02, RAPI_AN 03, RAPI_AN04, RA PI_AN05, R API_AN06 , RAPI_AN 07, RAPI_AN20, RAPI_AN 21, RAPI_AN22, RA PI_AN23, R API_AN24 , RAPI_AN 25, RAPI_AN26, RAPI_AN27, RAPI[...]
-
Seite 90
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 90 (Operating states set) S pecify one from { RAPI_AD_ON, RAPI_AD_ OFF }. The default value is RAPI_AD_OFF . (Conversion method) S pecify one from { RAPI_WITH_S AMPLE_HOLD, RAPI_WITHOUT_SAMPLE_HOLD }. The default value is RAPI_WITHOUT_SAMPLE_HOLD. (T ri gger) S pecify one from { RAPI_S OFTWARE_TRIGGER, RAPI_EX[...]
-
Seite 91
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 91 Remark • If an undefined value is spec ified in th e fi rst ar gument, operat ion of the API cannot be guaranteed. Program example #include " rapi_ad_ m16 c_62p.h" void AdIntFunc( void ){} void func( void ) { /* Set up A/D converter as one short mode */ __CreateADC( RAPI_ONE_SHOT|RAPI_AN2|RAPI_F[...]
-
Seite 92
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 92 __EnableADC Synopsis <Control operation of A/D converter> Boolean __EnableA DC (unsigned long dat a1, unsigned int dat a2) data1 Setup data 1 data2 Number of analog input pins used by A/D converter Description Controls operation of the A/D conv erter by starting or stopping it. [data1] RAPI_AN0 Uses A[...]
-
Seite 93
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 93 RAPI_AN21 Uses AN 21 pin for the analog input pin. Selectable only when one-shot mode or repeat mode is used. RAPI_AN22 Uses AN 22 pin for the analog input pin. Selectable only when one-shot mode or repeat mode is used. RAPI_AN23 Uses AN 23 pin for the analog input pin. Selectable only when one-shot mode or[...]
-
Seite 94
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 94 Program example #include "rapi_ad_ m16 c_62p.h" void func( void ) { /* Disable A/D converter */ __EnableADC( RAPI_AN0|RAPI_AD_OFF, 1 ); }[...]
-
Seite 95
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 95 __DestroyADC Synopsis <Discard settings of A/D converter> Boolean __Destroy ADC(void) Description Discards settings of a specified A/D converter . Return value If converter setting was successfully discar ded, RAPI_TRUE is returned; if failed, RAPI_F ALSE is returned. Functionality A/D converter Refer[...]
-
Seite 96
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 96 __GetADC Synopsis <Get A/D converted val ue (register spec ified)> Boolean __GetA DC(unsigned long dat a1, unsigned int *dat a2) data1 Setup data 1 data2 Pointer to the buffer in which A/D converted value is stored. Description Gets the A/D converted value fr om a specified A/D register . For data1, t[...]
-
Seite 97
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 97 __GetADCAll Synopsis <Get A/D converted va lue (all registers)> Boolean __Get ADCAll(unsigned int *data) data Pointer to the buffer in which A/D converted value is stored. Description Gets the A/D converted valu e from all A/D registers. The A/D registers from which A/D convert ed values are acquired [...]
-
Seite 98
Rev .1.00 2007.1 1.1 REC10 B0002-0 100 98 M16C/62P Group Renesas Embedded Application Programming Interface Reference Manual Rev . 1.00 Issued: November 2007[...]