AD7193 - No-OS Driver for Renesas Microcontroller Platforms

Supported Devices

Evaluation Boards

Overview

The AD7193 is a low noise, complete analog front end for high precision measurement applications. It contains a low noise, 24-bit sigma-delta (Σ-Δ) analog-to-digital converter (ADC). The on-chip low noise gain stage means that signals of small amplitude can interface directly to the ADC.

The device can be configured to have four differential inputs or eight pseudo differential inputs. The on-chip channel sequencer allows several channels to be enabled simultaneously, and the AD7193 sequentially converts on each enabled channel, simplifying communication with the part. The on-chip 4.92 MHz clock can be used as the clock source to the ADC or, alternatively, an external clock or crystal can be used. The output data rate from the part can be varied from 4.7 Hz to 4.8 kHz.

The device has a very flexible digital filter, including a fast settling option. Variables such as output data rate and settling time are dependent on the option selected. The AD7193 also includes a zero latency option.

The part operates with a power supply from 3 V to 5.25 V. It consumes a current of 4.65 mA, and it is available in a 28-lead TSSOP package and a 32-lead LFCSP package.

The goal of this project (Microcontroller No-OS) is to be able to provide reference projects for lower end processors, which can't run Linux, or aren't running a specific operating system, to help those customers using microcontrollers with ADI parts. Here you can find a generic driver which can be used as a base for any microcontroller platform and also specific drivers for different microcontroller platforms.

Driver Description

The driver contains two parts:

The driver for the AD7193 part, which may be used, without modifications, with any microcontroller.

The Communication Driver, where the specific communication functions for the desired type of processor and communication protocol have to be implemented. This driver implements the communication with the device and hides the actual details of the communication protocol to the ADI driver.

The Communication Driver has a standard interface, so the AD7193 driver can be used exactly as it is provided.

There are three functions which are called by the AD7193 driver:

SPI_Init() – initializes the communication peripheral.

SPI_Write() – writes data to the device.

SPI_Read() – reads data from the device.

SPI driver architecture

The following functions are implemented in this version of AD7193 driver:

In the “Setting the Content of Files to be generated” window select “None” for the “Generate main() Function” option and press Next.

In the “Setting the Standard Library” window press “Disable all” and then Next.

In the “Setting the Stack Area” window check the “Use User Stack” option and press Next.

In the “Setting the Vector” window keep default settings and press Next.

In the “Setting the Target System for Debugging” window choose “RX600 Segger J-Link” target and press Next.

In the “Setting the Debugger Options” and “Changing the Files Name to be created” windows keep default settings, press Next and Finish.

The workspace is created.

The RPDL (Renesas Peripheral Driver Library) has to integrated in the project. Unzip the RPDL files (double-click on the file “RPDL_RX62N.exe”). Navigate to where the RPDL files were unpacked and double-click on the “Copy_RPDL_RX62N.bat” to start the copy process. Choose the LQFP package, type the full path where the project was created and after the files were copied, press any key to close the window.

The new source files have to be included in the project. Use the key sequence Alt, P, A to open the “Add files to project ‘ADIEvalBoard’” window. Double click on the RPDL folder. From the “Files of type” drop-down list, select “C source file (*.C)”. Select all of the files and press Add.

To avoid conflicts with standard project files remove the files “intprg.c” and “vecttbl.c” which are included in the project. Use the key sequence Alt, P, R to open the “Remove Project Files” window. Select the files, click on Remove and press OK.

Next the new directory has to be included in the project. Use the key sequence Alt, B, R to open the “RX Standard Toolchain” window. Select the C/C++ tab, select “Show entries for: Include file directories” and press Add. Select “Relative to: Project directory”, type “RPDL” as sub-directory and press OK.

Because the “intprg.c” file was removed the “PIntPrg” specified in option “start” has to be removed. Change “Category” to “Section”. Press “Edit”, select “PIntPRG” and press “Remove”. From this window the address of each section can be also modified. After all the changes are made press OK two times.

At this point the files extracted from the zip file located in the “Software Tools” section have to be added into the project. Copy all the files from the archive into the project folder.

Now, the files have to be included in the project. Use the key sequence Alt, P, A to open the “Add files to project ‘ADIEvalBoard’” window. Navigate into ADI folder. From the “Files of type” drop-down list, select “Project Files”. Select all the copied files and press Add.

Now, the project is ready to be built. Press F7. The message after the Build Process is finished has to be “0 Errors, 0 Warnings”. To run the program on the board, you have to download the firmware into the microprocessor’s memory.

Page Tools

ADI enables our customers to interpret the world around us by intelligently bridging the physical and digital with unmatched technologies that sense, measure and connect. We collaborate with our customers to accelerate the pace of innovation and create breakthrough solutions that are ahead of what’s possible.

Interested in the latest news and articles about ADI products, design tools, training and events? Choose from one of our 12 newsletters that match your product area of interest, delivered monthly or quarterly to your inbox.