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_adt7420 [03 Jan 2017 17:20] – [Obtaining the source code] changing to adt7420 source Brandon Bushey | resources:eval:user-guides:eval-adicup360:reference_designs:demo_adt7420 [14 Mar 2021 06:08] (current) – [Obtaining the Source Code] adding in .Bin file Zuedmar Arceo | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== ADT7420 PMOD Temperature Demo ====== | ====== ADT7420 PMOD Temperature Demo ====== | ||
- | The **ADuCM360_demo_adt7420_pmdz** is a temperature demo project for the EVAL-ADICUP360 base board with an EVAL_ADT7420-PMDZ PMOD board from Analog Devices, using the GNU ARM Eclipse Plug-ins in Eclipse environment. | + | The **ADuCM360_demo_adt7420_pmdz** is a temperature demo project for the EVAL-ADICUP360 base board with an EVAL-ADT7420-PMDZ PMOD board from Analog Devices, using the GNU ARM Eclipse Plug-ins in Eclipse environment. |
===== General description ===== | ===== General description ===== | ||
- | This project is an example for how to use [[resources: | + | This project is an example for how to use [[resources: |
The ADuCM360_demo_adt7420_pmdz project uses the [[ADI> | The ADuCM360_demo_adt7420_pmdz project uses the [[ADI> | ||
- | {{: | + | {{ : |
- | The application reads the temperature data from the ADT7420 and displays the temperature in **[codes]** and **[C]** on a serial terminal. | + | The application reads the temperature data from the ADT7420 and displays the temperature in **[codes]** and **[C]** on a serial terminal. |
- | All the outputs are printed from the UART to the USER USB port and can be read on the PC using a serial terminal program, such as Putty or Tera Term. | + | All the outputs are printed from the UART to the USER USB port using P0.6 and P0.7, and can be read on the PC using a serial terminal program, such as Putty or Tera Term. The user must ensure that the USB cable is connected to the USER USB port in order to read back values in Putty. |
- | ===== Setting up the hardware ===== | + | {{ : |
- | \\ | + | |
- | * To program the base board, set the jumpers as shown in the next figure. The important jumpers are highlighted in red. | + | ===== Demo Requirements ===== |
- | {{: | + | |
- | * Plug the PmodACL2 PMOD in the EVAL-ADICUP360 | + | The following is a list of items needed |
+ | * Hardware | ||
+ | * EVAL-ADICUP360 | ||
+ | * EVAL-ADT7420-PMDZ | ||
+ | * Mirco USB to USB cable | ||
+ | * PC or Laptop with a USB port | ||
+ | * Software | ||
+ | * ADuCM360_demo_adt7420_pmdz software | ||
+ | * CrossCore Embedded Studio | ||
+ | * ADuCM36x DFP (1.0.2 or higher) | ||
+ | * CMSIS ARM Pack (4.3.0 or higher) | ||
+ | * Serial Terminal Program | ||
+ | * Such as Putty or Tera Term | ||
- | * Power EVAL-ADICUP360 base board either via the Debug USB. | + | ===== Setting up the hardware ===== |
- | \\ | + | - To program the base board, set the jumpers/ |
- | ===== Obtaining the source code ===== | + | - Plug the EVAL-ADT7420-PMDZ PMOD in the EVAL-ADICUP360 base board, via the PMOD_I2C port (P10). |
- | \\ | + | - Plug in the USB cable from the PC to the EVAL-ADICUP360 base board via the Debug USB.(P14) |
+ | |||
+ | ===== Obtaining the Source Code ===== | ||
+ | |||
+ | There are two basic ways to program the ADICUP360 with the software for the ADT7420. | ||
+ | - Dragging and Dropping the .Bin to the MBED drive | ||
+ | - Building, Compiling, and Debugging using CCES | ||
- | We recommend not opening | + | Using the drag and drop method, the software is going to be a version that Analog Devices creates for testing and evaluation purposes. |
- | To learn how to import | + | Importing |
- | The source code and include files of the **ADuCM360_demo_adt7420_pmdz** can be found on Github: | + | The software for the **ADuCM360_demo_adt7420** demo can be found here: |
<WRAP round 80% download> | <WRAP round 80% download> | ||
+ | Prebuilt ADT7420 Bin File | ||
+ | * [[https:// | ||
+ | Complete ADT7420 Source Files | ||
+ | * [[https:// | ||
- | [[https:// | ||
- | |||
</ | </ | ||
- | \\ | + | <WRAP center round info 80%> |
- | ===== Importing the ADuCM360_demo_pmodacl2 project ===== | + | For more information |
- | \\ | + | </ |
- | The necessary instructions | + | |
- | \\ | + | ===== Configuring |
- | ===== Debugging | + | |
- | \\ | + | |
- | * A debug configuration must be set up for this project in order to have the possibility to program and to debug the **ADuCM360_demo_pmodacl2** project. To do this, follow the instructions from [[resources: | + | |
- | * Make sure the target board is connected to the computer (via **DEBUG USB**) and using the tool bar, navigate | + | Configure |
- | + | < | |
- | {{ : | + | |
- | * Use step-by-step execution or directly run the program. | + | /* ADT7420 I2C Address */ |
- | + | #define ADT7420_ADDRESS | |
- | After completion | + | |
- | \\ | + | </code> |
- | ===== Project structure ===== | + | |
- | \\ | + | |
- | The **ADuCM360_demo_pmodacl2** project use basic ARM Cortex-M C/C++ Project structure. | + | |
- | This project contains: system initialization part - disabling watchdog, setting system clock, enabling clock for peripheral; port configuration for SPI0, accelerometer sensor use; SPI read/write functions; sensor monitoring. | + | |
- | \\ | + | |
- | \\ | + | |
- | {{: | + | |
- | In the **src** and **include** folders you will find the source and header files related to pmodacl2 application. You can modify as you wanted those files. The // | + | Configure |
- | * **Temperature display units** - // | + | |
< | < | ||
- | #define TEMP_ADC | + | uint8_t ui8configAdt7420 = (FAULT_TRIGGER_4 | CT_PIN_POLARITY | INT_PIN_POLARITY | INT_CT_MODE |CONTINUOUS_CONVERSION_MODE | RESOLUTION_13_BITS); |
- | </code> | + | /* False Trigger Count */ |
- | | + | #define FAULT_TRIGGER_1 |
- | < | + | #define FAULT_TRIGGER_2 |
+ | #define FAULT_TRIGGER_3 | ||
+ | #define FAULT_TRIGGER_4 | ||
- | # | + | /* Alarm Logic Levels */ |
- | # | + | # |
+ | # | ||
- | </code> | + | /* Interrupt Mode */ |
- | | + | #define INT_CT_MODE |
- | < | + | |
- | # | + | /* Conversion Mode */ |
+ | # | ||
+ | #define ONE_SHOT_MODE | ||
+ | #define ONE_SAMPLE_PER_SECOND_MODE | ||
+ | #define SHUTDOWN_MODE | ||
+ | |||
+ | /* Resolution */ | ||
+ | #define RESOLUTION_13_BITS | ||
+ | #define RESOLUTION_16_BITS | ||
</ | </ | ||
- | * ** Accelerometer scan interval** - how often to update sensor information. Set the // SCAN_SENSOR_TIME // parameter - **msec** (//ADXL362.h//): | + | |
+ | Assign values | ||
< | < | ||
- | # | + | /* Temperature monitoring parameters */ |
+ | # | ||
+ | #define TEMP_LOW_SETPOINT | ||
+ | #define TEMP_CRITICAL_SETPOINT | ||
+ | #define TEMP_HYSTERSIS_SETPOINT | ||
- | </ | ||
- | * ** Sensor activity and inactivity thresholds** - // | ||
- | < | ||
- | #define ACT_VALUE | ||
- | #define INACT_VALUE | ||
- | </ | ||
- | * ** Sensor activity and inactivity time** - // | ||
- | < | ||
- | #define ACT_TIMER | ||
- | #define INACT_TIMER | ||
</ | </ | ||
+ | ===== 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: 9600 | ||
+ | Data: 8 bit | ||
+ | Parity: none | ||
+ | Stop: 1 bit | ||
+ | Flow Control: none | ||
\\ | \\ | ||
- | The **system** folder contains system related files (try not to change these files): | + | |
- | * **ADuCM360** – contains low levels drivers | + | The user must press the **< |
- | * **CMSIS** – contains files related | + | |
- | * **cortexm** – contains files for system management (start-up, reset, exception handler). | + | {{ :resources: |
+ | |||
+ | ===== How to use the Tools ===== | ||
+ | |||
+ | The official tool we promote | ||
+ | |||
+ | ==== Importing ==== | ||
+ | |||
+ | For more detailed instructions on importing this application/demo example into the CrossCore Embedded Studios tools, please view our [[resources: | ||
+ | |||
+ | ==== Debugging ==== | ||
+ | |||
+ | For more detailed instructions on importing this application/demo example into the CrossCore Embedded Studios tools, please view our [[resources: | ||
+ | |||
+ | ==== Project Structure ==== | ||
\\ | \\ | ||
+ | This is the **ADuCM360_demo_adt7420_pmdz** project structure. | ||
+ | This project contains: system initialization part - disabling watchdog, setting system clock, enabling clock for peripheral; port configuration for I2C, temperature sensor data; I2C read/write functions; threshold monitoring. | ||
+ | \\ | ||
+ | \\ | ||
+ | {{: | ||
+ | |||
+ | In the **src** and **include** folders you will find the source and header files related to adt7420_pmdz application. You can modify those files as appropriate for your application. The // | ||
+ | | ||
+ | \\ | ||
+ | The **RTE** folder contains device and system related files: | ||
+ | * **Device Folder** – contains low levels drivers for ADuCM360 microcontroller.(try not to edit these files) | ||
+ | * **system.rteconfig** - Allows the user to select the peripherial components they need, along with the startup and ARM cmsis files needed for the project. | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | // End of Document // |