This is an old revision of the document!
The ADN2850 is a dual-channel, nonvolatile memory, digitally controlled resistors with 1024-step resolution, offering guaranteed maximum low resistor tolerance error of ±8%. The device performs the same electronic adjustment function as a mechanical rheostat with enhanced resolution, solid state reliability, and superior low temperature coefficient performance.The versatile programming of the ADN2850 via an SPI®-compatible serial interface allows 16 modes of operation and adjustment including scratchpad programming, memory storing and restoring, increment/decrement, ±6 dB/step log taper adjustment, wiper setting readback, and extra EEMEM for user-defined information such as memory data for other components, look-up table, or system identification information.
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 ADN2850 driver can be used exactly as it is provided.
There are three functions which are called by the ADN2850 driver:
SPI driver architecture
The following functions are implemented in this version of ADN2850 driver:
|unsigned char ADN2850_Init(void)||Initialize the communication with the device.|
|void ADN2850_SendCommand(unsigned char command,unsigned char address, unsigned short Data);||Send a command to the device. It will transmit 3 bytes.|
|unsigned short ADN2850_Read(unsigned char readSource, unsigned char address);||Read from register or from EEMEM.|
|void ADN2850_RepeatLastCMD(void)||A subtle feature of the ADN2850 is that a subsequent CS strobe, without clockand data, repeats a previous command.|
|void ADN2850_WaitForRdy(void)||Waits for RDY pin to go LOW.|
|unsigned short ADN2850_OhmConversion(unsigned long rawData)||Determines the programmed output resistance between Bx and Wx terminal.|
This section contains a description of the steps required to run the ADN2850 demonstration project on a Renesas RL78G13 platform.
An EVAL-ADN2850SDZ has to be interfaced with the Renesas Demonstration Kit (RDK) for RL78G13:
EVAL-ADN2850SDZ A connector Pin SYNC_BF (CS) → YRDKRL78G13 J11 connector Pin 1 EVAL-ADN2850SDZ A connector Pin DIN_BF (MOSI) → YRDKRL78G13 J11 connector Pin 2 EVAL-ADN2850SDZ A connector Pin SDO_BF (MISO) → YRDKRL78G13 J11 connector Pin 3 EVAL-ADN2850SDZ A connector Pin SCLK_BF (SCLK) → YRDKRL78G13 J11 connector Pin 4 EVAL-ADN2850SDZ A connector Pin RDY (RDY) → YRDKRL78G13 J11 connector Pin 7 EVAL-ADN2850SDZ A connector Pin RESET_BF (Reset) → YRDKRL78G13 J11 connector Pin 9 EVAL-ADN2850SDZ A connector Pin WP_BF (WP) → YRDKRL78G13 J11 connector Pin 10 EVAL-ADN2850SDZ A connector Pin MUX-A0 (MUX_A0) → YRDKRL78G13 J18 connector Pin 30 EVAL-ADN2850SDZ A connector Pin MUX-A1 (MUX_A1) → YRDKRL78G13 J18 connector Pin 29 EVAL-ADN2850SDZ A connector Pin MUX-A2 (MUX_A2) → YRDKRL78G13 J18 connector Pin 28
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 device, reads the tolerance from EEMEM, and then sets RDAC1 output resistance to the value displayed on the lcd.
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).