This is an old revision of the document!
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):
The driver contains two parts:
The Communication Driver has a standard interface, so the AD7291 driver can be used exactly as it is provided.
There are three functions which are called by the AD7291 driver:
I2C driver architecture
The following functions are implemented in this version of AD7291 driver:
Function | Description |
---|---|
unsigned char AD7291_Init(void) | Initializes the I2C communication peripheral and configures AD7291. |
void AD7291_SetRegisterValue(unsigned char registerAddress, unsigned short registerValue) | Writes data into a register. |
void AD7291_GetRegisterValue(unsigned char registerAddress, unsigned short* registerValue, unsigned char readsNumber) | Performs a number of reads from a register. |
float AD7291_GetDegreesTemp(void) | Reads the temperature data and converts the result in degrees Celsius. |
void AD7291_GetVoltageConversionResults(unsigned short* data) | Reads the voltage conversion results for the enabled channels. |
This section contains a description of the steps required to run the AD7291 demonstration project on a Renesas RL78G13 platform.
An EVAL-AD7291SDZ has to be interfaced with the Renesas Demonstration Kit (RDK) for RL78G13:
EVAL-AD7291SDZ test point T_SCLK → YRDKRL78G13 J9 connector Pin 1 EVAL-AD7291SDZ test point TDOUT → YRDKRL78G13 J9 connector Pin 3 EVAL-AD7291SDZ J16 connector Pin DGND → YRDKRL78G13 J11 connector Pin 5 EVAL-AD7291SDZ J16 connector Pin VDRIVE → YRDKRL78G13 J11 connector Pin 6 EVAL-AD7291SDZ J15 connector Pin AGND → YRDKRL78G13 J11 connector Pin 5 EVAL-AD7291SDZ J15 connector Pin EXT_VCC → YRDKRL78G13 J11 connector Pin 6
With the Applilet3 for RL78G13 tool the following peripherals have to be configured:
Choose to generate the Transmit/receive function for the CSI10 and configure the interface with the following settings:
Configure TM00 as an interval timer:
Disable the watchdog timer:
The reference project initializes the I2C communication peripheral and configures AD7291 to perform readings from analog inputs CH1 and CH7. The temperature is also read and displayed on the screen in degrees Celsius.
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.
Two software applications have to be used: Applilet3 for RL78G13 (a tool that automatically generates device drivers for MCU peripheral functions) and IAR Embedded Workbench for Renesas RL78 (the integrated development environment).