This version is outdated by a newer approved version.DiffThis version (28 Feb 2012 21:57) was approved by dragosb.The Previously approved version (28 Feb 2012 17:08) is available.Diff

This is an old revision of the document!

ADIS16227 - Microcontroller No-OS Driver

Supported Devices

Evaluation Boards


The ADIS16227 iSensor® is a complete vibration sensing system that combines wide bandwidth, triaxial acceleration sensing with advanced time domain and frequency domain signal processing. Time domain signal processing includes a programmable decimation filter and selectable windowing function. Frequency domain processing includes a 512 point, real-valued FFT for each axis, along with FFT averaging, which reduces the noise floor variation for finer resolution. The 16-record FFT storage system offers users the ability to track changes over time and to capture FFTs with multiple decimation filter settings.

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 Renesas platforms.

HW Platform(s):

Driver Description

The driver contains two parts:

  • The driver for the ADIS16227 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 ADIS16227 driver can be used exactly as it is provided. There are three functions which are called by the ADIS16227 driver:

  • SPI_Init() – initializes the communication peripheral.
  • SPI_Write() – writes data to the device.
  • SPI_Read() – reads data from the device.

Driver architecture

The implementation of these three functions depends on the used microcontroller.

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

Function Description
unsigned short ADIS16227_GetRegister16Value(unsigned char registerAddress) Reads the value of a register.
void ADIS16227_SetRegister8Value(unsigned char registerAddress, unsigned char registerValue) Writes 1 byte into a register.
void ADIS16227_SetRegister16Value(unsigned char registerAddress, unsigned short registerValue) Writes 2 bytes into a register.
unsigned char ADIS16227_Init(void) Initializes the SPI and checks if the ADIS16227 part is present.
void ADIS16227_ConfigCapture(unsigned char window, unsigned char sampleRate, unsigned char pwrDwn, unsigned char range, unsigned char mode) Configures the ADIS16227_REC_CTRL register.
unsigned char ADIS16227_DataReady(void) Reads the value of the “Data ready/busy” bit (DIAG_STAT register).
void ADIS16227_Capture(void) Initiates a manual data capture and wait until the process is finished.
void ADIS16227_GetBuffers(unsigned short* x, unsigned short* y, unsigned short* z, unsigned short samplesNumber) Reads “samplesNumber” samples from each axis's buffer.
unsigned short ADIS16227_GetPowerSupplyInfo(void) Reads the power supply voltage and returns the data in mV.
char ADIS16227_GetTemperatureInfo(void) Reads the internal temperature and returns the data in degrees Celsius.


Renesas RL78G13 Quick Start Guide

This section contains a description of the steps required to run the ADF4118 demonstration project on a Renesas RL78G13 platform.

Required Hardware

Required Software

Hardware Setup

An ADIS16227/PCBZ board has to be interfaced with the Renesas Demonstration Kit (RDK) for RL78G13:

  ADIS16227/PCBZ J1 connector Pin 3 (CS)   → YRDKRL78G13 PMOD1 connector Pin 1
  ADIS16227/PCBZ J1 connector Pin 6 (MOSI) → YRDKRL78G13 PMOD1 connector Pin 2
  ADIS16227/PCBZ J1 connector Pin 4 (MISO) → YRDKRL78G13 PMOD1 connector Pin 3
  ADIS16227/PCBZ J1 connector Pin 2 (SCLK) → YRDKRL78G13 PMOD1 connector Pin 4
  ADIS16227/PCBZ J1 connector Pin 1 (RST)  → YRDKRL78G13 PMOD1 connector Pin 8
  ADIS16227/PCBZ J1 connector Pin 7 (GND)  → YRDKRL78G13 PMOD1 connector Pin 11
  ADIS16227/PCBZ J1 connector Pin 10 (VCC) → YRDKRL78G13 PMOD1 connector Pin 12

Reference Project Overview

The reference project runs an offset correction operation, configures the REC_CTRL register and initiates a Manual Time recording. After the process is finished on the LCD are displayed the internal temperature, the power supply voltage and the first value of each axis's buffer.

Software Project Setup

This section presents the steps for developing a software application that will run on the Renesas Demo Kit for RL78G13 for controlling and monitoring the operation of the ADI part.

  • Run the IAR Embedded Workbench for Renesas RL78 Kickstart integrated development environment.
  • Create a new workspace (File – New – Workspace) and a new empty project (Project – Create New Project… )

  • From the Create New Project window choose “RL78” Tool Chain and “Empty project” template. Press OK.
  • A window will appear asking to save the project. Give it a name (for example “ADIEvalBoard.ewp”) and press Save.
  • Copy the files extracted from the zip file into the project’s directory.

  • The source files have to be included into the project. First create two new groups, one called “ADIEvalBoard” and the other “applilet3_src” (Right click on the project's name and select Add – Add Group…). Add in each group the files from the corresponding folder (Right click on the each group and select Add – Add Files…).

  • Now the Target Device and the Debugger Driver have to be selected from the project’s options. Right click on the project name and select Options.
  • From the project's options choose the “RL78 – R5F100LE” Target Device.

  • From the project's options choose the “TK” Debugger Driver.

  • Now, the project is ready to be compiled and downloaded on the board. Press the F7 key to compile it. A window will appear and will ask to save the workspace. Give it a name (for example “ADIEvalBoard.eww”) and press Save. Press CTRL + D to download and debug the project.

  • Press the F5 key to run the software on the board. When the software runs the Analog Devices logo and the link to the ADI Wiki is displayed on the board's LCD.
01 Feb 2012 11:45 · dragosb
resources/tools-software/uc-drivers/renesas/adis16227.1330462636.txt.gz · Last modified: 28 Feb 2012 21:57 by dragosb