資料介紹
Table of Contents
AD5592/AD5593 PMOD Demo
The ADuCM3029_demo_ad5592r_ad5593r project provides a solution to control a configurable input/output system using the EVAL-AD5592R-PMDZ or the EVAL-AD5593R-PMDZ and the EVAL-ADICUP3029. Both boards use a minimalist 8-channel, 12-bit, configurable ADC/DAC/GPIO device with either a SPI interface for EVAL-AD5592R-PMDZ and I2C interface for EVAL-AD5593R-PMDZ. The boards are SPI and I2C, respectively, PMOD form factor.
General Description/Overview
The ADuCM3029_demo_ad5592r_ad5593r project uses the EVAL-AD5592R-PMDZ or EVAL-AD5593R-PMDZ to provide a low-cost alternatives to the full-featured product evaluation boards, with terminal block connections and no extra signal conditioning. The application makes full use of the configurable 8 channels capability of the AD5592R and AD5593R, as every channel can be individually set to be either ADC, DAC, input GPIO or output GPIO. This provides a compact and highly flexible solution to signal acquisition and output control.
The application is controlled by the user with a CLI implemented using the serial UART core in the ADuCM3029 controller. The CLI is displayed on a connected PC using a serial terminal connection.
The program is divided in 2 parts: the setup part in which the present module is discovered and the main process. To do the discovery routine in the setup stage, the application first initializes the board SPI driver and tries to do a write and a read to a register to see if any device responds. If there is no SPI the application does the same test for the I2C device. If no device is found the application returns with an error message displayed on the serial connection. If any of the devices is found the program displays the active device and continues to the main process loop. If both PMODs are connected at the same time the one with SPI will be activated. The main process loop starts with the mirror mode. This mode sets up 4 channels as input and the other 4 as output, and then mirrors the inputs on the outputs. For example, if input channel 0 is driven externally to 1V the corresponding output channel, channel 7, will be driven to 1V as well by the application. The channels are linked as follows:
- Channel 0 (ADC) → Channel 7 (DAC);
- Channel 1 (ADC) → Channel 6 (DAC);
- Channel 2 (input GPIO) → Channel 5 (output GPIO);
- Channel 3 (input GPIO) → Channel 4 (output GPIO).
More information about the CLI commands can be found here.
Demo Requirements
The following is a list of items needed in order to replicate this demo.
Setting up the Hardware
- Connect EVAL-AD5592R-PMDZ or EVAL-AD5593R-PMDZ board to the EVAL-ADICUP3029 as seen in the pictures below:
EVAL-AD5593R-PMDZ conforms to Pmod spec 1.1.0. This is physically compatible with Pmod platforms conforming to earlier Pmod specifications, provided that the VCC, GND, SDA, SCL pins are aligned with the corresponding signals on the platform board, leaving INT and RESET disconnected as shown. - Connect a micro-USB cable to P10 connector of the EVAL-ADICUP3029 and connect it to a computer.
Refer to https://blog.digilentinc.com/announcing-the-digilent-pmod-interface-specification-1-1-0/ for details on the Pmod specification.
Configuring the Software
The configuration parameters can be found in the config.h file.
AD5593R_A0_STATE - This define contains the logic state of the A0 pin of the AD5593R device. This pin factors in the device I2C address and is by default logic “0” so no change is necessary to the define. If the pin state is changed by moving the pull-down resistor to be a pull-up resistor, this define needs to be changed to logic “1” too for the program to work.
#define AD5593R_A0_STATE 0
Outputting Data
A serial terminal is an application that runs on a PC or laptop that is used to display data and interact with a connected device (including many of the Circuits from the Lab reference designs). The device's UART peripheral is most often connected to a UART to USB interface IC, which appears as a traditional COM port on the host PC/ laptop. (Traditionally, the device's UART port would have been connected to an RS-232 line driver / receiver and connected to the PC via a 9-pin or 25-pin serial port.) There are many open-source applications, and while there are many choices, typically we use one of the following:
Before continuing, please make sure you download and install one of the above programs.
There are several parameters on all serial terminal programs that must be setup properly in order for the PC and the connected device to communicate. Below are the common settings that must match on both the PC side and the connected UART device.
- COM Port - This is the physical connection made to your PC or Laptop, typically made through a USB cable but can be any serial communications cable. You can determine the COM port assigned to your device by visiting the device manager on your computer. Another method for identifying which COM port is associated with a USB-based device is to look at which COM ports are present before plugging in your device, then plug in your device, and look for a new COM port.
- Baud Rate - This is the speed at which data is being transferred from the connected device to your PC. These parameters must be the same on both devices or data will be corrupted. The default setting for most of the reference designs in 115200.
- Data Bits - The number of data bits per transfer. Typically UART transmits ASCII codes back to the serial port so by default this is almost always set to 8-Bits.
- Stop Bits - The number of “stop” conditions per transmission. This usually set to 1, but can be set to 2 for redundancy.
- Parity - Is a way to check for errors during the UART transmission. Unless otherwise specified, set parity to “none”.
- Flow Control - Is a way to ensure that data lose between fast and slow devices on the same UART bus are not lost during transmission. This is typically not implemented in a simple system, and unless otherwise specified, set to “none”.
In many instances there are other options that each of the different serial terminal applications provide, such as local line echo or local line editing, and features like this can be turned on or off depending on your preferences. This setup guide will not go over all the options of each tool, but just the minor features that will make it easier to read back data from the connected devices.
Example setup using Putty
- Plug in your connected device using a USB cable or other serial cable.
- Wait for the device driver of the connected device to install on your PC or Laptop.
- Open up your serial terminal program (Putty for this example)
- Click on the open button, and as long as your connected device and serial terminal program are setup the same, than you should see data displaying.
Available commands
Typing help or h after initial calibration sequence will display the list of commands and their short versions. Bellow is the short command list:
Command | Example | Description |
---|---|---|
General commands | ||
h | h | Display available commands. |
stts | stts | Display parameters of the application. |
Single channel commands | ||
ao <chan> <dac_code> | ao 0 2000 | Set a channel as analog output (DAC channel) and set the output code. <chan> = channel to be set (0-7); <dac_code> = DAC code in decimal integer format (0-4095). |
ai <chan> | ai 0 | Change the channel to analog input and read the ADC channel. <chan> = channel to be changed and read. (0-7). |
do <chan> <val> | do 7 1 | Change the channel to digital output and set it's state to HIGH or LOW. <chan> = channel to be changed (0-7). <val> = '0' or '1' for LOW or HIGH, respectively. |
di <chan> | di 5 | Change the channel to digital input and read it's state. <chan> = channel to be changed and read. (0-7). |
Mode commands | ||
m | m | Start mirror mode. This mode sets 4 channels as input and 4 channels as output. Then the application reads the input channels and drives the corresponding output channel to the value read on the input channel. For example, if channel 0 reads 1V then the corresponding channel, channel 7, will output 1V. The channels are linked the following way: * Channel 0 (ADC) → Channel 7 (DAC); * Channel 1 (ADC) → Channel 6 (DAC); * Channel 2 (input GPIO) → Channel 5 (output GPIO); * Channel 3 (input GPIO) → Channel 4 (output GPIO). |
t | t | Start production test mode. The following connections must be made: * Channel 0 → Channel 7; * Channel 1 → Channel 6; * Channel 2 → Channel 5; * Channel 3 → Channel 4. Test mode sets CH0:3 to DAC mode, CH4:7 to ADC mode. CH0:3 are set to 0.5V, 1V, 1.5V, 2V, and the voltages at CH4:7 are read back and compared to the expected value. A pass message is then displayed if all the values are read back correctly. |
ais <ch_no> | ais a | Start streaming mode. This mode reads the selected ADC channel twice a second and outputs the data to the terminal. <chan> = channel to be read (0-7) or all channels simultaneously (a). If the channel picked is not an ADC channel the terminal will show an appropriate message. This command does not change the setting of the channels. The desired channels need to be set as ADC separately. |
- For the “h”, “stts”, “m” and “t” commands press Enter without inserting any space afterwards.
- For the “ao”, “ai”, “do” and “di” commands, to invoke in application instructions, write just the command without parameters, insert a space afterwards and press Enter.
Obtaining the Source Code
We recommend not opening the project directly, but rather import it into CrossCore Embedded Studios and make a local copy in your workspace.
The source code and include files of the ADuCM3029_demo_ad5592r_ad5593r can be found here:
How to use the Tools
The official tool we promote for use with the EVAL-ADICUP3029 is CrossCore Embedded Studio. For more information on downloading the tools and a quick start guide on how to use the tool basics, please check out the Tools Overview page.
Importing
For more detailed instructions on importing this application/demo example into the CrossCore Embedded Studios tools, please view our How to import existing projects into your workspace section.
Debugging
For more detailed instructions on importing this application/demo example into the CrossCore Embedded Studios tools, please view our How to configure the debug session section.
Project Structure
Project structure includes:
- AD559xR driver module with files: ad5592r-base.c, ad5592r-base.h, ad5592r.c, ad5592r.h, ad5593r.c, ad5593r.h;
- Main file ADuCM3029_demo_aiodiopdmz.c
- Application module with files: aio_dio_pdmz.c, aio_dio_pdmz.h;
- CLI module with files: cli.c, cli.h;
- Configuration file config.h
- Communication and GPIO driver module with files: platform_drivers.c, platform_drivers.h;
- Power core initialization module with files: power.c, power.h;
- Timer and delay driver module with files: timer.c, timer.h.
End of Document
- R8C/Tiny Series 軟件手冊(cè)
- R32C/100 系列軟件手冊(cè)
- R32C/100系列 用戶手冊(cè) 軟件篇
- MELSEC iQ R串行通信模塊FB參考手冊(cè)
- EVAD5754R AD5754R 評(píng)估板
- EVAD593R AD5593R 評(píng)估板
- EVAD5667R AD5667R 評(píng)估板
- EVAD5663R AD5663R 評(píng)估板
- EVAD5316R AD5316RDBZ 評(píng)估板
- EVAD593R-PMDZ硬件用戶指南
- EVAD592R-PMDZ硬件用戶指南
- EVAD570R-PMDZ硬件用戶指南
- 終止通知:TSL250R_1R_2R_260R_1R_1RD_EN000103_1-00.pdf
- EVAL-AD5592R-PMDZ & ADICUP3029 Embedded Example Code
- AMDM37x多媒體裝置芯片版本1.x(版本Q和R之間)的技術(shù)參考手冊(cè)概述 0次下載
- Armv8-R Cortex-R52+軟件集成的最佳實(shí)踐 1006次閱讀
- Rust語(yǔ)言中r2d2基礎(chǔ)用法 2617次閱讀
- 射頻T/R模塊的組成及架構(gòu) 3013次閱讀
- 文本或源代碼中\(zhòng)n 和 \r 的用法及區(qū)別 1.7w次閱讀
- 微雪電子MG996R舵機(jī)簡(jiǎn)介 3.2w次閱讀
- dfrobotArduino UNO R3 介紹 6249次閱讀
- 你知道終端軟件XShell參考手冊(cè)怎么操作? 1285次閱讀
- 手把手教你操作Faster R-CNN和Mask R-CNN 1.3w次閱讀
- 看懂硬盤S.M.A.R.T信息,了解硬盤前世今生 2.7w次閱讀
- r2000芯片引腳圖詳解_r2000芯片使用說(shuō)明 1.3w次閱讀
- R語(yǔ)言的前世今生(起源、趨勢(shì)、優(yōu)勢(shì)) 8244次閱讀
- R與SPSS、SAS相比較_Python 在數(shù)據(jù)分析工作中的地位與R語(yǔ)言、SAS、SPSS 比較如何? 4.9w次閱讀
- r語(yǔ)言有什么優(yōu)劣勢(shì)及R語(yǔ)言的未來(lái)發(fā)展趨勢(shì)_R語(yǔ)言在現(xiàn)實(shí)中的應(yīng)用 3.5w次閱讀
- r語(yǔ)言是什么_r語(yǔ)言基礎(chǔ)教程 1w次閱讀
- OPPO R9s Plus評(píng)測(cè):性價(jià)比巨高! 1.5w次閱讀
下載排行
本周
- 1電子電路原理第七版PDF電子教材免費(fèi)下載
- 0.00 MB | 1491次下載 | 免費(fèi)
- 2單片機(jī)典型實(shí)例介紹
- 18.19 MB | 95次下載 | 1 積分
- 3S7-200PLC編程實(shí)例詳細(xì)資料
- 1.17 MB | 27次下載 | 1 積分
- 4筆記本電腦主板的元件識(shí)別和講解說(shuō)明
- 4.28 MB | 18次下載 | 4 積分
- 5開關(guān)電源原理及各功能電路詳解
- 0.38 MB | 11次下載 | 免費(fèi)
- 6100W短波放大電路圖
- 0.05 MB | 4次下載 | 3 積分
- 7基于單片機(jī)和 SG3525的程控開關(guān)電源設(shè)計(jì)
- 0.23 MB | 4次下載 | 免費(fèi)
- 8基于AT89C2051/4051單片機(jī)編程器的實(shí)驗(yàn)
- 0.11 MB | 4次下載 | 免費(fèi)
本月
- 1OrCAD10.5下載OrCAD10.5中文版軟件
- 0.00 MB | 234313次下載 | 免費(fèi)
- 2PADS 9.0 2009最新版 -下載
- 0.00 MB | 66304次下載 | 免費(fèi)
- 3protel99下載protel99軟件下載(中文版)
- 0.00 MB | 51209次下載 | 免費(fèi)
- 4LabView 8.0 專業(yè)版下載 (3CD完整版)
- 0.00 MB | 51043次下載 | 免費(fèi)
- 5555集成電路應(yīng)用800例(新編版)
- 0.00 MB | 33562次下載 | 免費(fèi)
- 6接口電路圖大全
- 未知 | 30320次下載 | 免費(fèi)
- 7Multisim 10下載Multisim 10 中文版
- 0.00 MB | 28588次下載 | 免費(fèi)
- 8開關(guān)電源設(shè)計(jì)實(shí)例指南
- 未知 | 21539次下載 | 免費(fèi)
總榜
- 1matlab軟件下載入口
- 未知 | 935053次下載 | 免費(fèi)
- 2protel99se軟件下載(可英文版轉(zhuǎn)中文版)
- 78.1 MB | 537793次下載 | 免費(fèi)
- 3MATLAB 7.1 下載 (含軟件介紹)
- 未知 | 420026次下載 | 免費(fèi)
- 4OrCAD10.5下載OrCAD10.5中文版軟件
- 0.00 MB | 234313次下載 | 免費(fèi)
- 5Altium DXP2002下載入口
- 未知 | 233046次下載 | 免費(fèi)
- 6電路仿真軟件multisim 10.0免費(fèi)下載
- 340992 | 191183次下載 | 免費(fèi)
- 7十天學(xué)會(huì)AVR單片機(jī)與C語(yǔ)言視頻教程 下載
- 158M | 183277次下載 | 免費(fèi)
- 8proe5.0野火版下載(中文版免費(fèi)下載)
- 未知 | 138039次下載 | 免費(fèi)
評(píng)論
查看更多