The AD8403 provides four channels, 256 position digitally controlled variable resistor (VR) device. This device performs the same electronic adjustment function as a potentiometer or variable resistor. It contains a fixed resistor with a wiper contact that taps the fixed resistor value at a point determined by a digital code loaded into the controlling serial input register. The resistance between the wiper and either endpoint of the fixed resistor varies linearly with respect to the digital code transferred into the VR latch. Each variable resistor offers a completely programmable value of resistance, between the A terminal and the wiper or the B terminal and the wiper. The fixed A to B terminal resistance of 1 kΩ, 10 kΩ, 50 kΩ or 100 kΩ has a ±1% channel-to-channel matching tolerance with a nominal temperature coefficient of 500 ppm/°C. Each VR has its own VR latch that holds its programmed resistance value. These VR latches are updated from an SPI compatible serial-to-parallel shift register that is loaded from a standard 3-wire serial-input digital interface. Ten data bits make up the data word clocked into the serial input register. The data word is decoded where the first two bits determine the address of the VR latch to be loaded, the last eight bits are data.
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 AD8403 driver can be used exactly as it is provided.
There are three functions which are called by the AD8403 driver:
SPI driver architecture
The following functions are implemented in this version of AD8403 driver:
Function | Description |
---|---|
unsigned char AD8403_Init(void) | Initialize the communication with the device. |
void AD8403_SendDataWord(unsigned char address, unsigned char data) | Send data to one of the 4 channels available. |
This section contains a description of the steps required to run the AD8403 demonstration project on a Renesas RL78G13 platform.
An EVAL-AD8403SDZ has to be interfaced with the Renesas Demonstration Kit (RDK) for RL78G13:
EVAL-AD8403SDZ A connector Pin SYNC_BF (CS) → YRDKRL78G13 J11 connector Pin 1 EVAL-AD8403SDZ A connector Pin DIN_BF (DIN) → YRDKRL78G13 J11 connector Pin 2 EVAL-AD8403SDZ A connector Pin SDO_BF (SDO) → YRDKRL78G13 J11 connector Pin 3 EVAL-AD8403SDZ A connector Pin SCLK_BF (SCLK) → YRDKRL78G13 J11 connector Pin 4 EVAL-AD8403SDZ A connector Pin RESET_BF (RESET) → YRDKRL78G13 J11 connector Pin 9 EVAL-AD8403SDZ A connector Pin SHDN (SHDN) → YRDKRL78G13 J11 connector Pin 10 EVAL-AD8403SDZ A connector Pin MUX-A0 (MUX_A0) → YRDKRL78G13 J18 connector Pin 30 EVAL-AD8403SDZ A connector Pin MUX-A1 (MUX_A1) → YRDKRL78G13 J18 connector Pin 29 EVAL-AD8403SDZ 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 and writes four different values to the 4 channels available on the device.
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).
This section contains a description of the steps required to run the AD8403 demonstration project on a Renesas RX62N platform.
An EVAL-AD8403SDZ board has to be interfaced with the Renesas Demonstration Kit (RDK) for RX62N:
EVAL-AD8403SDZ A connector Pin SYNC_BF (CS) → YRDKRX62N J8 connector Pin 15 EVAL-AD8403SDZ A connector Pin DIN_BF (DIN) → YRDKRX62N J8 connector Pin 19 EVAL-AD8403SDZ A connector Pin SDO_BF (SDO) → YRDKRX62N J8 connector Pin 22 EVAL-AD8403SDZ A connector Pin SCLK_BF (SCLK) → YRDKRX62N J8 connector Pin 20 EVAL-AD8403SDZ A connector Pin RESET_BF (RESET) → YRDKRX62N JN2 connector Pin 13 EVAL-AD8403SDZ A connector Pin SHDN (SHDN) → YRDKRX62N JN2 connector Pin 14 EVAL-AD8403SDZ A connector Pin MUX-A0 (MUX_A0) → YRDKRX62N JN2 connector Pin 15 EVAL-AD8403SDZ A connector Pin MUX-A1 (MUX_A1) → YRDKRX62N JN2 connector Pin 16 EVAL-AD8403SDZ A connector Pin MUX-A2 (MUX_A2) → YRDKRX62N JN2 connector Pin 17
The reference project initializes the device and writes four different values to the 4 channels available on the device.
This section presents the steps for developing a software application that will run on the Renesas Demo Kit for RX62N for controlling and monitoring the operation of the ADI part.
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
全部0条评论
快来发表一下你的评论吧 !