This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
resources:eval:user-guides:eval-adicup360:reference_designs:demo_adt7420 [16 Jan 2017 19:54] – [Setting up the hardware] new switch image Brandon Bushey | resources:eval:user-guides:eval-adicup360:reference_designs:demo_adt7420 [06 Oct 2017 22:29] – reordering and adding sections Brandon Bushey | ||
---|---|---|---|
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 as shown in the next figure. The important jumpers are highlighted in red.{{ : |
+ | - Plug the EVAL-ADT7420-PMDZ PMOD in the EVAL-ADICUP360 base board, via the PMOD_I2C port (P10). | ||
+ | - Power EVAL-ADICUP360 base board via the Debug USB. | ||
\\ | \\ | ||
Line 32: | Line 45: | ||
We recommend not opening the project directly, but rather import it into Eclipse and make a local copy in your Eclipse workspace. | We recommend not opening the project directly, but rather import it into Eclipse and make a local copy in your Eclipse workspace. | ||
- | |||
- | To learn how to import the **ADuCM360_demo_adt7420_pmdz** project form the projects examples in the Git repository, please click on [[resources: | ||
The source code and include files of the **ADuCM360_demo_adt7420_pmdz** can be found on Github: | The source code and include files of the **ADuCM360_demo_adt7420_pmdz** can be found on Github: | ||
Line 43: | Line 54: | ||
</ | </ | ||
+ | <WRAP center round info 80%> | ||
+ | For more information on importing, debugging, or other tools related questions, please see the [[https:// | ||
+ | </ | ||
\\ | \\ | ||
- | ===== Importing | + | ===== Configuring |
- | \\ | + | |
- | The necessary instructions on how to import **ADuCM360_demo_adt7420_pmdz** project in your workspace can be found in the section, [[resources: | + | |
- | \\ | + | Configure |
- | ===== Debugging | + | < |
- | \\ | + | |
- | * A debug configuration must be set up for this project | + | |
- | | + | /* ADT7420 I2C Address |
- | + | #define ADT7420_ADDRESS | |
- | {{ : | + | |
- | * 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. | + | |
- | \\ | + | Configure |
- | ===== 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 // | + | |
- | * **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** - // | + | Following is the UART configuration. |
- | < | + | |
+ | Baud rate: 9600 | ||
+ | Data: 8 bit | ||
+ | Parity: none | ||
+ | Stop: 1 bit | ||
+ | Flow Control: none | ||
+ | \\ | ||
- | #define TEMP_CRITICAL_SETPOINT | + | The user must press the **< |
- | </ | + | {{ : |
- | * ** 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 // |