PLEASE REFER TO THE APPLICATION NOTE FOR THIS MIDDLEWARE FOR MORE INFORMATION

r_sci_iic_rx
=========

Document Number
---------------
R01AN1691EJ0130

Version
-------
v1.30

Overview
--------
The SCI simple I2C mode fit module provides a method to transmit and receive data between the master and slave devices using the serial communications interface (SCI). The SCI simple I2C mode is in compliance with single master mode of the XP I2C-bus (Inter-IC-Bus) interface.  

The driver supports three channels available on the mcu. 
The driver can be reducedin size by removing code used for parameter checking orfor unused channels. 
These configuration options can be found in "r_config\r_sci_iic_rx_config.h". 
An original copy of the configuration file is stored in 
"r_sci_iic_rx\ref\r_sci_iic_rx_config_reference.h".


Features
--------
* Single master mode (slave transmission or slave reception is not supported).
* Circuit to generate waveforms for conditions.
* Communication mode can be normal or fast mode and the maximum communication rate is 384 kbps.


Supported MCUs
--------------
* RX110 Group
* RX111 Group
* RX113 Group
* RX64M Group

Boards Tested On
----------------
* RSKRX110
* RSKRX111
* RSKRX113
* RSKRX64M

Limitations
-----------
None

Peripherals Used Directly
-------------------------
* SCIe, f, g, or h

Required Packages
-----------------
* r_bsp     v2.30 or higher required for RX111
* r_bsp     v2.50 or higher required for RX110
* r_bsp     v2.60 or higher required for RX64M
* r_bsp     v2.70 or higher required for RX113

How to add to your project
--------------------------
The driver must be added to an existing e2 Studio project.
It is best to use the e2Studio FIT plugin to add the driver to your project
as that will automatically update the include file paths for you. 
Alternatively,the driver can be imported from the archive that
accompanies this application note and manually added by following these steps:

1. This application note is distributed with a zip file package
   that includes the FIT Simple IIC support module in its own folder r_sci_iic_rx.
2. Unzip the package into the location of your choice.
3. In a file browser window, browse to the directory where you unzipped the 
   distribution package and locate the r_sci_iic_rx folder.
4. Open your e2 Studio workspace.
5. In the e2 Studio project explorer window, select the project 
   that you want to add the simple IIC module to.
6. Drag and drop the r_sci_iic_rx folder from the browser window (orcopy/paste)
   into your e2 Studio project at the top level of the project.
7. Update the source search/include paths for your project by adding the paths 
   to the module files:
   a. Navigate to the "Add directory path" control:
      i. 'project name'->properties->C/C++ Build->Settings->Compiler->Source -Add (green + icon)
   b. Add the following paths:
      i. "${workspace_loc:/${ProjName}/r_sci_iic_rx}"
     ii. "${workspace_loc:/${ProjName}/r_sci_iic_rx/src}"

Whether you used the plug-in or manually added the package to your project,
it is necessary to configure the driver for yourapplication.

8. Locate the r_sci_iic_rx_config_reference.h file in the r_sci_iic_rx/ref/targets/sci_e_f source folder
   in your project and copy it to your project's r_config folder.
9. Change the name of the copy in the r_config folder to r_sci_iic_rx_config.h
10. Make the required configuration settings by editing the copied
    r_sci_iic_rx_config.h file. See Configuration Overview.

The simple IIC module uses the r_bsp and r_cgc packages for certain MCU information
and support functions. The r_bsp package is easily configured through the platform.h header file 
which is located in the r_bsp folder. To configure the r_bsppackage, open up platform.h 
and uncomment the #include for the board you are using.
For example, to run the demo on a RSKRX111 board, the user would uncomment the #include for 
e./board/rskrx111/r_bsp.hf macro and make sure all other board #includes are commented out.


Toolchain(s) Used
-----------------
* Renesas RX v2.01.00

File Structure
--------------
r_sci_iic_rx
|   readme.txt
|   r_sci_iic_rx_if.h
|
+---doc
|       r01an1691ej0130_rx.pdf
|
+---ref
|       r_sci_iic_config_reference.h
|
+---src
    |
    +---targets
        |
        |
        +---sci
            |   r_sci_iic_rx.c
            |   r_sci_iic_rx_platform.h
            |   r_sci_iic_rx_private.h
            |
            +---rx64m
            |       r_sci_iic_rx64m.c
            |       r_sci_iic_rx64m_private.h
            |
            +---rx110
            |       r_sci_iic_rx110.c
            |       r_sci_iic_rx110_private.h
            |
            +---rx111
            |       r_sci_iic_rx111.c
            |       r_sci_iic_rx111_private.h
            |
            +---rx113
                    r_sci_iic_rx113.c
                    r_sci_iic_rx113_private.h

r_config
    r_sci_iic_rx_config.h

