This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
resources:eval:user-guides:eval-adicup360:reference_designs:demo_cn0396 [31 Oct 2016 15:08] – [Debugging the ADuCM360_demo_cn0396 project] Veronica Lupei | resources:eval:user-guides:eval-adicup360:reference_designs:demo_cn0396 [14 Mar 2021 10:02] (current) – [Obtaining the Source Code] adding in .Bin file Zuedmar Arceo | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======4 – Wire Electrochemical Dual Toxic Gas Demo====== | + | ====== 4 – Wire Electrochemical Dual Toxic Gas Demo ====== |
- | The **ADuCM360_demo_cn0396** is a dual toxic gas detector demo project, for the EVAL-ADICUP360 base board with additional EVAL-CN0396-ARDZ shield, created using the GNU ARM Eclipse Plug-ins in Eclipse environment. | + | The **ADuCM360_demo_cn0396** is a dual toxic gas detector demo project, for the EVAL-ADICUP360 base board with additional EVAL-CN0396-ARDZ shield, created using the CrossCore Embedded Studios Interactive Development Environment.(IDE) |
- | \\ | ||
===== General description ===== | ===== General description ===== | ||
- | \\ | ||
- | The **ADuCM360_demo_cn0396** project uses the [[http:// | + | The **ADuCM360_demo_cn0396** project uses the [[adi> |
- | The **EVAL-CN0396-ARDZ** board provides a potentiostatic circuit for biasing the electrochemical sensor, along with dual programmable TIA's and 16-bit Sigma-Delta ADC. The TIA's convert the small currents passing in the sensor to a voltage that can be read by the [[http:// | + | The **EVAL-CN0396-ARDZ** board provides a potentiostatic circuit for biasing the electrochemical sensor, along with dual programmable TIA's and 16-bit Sigma-Delta ADC. The TIA's convert the small currents passing in the sensor to a voltage that can be read by the [[adi>ad7798|AD7798]] a 3-channel, low noise, low power 16-bit ADC that converts the analog voltage into digital data. The **16-bit** ADC outputs are received via SPI interface of the EVAL-ADICUP360 board. An [[adi>ADT7310|ADT7310]] digital **temperature sensor** is also included to measure ambient temperature in order for correction of temperature effects. |
{{: | {{: | ||
Line 24: | Line 22: | ||
{{ : | {{ : | ||
- | \\ | + | ===== Demo Requirements ===== |
+ | |||
+ | The following is a list of items needed in order to replicate this demo. | ||
+ | * Hardware | ||
+ | * EVAL-ADICUP360 | ||
+ | * EVAL-CN0396-ARDZ | ||
+ | * Electrochemical Gas Sensor (included with CN0396) | ||
+ | * Mirco USB to USB cable | ||
+ | * PC or Laptop with a USB port | ||
+ | * Software | ||
+ | * ADuCM360_demo_cn0396 software | ||
+ | * CrossCore Embedded Studio (2.7.0 or higher) | ||
+ | * ADuCM36x DFP (1.0.2 or higher) | ||
+ | * CMSIS ARM Pack (4.3.0 or higher) | ||
+ | * Serial Terminal Program | ||
+ | * Such as Putty or Tera Term | ||
===== Setting up the hardware ===== | ===== Setting up the hardware ===== | ||
- | \\ | ||
- | Connect the **EVAL-CN0396-ARDZ** to the Arduino connectors **P4, P5, P6, P7, P8** of the **EVAL-ADICUP360** board. | + | - To program the base board, set the jumpers/ |
+ | - Connect the **EVAL-CN0396-ARDZ** to the Arduino connectors **P2, P5, P6, P7, P8** of the **EVAL-ADICUP360** board. | ||
+ | - Set the jumpers on EVAL-CN0396-ARDZ board, as shown in the picture below.{{ : | ||
+ | - Plug in the USB cable from the PC to the EVAL-ADICUP360 base board via the Debug USB.(P14) | ||
- | <note important> | + | ===== Obtaining |
- | In order to program the base board you need to use the **DEBUG USB**, | + | There are two basic ways to program the ADICUP360 with the software for the CN0396. |
+ | - Dragging | ||
+ | - Building, Compiling, | ||
- | {{: | + | Using the drag and drop method, the software is going to be a version that Analog Devices creates for testing and evaluation purposes. This is the EASIEST way to get started with the reference design. |
- | \\ | + | |
- | The ADuCM360_demo_cn0396 uses **UART** connection via **P0.6/ | + | Importing the project into CrossCore is going to allow you to change parameters |
- | {{:resources: | + | The software for the **ADuCM360_demo_cn0396** demo can be found here: |
- | \\ | + | |
- | \\ | + | |
- | ===== Obtaining the source code ===== | + | |
- | \\ | + | |
- | We recommend not opening the project directly, but rather import it into Eclipse and make a local copy in your Eclipse workspace. | + | <WRAP round 80% download> |
+ | Prebuilt CN0396 Bin File | ||
+ | * [[https:// | ||
+ | Complete CN0396 Source Files | ||
+ | * [[https:// | ||
- | The source code and include files of the **ADuCM360_demo_cn0396** can be found on Github: | + | </ |
- | <WRAP round 40% download> | + | < |
- | + | For more information on importing, debugging, or other tools related questions, please see the [[/resources/eval/user-guides/eval-adicup360/tools/cces_user_guide | |
- | [[https://github.com/analogdevicesinc/EVAL-ADICUP360/tree/master/ | + | |
- | + | ||
</ | </ | ||
+ | ===== Configuring the Software Parameters ===== | ||
- | \\ | + | |
- | ===== Importing the ADuCM360_demo_cn0396 project ===== | + | < |
- | \\ | + | #define CO_RANGE |
- | The necessary instructions on how to import the **ADuCM360_demo_cn0396** project form the projects examples in the Git repository, | + | #define H2S_RANGE |
+ | </ | ||
- | \\ | + | * **Sensor Gas Sensitivity** - <fc # |
+ | < | ||
+ | #define CO_SENS | ||
+ | #define H2S_SENS | ||
+ | </ | ||
- | ===== Debugging the ADuCM360_demo_cn0396 project | + | * **Maximum Sensor Gas Sensitivity** - <fc # |
+ | < | ||
+ | #define MAX_CO_SENS | ||
+ | #define MAX_H2S_SENS (1000 * pow(10, -9)) | ||
+ | </ | ||
+ | |||
+ | * **Terminal refresh** - // | ||
+ | < | ||
+ | #define DISPLAY_REFRESH | ||
+ | </ | ||
+ | |||
+ | ===== Outputting Data ===== | ||
+ | |||
+ | ==== Serial Terminal Output ==== | ||
+ | |||
+ | - In order to view the data, you must flash the program to the EVAL-ADICUP360. | ||
+ | - Once complete you will need to switch the USB cable from the DEBUG USB (P14) to the USER USB (P13). | ||
+ | - Then follow the UART settings below with the serial terminal program. | ||
+ | \\ | ||
+ | |||
+ | Following is the UART configuration. | ||
+ | Select COM Port | ||
+ | Baud rate: 115200 | ||
+ | Data: 8 bit | ||
+ | Parity: none | ||
+ | Stop: 1 bit | ||
+ | Flow Control: none | ||
\\ | \\ | ||
- | * A debug configuration must be set up for this project in order to have the possibility to program and to debug the **ADuCM360_demo_cn0396** project. To do this, follow the instructions from [[resources: | ||
- | | + | |
- | + | ||
- | {{ : | + | |
- | * Use step-by-step execution or directly run the program. | + | {{ : |
- | + | ||
- | After completion of the steps above the program will remain written into the system flash and it will run by default every time the board is powered up. | + | ===== How to use the Tools ===== |
+ | |||
+ | The official tool we promote for use with the EVAL-ADICUP360 is CrossCore Embedded Studio. | ||
+ | |||
+ | ==== Importing ==== | ||
+ | |||
+ | For more detailed instructions on importing this application/ | ||
+ | |||
+ | ==== Debugging ==== | ||
+ | |||
+ | For more detailed instructions on importing this application/ | ||
- | \\ | ||
===== Project structure ===== | ===== Project structure ===== | ||
- | \\ | + | |
- | The **ADuCM360_demo_cn0396** project | + | The **ADuCM360_demo_cn0396** |
- | This project contains: system initialization part - disabling watchdog, setting system clock, enabling clock for peripherals; | + | This project contains: system initialization part - disabling watchdog, setting system clock, enabling clock for peripherals; |
- | In the **src** and **include** folders you will find the source and header files related to CN0396 software | + | In the **src** and **include** folders you will find the source and header files related to CN0396 software |
\\ | \\ | ||
- | {{: | + | {{: |
- | \\ | + | |
- | In the appropriate header files you can **configure** next **parameters**: | + | |
- | \\ | + | |
\\ | \\ | ||
- | | + | The **RTE** folder contains device and system related files: |
- | < | + | |
- | #define CO_RANGE | + | * **system.rteconfig** - Allows |
- | #define H2S_RANGE | + | \\ |
- | </ | + | |
- | + | ||
- | * **Sensor Sensitivity** - <fc # | + | |
- | < | + | |
- | #define CO_SENS | + | |
- | #define H2S_SENS | + | |
- | </ | + | |
\\ | \\ | ||
- | The **system** folder contains system related files (try not to change these files): | ||
- | * **ADuCM360** – contains low levels drivers for ADuCM360 microcontroller. | ||
- | * **CMSIS** – contains files related to ADuCM360 platform, such as: // | ||
- | * **cortexm** – contains files for system management (start-up, reset, exception handler). | ||
- | \\ | + | // End of Document // |
- | + | ||
- | {{navigation EVAL-ADICUP360# | + |