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 20:55] – [General description] 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 16: | Line 16: | ||
{{ : | {{ : | ||
+ | |||
+ | ===== Demo Requirements ===== | ||
+ | |||
+ | The following is a list of items needed in order to replicate this demo. | ||
+ | * 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 | ||
===== Setting up the hardware ===== | ===== 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. | + | - 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) | ||
- | * Plug the EVAL-ADT7420-PMDZ PMOD in the EVAL-ADICUP360 base board, via the PMOD_I2C port (P10). | + | ===== Obtaining |
- | * Power EVAL-ADICUP360 | + | There are two basic ways to program the ADICUP360 |
+ | - Dragging and Dropping the .Bin to the MBED drive | ||
+ | - Building, Compiling, and Debugging using CCES | ||
- | \\ | + | Using the drag and drop method, the software is going to be a version that Analog Devices creates for testing and evaluation purposes. |
- | ===== Obtaining | + | |
- | \\ | + | |
- | We recommend not opening | + | Importing |
- | To learn how to import the **ADuCM360_demo_adt7420_pmdz** project form the projects examples in the Git repository, please click on [[resources: | + | The software for the **ADuCM360_demo_adt7420** demo can be found here: |
- | + | ||
- | The source code and include files of the **ADuCM360_demo_adt7420_pmdz** can be found on Github: | + | |
<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 - Selects comparator or interrupt mode | + | #define INT_PIN_POLARITY |
- | #define CONTINUOUS_CONVERSION_MODE - Continuous conversion | + | /* Interrupt Mode */ |
- | #define ONE_SHOT_MODE - One shot conversion, then shuts down | + | # |
- | #define ONE_SAMPLE_PER_SECOND_MODE - One second between readings | + | |
- | # | + | |
- | #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** | + | {{ : |
- | < | + | |
+ | ===== How to use the Tools ===== | ||
- | #define TEMP_HYSTERSIS_SETPOINT | + | 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 // |