The most recent version of this page is a draft.This version (17 Oct 2012 17:30) was approved by DragosB.
This is an old revision of the document!
AD7887 - Microcontroller No-OS Driver
The AD7887 is a high speed, low power, 12-bit analog-to-digital converter (ADC) that operates from a single 2.7 V to 5.25 V power supply. The AD7887 is capable of 125 kSPS throughput rate. The input track-and-hold acquires a signal in 500 ns and features a single-ended sampling scheme. The output coding for the AD7887 is straight binary, and the part is capable of converting full power signals of up to 2.5 MHz.
The AD7887 can be configured for either dual- or single-channel operation via the on-chip control register. There is a default single-channel mode that allows the AD7887 to be operated as a read-only ADC. In single-channel operation, there is one analog input (AIN0) and the AIN1/VREF pin assumes its VREF function. This VREF pin allows the user access to the part’s internal 2.5 V reference, or the VREF pin can be overdriven by an external reference to provide the reference voltage for the part. This external reference voltage has a range of 2.5 V to VDD. The analog input range on AIN0 is 0 to VREF.
Battery-powered systems (personal digital assistants, medical instruments, mobile communications)
Instrumentation and control systems
High speed modems
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.
The driver contains two parts:
The Communication Driver has a standard interface, so the AD7887 driver can be used exactly as it is provided.
There are three functions which are called by the AD7887 driver:
_Init() – initializes the communication peripheral.
_Write() – writes data to the device.
_Read() – reads data from the device.
The following functions are implemented in this version of AD7887 driver:
| Function || Description
| unsigned char AD7887_Init(void) || Initializes the AD7887 device.
| unsigned short AD7887_Read(unsigned char config) || Perform a read operation from the AD7887.
Renesas RX63N Quick Start Guide
This section contains a description of the steps required to run the AD7887 demonstration project on a Renesas RX63N platform.
An EVAL-CN0150A-SDPZ has to be interfaced with the Renesas Demonstration Kit (RDK) for RX63N:
EVAL-CN0150A-SDPZ testpoint TP13 (CS) → YRDKRX63N J15 connector Pin 1
EVAL-CN0150A-SDPZ testpoint TP12 (MOSI) → YRDKRX63N J15 connector Pin 2
EVAL-CN0150A-SDPZ testpoint TP11 (MISO) → YRDKRX63N J15 connector Pin 3
EVAL-CN0150A-SDPZ testpoint TP10 (SCLK) → YRDKRX63N J15 connector Pin 4
EVAL-CN0150A-SDPZ testpoint TP7 (GND) → YRDKRX63N J15 connector Pin 5
Reference Project Overview
The reference project initializes the device, reads the ADC conversion result and displays it on the LCD.
Software Project Setup
This section presents the steps for developing a software application that will run on the Renesas Demo Kit for RX63N for controlling and monitoring the operation of the ADI part.
Run the High-performance Embedded Workshop integrated development environment.
A window will appear asking to create or open project workspace. Choose “Create a new project workspace” option and press OK.
From “Project Types” option select “Application”, name the Workspace and the Project “ADIEvalBoard”, select the “RX” CPU family and “Renesas RX Standard” tool chain. Press OK.
The RPDL (Renesas Peripheral Driver Library) has to integrated in the project. Unzip the RPDL files (double-click on the file “RPDL_RX63N.exe”). Navigate to where the RPDL files were unpacked and double-click on the “Copy_RPDL_RX63N.bat” to start the copy process. Choose the 100 pins package and little endian option, 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.
The library file path has to be added in the project. Select the Link/Library tab, select “Show entries for: Library files” and press Add. Select “Relative to: Project directory”, type “RPDL\RX63N_library” as file path 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. Set the second address to 0xFFF00000 and the third one to 0xFFF00100. After all the changes are made press OK two times.
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.