The AD5162 provides a compact 3 mm x 4.9 mm packaged solution for dual 256 position adjustment applications. This device performs the same electronic adjustment function as a 3-terminal mechanical potentiometer. Available in four different end-to-end resistance values (2.5 kΩ, 10 kΩ, 50 kΩ, 100 kΩ), this low temperature coefficient device is ideal for high accuracy and stability-variable resistance adjustments. The wiper settings are controllable through the SPI compatible digital interface. The resistance between the wiper and either end point of the fixed resistor varies linearly with respect to the digital code transferred into the RDAC latch. Operating from a 2.7 V to 5.5 V power supply and consuming less than 6 µA allows the AD5162 to be used in portable battery-operated applications.
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 AD5162 driver can be used exactly as it is provided.
There are three functions which are called by the AD5162 driver:
SPI driver architecture
The following functions are implemented in this version of AD5162 driver:
Function | Description |
---|---|
unsigned char AD5162_Init(void) | Initialize the communication with the device. |
void AD5162_SendDataWord(unsigned char address, unsigned char data) | Send data to one of the 2 channels available. |
This section contains a description of the steps required to run the AD5162 demonstration project on a Renesas RL78G13 platform.
An EVAL-AD5162SDZ has to be interfaced with the Renesas Demonstration Kit (RDK) for RL78G13:
EVAL-AD5162SDZ A connector Pin SYNC_BF (CS) → YRDKRL78G13 J11 connector Pin 1 EVAL-AD5162SDZ A connector Pin DIN_BF (DIN) → YRDKRL78G13 J11 connector Pin 2 EVAL-AD5162SDZ A connector Pin SCLK_BF (SCLK) → YRDKRL78G13 J11 connector Pin 4 EVAL-AD5162SDZ A connector Pin MUX-A0 (MUX_A0) → YRDKRL78G13 J18 connector Pin 30 EVAL-AD5162SDZ A connector Pin MUX-A1 (MUX_A1) → YRDKRL78G13 J18 connector Pin 29 EVAL-AD5162SDZ 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 two different values to both 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 AD5162 demonstration project on a Renesas RX62N platform.
An EVAL-AD5162EBZ board has to be interfaced with the Renesas Demonstration Kit (RDK) for RX62N:
EVAL-AD5162SDZ A connector Pin SYNC_BF (CS) → YRDKRX62N J8 connector Pin 15 EVAL-AD5162SDZ A connector Pin DIN_BF (DIN) → YRDKRX62N J8 connector Pin 19 EVAL-AD5162SDZ A connector Pin SCLK_BF (SCLK) → YRDKRX62N J8 connector Pin 20 EVAL-AD5162SDZ A connector Pin MUX-A0 (MUX_A0) → YRDKRX62N J8 connector Pin 17 EVAL-AD5162SDZ A connector Pin MUX-A1 (MUX_A1) → YRDKRX62N J8 connector Pin 25 EVAL-AD5162SDZ A connector Pin MUX-A2 (MUX_A2) → YRDKRX62N J8 connector Pin 26
The reference project: The reference project initializes the device and continuously writes to one of the two channels available.
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条评论
快来发表一下你的评论吧 !