This shows you the differences between two versions of the page.
Previous revisionNext revision | |||
— | resources:eval:user-guides:eval-adicup360:reference_designs:demo_adt7420 [06 Oct 2017 22:29] – reordering and adding sections Brandon Bushey | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== 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. | ||
+ | |||
+ | ===== General description ===== | ||
+ | |||
+ | This project is an example for how to use [[resources: | ||
+ | |||
+ | 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. | ||
+ | |||
+ | 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. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | ===== 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 ===== | ||
+ | \\ | ||
+ | |||
+ | - 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. | ||
+ | |||
+ | \\ | ||
+ | ===== 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. | ||
+ | |||
+ | The source code and include files of the **ADuCM360_demo_adt7420_pmdz** can be found on Github: | ||
+ | |||
+ | <WRAP round 80% download> | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | </ | ||
+ | |||
+ | <WRAP center round info 80%> | ||
+ | For more information on importing, debugging, or other tools related questions, please see the [[https:// | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | ===== Configuring the Software Parameters ===== | ||
+ | |||
+ | Configure the ADT7420 I2C address in the // | ||
+ | < | ||
+ | |||
+ | /* ADT7420 I2C Address */ | ||
+ | #define ADT7420_ADDRESS | ||
+ | |||
+ | </ | ||
+ | |||
+ | Configure the ADT7420 in the operating mode you want using the //ADT7420.c // file | ||
+ | < | ||
+ | |||
+ | 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_2 | ||
+ | #define FAULT_TRIGGER_3 | ||
+ | #define FAULT_TRIGGER_4 | ||
+ | |||
+ | /* Alarm Logic Levels */ | ||
+ | #define CT_PIN_POLARITY | ||
+ | #define INT_PIN_POLARITY | ||
+ | |||
+ | /* Interrupt Mode */ | ||
+ | #define INT_CT_MODE | ||
+ | |||
+ | /* Conversion Mode */ | ||
+ | #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 | ||
+ | |||
+ | </ | ||
+ | |||
+ | Assign values to your different temperature setpoints and alarms/ | ||
+ | |||
+ | < | ||
+ | |||
+ | /* Temperature monitoring parameters */ | ||
+ | #define TEMP_HIGH_SETPOINT | ||
+ | #define TEMP_LOW_SETPOINT | ||
+ | #define TEMP_CRITICAL_SETPOINT | ||
+ | #define TEMP_HYSTERSIS_SETPOINT | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== Outputting Data ===== | ||
+ | |||
+ | ==== Serial Terminal Output ==== | ||
+ | |||
+ | Following is the UART configuration. | ||
+ | Select COM Port | ||
+ | Baud rate: 9600 | ||
+ | Data: 8 bit | ||
+ | Parity: none | ||
+ | Stop: 1 bit | ||
+ | Flow Control: none | ||
+ | \\ | ||
+ | |||
+ | The user must press the **< | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | ===== 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 ==== | ||
+ | |||
+ | \\ | ||
+ | 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 // |