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 19:27] – [General description] enter key 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> | ||
Line 17: | Line 17: | ||
{{ : | {{ : | ||
- | ===== Setting up the hardware | + | ===== Demo Requirements |
- | \\ | + | |
- | * To program the base board, set the jumpers as shown in the next figure. | + | 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 (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 | ||
- | * Plug the EVAL-ADT7420-PMDZ PMOD in the EVAL-ADICUP360 base board, via the PMOD_I2C port (P10). | + | ===== Setting up the hardware ===== |
- | * Power EVAL-ADICUP360 base board via the Debug USB. | + | - To program the base board, set the jumpers/ |
+ | - 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 ===== |
- | ===== Obtaining the source code ===== | + | |
- | \\ | + | |
- | We recommend not opening | + | There are two basic ways to program |
+ | - Dragging | ||
+ | - Building, Compiling, and Debugging using CCES | ||
- | To learn how to import | + | Using the drag and drop method, |
- | The source code and include files of the **ADuCM360_demo_adt7420_pmdz** can be found on Github: | + | Importing the project into CrossCore is going to allow you to change parameters |
+ | |||
+ | 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_adt7420_pmdz 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_adt7420_pmdz** 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_adt7420_pmdz** 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 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 // | + | Configure |
- | * **ADT7420 Configuration Register** - // | + | |
< | < | ||
uint8_t ui8configAdt7420 = (FAULT_TRIGGER_4 | CT_PIN_POLARITY | INT_PIN_POLARITY | INT_CT_MODE |CONTINUOUS_CONVERSION_MODE | RESOLUTION_13_BITS); | uint8_t ui8configAdt7420 = (FAULT_TRIGGER_4 | CT_PIN_POLARITY | INT_PIN_POLARITY | INT_CT_MODE |CONTINUOUS_CONVERSION_MODE | RESOLUTION_13_BITS); | ||
- | /** | + | /* False Trigger Count */ |
- | #define FAULT_TRIGGER_1 | + | #define FAULT_TRIGGER_1 |
- | #define FAULT_TRIGGER_2 | + | #define FAULT_TRIGGER_2 |
- | #define FAULT_TRIGGER_3 | + | #define FAULT_TRIGGER_3 |
- | #define FAULT_TRIGGER_4 | + | #define FAULT_TRIGGER_4 |
- | #define CT_PIN_POLARITY | + | /* Alarm Logic Levels */ |
- | #define INT_PIN_POLARITY | + | #define CT_PIN_POLARITY |
- | #define INT_CT_MODE - 1 fault triggers an interrupt | + | #define INT_PIN_POLARITY |
- | #define CONTINUOUS_CONVERSION_MODE - Continuous conversion | + | /* Interrupt Mode */ |
- | #define ONE_SHOT_MODE - One shot conversion () | + | # |
- | #define ONE_SAMPLE_PER_SECOND_MODE - One second conversion | + | |
- | # | + | |
- | #define RESOLUTION_13_BITS | + | /* Conversion Mode */ |
- | #define RESOLUTION_16_BITS | + | #define CONTINUOUS_CONVERSION_MODE |
+ | #define ONE_SHOT_MODE | ||
+ | #define ONE_SAMPLE_PER_SECOND_MODE | ||
+ | #define SHUTDOWN_MODE | ||
+ | |||
+ | /* Resolution */ | ||
+ | #define RESOLUTION_13_BITS | ||
+ | #define RESOLUTION_16_BITS | ||
- | **/ | ||
</ | </ | ||
- | \\ | ||
- | * **ADT7420 I2C Address**- // | ||
- | < | ||
- | #define ADT7420_ADDRESS | + | Assign values to your different temperature setpoints and alarms/ |
- | </ | ||
- | * **High Temperature Interrupt** - // | ||
< | < | ||
- | #define TEMP_HIGH_SETPOINT | + | /* Temperature monitoring parameters */ |
+ | #define TEMP_HIGH_SETPOINT | ||
+ | #define TEMP_LOW_SETPOINT | ||
+ | #define TEMP_CRITICAL_SETPOINT | ||
+ | #define TEMP_HYSTERSIS_SETPOINT | ||
</ | </ | ||
- | * **Low Temperature Interrupt** - // | ||
- | < | ||
- | #define TEMP_LOW_SETPOINT | + | ===== Outputting Data ===== |
- | </ | + | ==== Serial Terminal Output ==== |
- | * **Critical Temperature Interrupt** | + | |
- | < | + | - Once complete you will need to switch |
+ | - Then follow the UART settings below with the serial terminal program. | ||
+ | \\ | ||
- | #define TEMP_CRITICAL_SETPOINT | + | Following is the UART configuration. |
+ | Select COM Port | ||
+ | Baud rate: 9600 | ||
+ | Data: 8 bit | ||
+ | Parity: none | ||
+ | Stop: 1 bit | ||
+ | Flow Control: none | ||
+ | \\ | ||
- | </code> | + | The user must press the **<ENTER>** key each time they want to display the results. |
- | * ** Temperature Hysteresis** | + | {{ : |
- | < | + | |
- | #define TEMP_HYSTERSIS_SETPOINT | + | ===== 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 ==== | ||
- | </ | ||
\\ | \\ | ||
- | The **system** folder contains system related files (try not to change these files): | + | This is the **ADuCM360_demo_adt7420_pmdz** project structure. |
- | * **ADuCM360** – contains low levels drivers for ADuCM360 microcontroller. | + | This project |
- | * **CMSIS** – contains | + | |
- | * **cortexm** – contains files for system management (start-up, reset, exception handler). | + | |
\\ | \\ | ||
+ | \\ | ||
+ | {{: | ||
+ | |||
+ | 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 // |