Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next 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 Busheyresources: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:eval:user-guides:eval-adicup360:hardware:base_board|EVAL-ADICUP360 board]] in combination with the ADT7420 Temperature PMOD.+This project is an example for how to use [[resources:eval:user-guides:eval-adicup360:hardware:base_board|EVAL-ADICUP360 board]] in combination with the [[resources:eval:user-guides:eval-adicup360:hardware:adt7420|EVAL-ADT7420-PMDZ Temperature PMOD.]]
  
 The ADuCM360_demo_adt7420_pmdz project uses the [[ADI>EVAL-ADT7420-PMDZ]] which has the **ADT7420 0.25 degree accurate digital temperature sensor** on board. The ADuCM360_demo_adt7420_pmdz project uses the [[ADI>EVAL-ADT7420-PMDZ]] which has the **ADT7420 0.25 degree accurate digital temperature sensor** on board.
  
-{{:resources:eval:user-guides:eval-adicup360:reference_designs:pmodacl2_hw_attached.jpg?600 |}}+{{ :resources:eval:user-guides:eval-adicup360:reference_designs:adt7420:adicup360_adt7420_user_powered.jpg?600 |}}
  
-The application reads the temperature data from the ADT7420 and displays the temperature in **[codes]** and **[C]** on a serial terminal.  The temperature data can be changed between 16-bit and 13-bit accurate depending on the resolution needed.+The application reads the temperature data from the ADT7420 and displays the temperature in **[codes]** and **[C]** on a serial terminal.  The temperature data can be changed between 16-bit(0.0078 C/LSB) and 13-bit(0.0625 C/LSB) accurate depending on the resolution needed.  The application also prints out the device ID register, which is just a quick and easy check to ensure the reads are working properly.
  
-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.  Also, the user must press the **<ENTER>** key in order to refresh the results.
  
-===== Setting up the hardware ===== +{{ :resources:eval:user-guides:eval-adicup360:reference_designs:adt7420:putty_output_display.png?600 |}}
-\\+
  
- * To program the base board, set the jumpers as shown in the next figure. The important jumpers are highlighted in red. +===== Demo Requirements =====
-{{:resources:eval:user-guides:eval-adicup360:reference_designs:cn0216_hw_config.png?500|}}+
  
- * Plug the PmodACL2 PMOD in the EVAL-ADICUP360 base board, via the PMOD_SPI port (P4).+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
  
- * Power EVAL-ADICUP360 base board either via the Debug USB.+===== Setting up the hardware =====
  
-\\ + - To program the base board, set the jumpers/switches as shown in the next figure. The important jumpers/switches are highlighted in red.{{ :resources:eval:user-guides:eval-adicup360:reference_designs:adt7420:aduicup360_switch_config.png?500 |}} 
-===== 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 the project directly, but rather import it into Eclipse and make local copy in your Eclipse workspace+Using the drag and drop method, the software is going to be version that Analog Devices creates for testing and evaluation purposes.  This is the EASIEST way to get started with the reference design.
  
-To learn how to import the **ADuCM360_demo_adt7420_pmdz** project form the projects examples in the Git repositoryplease click on [[resources:eval:user-guides:eval-adicup360:quickstart:eclipse_user_guide#how_to_import_existing_projects_from_the_git_repository|How to import existing projects from the GIT Repository]].+Importing the project into CrossCore is going to allow you to change parameters and customize the software to fit your needsbut will be a bit more advanced and will require you to download the CrossCore toolchain.
  
-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://github.com/analogdevicesinc/EVAL-ADICUP360/releases/download/Release-1.0/ADuCM360_demo_adt7420_pmdz.bin| AduCM3029_demo_adt7420_pmdz.Bin]]
 +Complete ADT7420 Source Files
 +  * [[https://github.com/analogdevicesinc/EVAL-ADICUP360/tree/master/projects/ADuCM360_demo_adt7420_pmdz| AduCM3029_demo_adt7420 Source Code]]
  
-[[https://github.com/analogdevicesinc/EVAL-ADICUP360/tree/master/projects/ADuCM360_demo_adt7420_pmdz| AduCM360_demo_adt7420_pmdz at Github]] 
-  
 </WRAP> </WRAP>
  
  
-\\ +<WRAP center round info 80%> 
-===== Importing the ADuCM360_demo_pmodacl2 project ===== +For more information on importingdebugging, or other tools related questions, please see the [[/resources/eval/user-guides/eval-adicup360/tools/cces_user_guide |tools user guide.]]  
-\\ +</WRAP>
-The necessary instructions on how to import **ADuCM360_demo_pmodacl2** project in your workspace can be found in the section, [[resources:eval:user-guides:eval-adicup360:quickstart:eclipse_user_guide#importing_a_project|Import a project into workspace]].+
  
-\\ +===== Configuring the Software Parameters =====
-===== Debugging the ADuCM360_demo_pmodacl2 project ===== +
-\\ +
- * 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:eval:user-guides:eval-adicup360:quickstart:eclipse_user_guide#setting_up_a_debug_configuration_for_the_project|Setting up a Debug Configuration Page.]]+
  
-        * Make sure the target board is connected to the computer (via **DEBUG USB**) and using the tool bar, navigate to the small Debug icon{{:resources:eval:user-guides:eval-aducm360-ardz:quickstart:bug.png?30|}} and select the debugging session you created. The application will programmed and the program execution will stop at the beginning of the main() function+Configure the ADT7420 I2C address in the //ADT7420.h// file to match the hardware
-  +<code>
-{{ :resources:eval:user-guides:eval-adicup360:reference_designs:pmodacl2_debug_window.png?600 |}}+
  
- Use step-by-step execution or directly run the program. +/ADT7420 I2C Address */ 
-  +#define ADT7420_ADDRESS    0x48      /* Default I2C Address of EVAL-ADT7420-PMDZ */
-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.+
  
-\\ +</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. +
-\\ +
-\\ +
-{{:resources:eval:user-guides:eval-adicup360:reference_designs:pmodacl2_project_structure.png?400 |}}+
  
-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 //Communication.c/h// files contain SPI and UART specific data, meanwhile the //ADXL362.c/h// files contain the accelerometer data. Here are parameters you can configure: +Configure the ADT7420 in the operating mode you want using the //ADT7420.c // file
-            * **Temperature display units** - //TEMP_ADC// parameter - 1 for ADC units or 0 for Celsius degrees (//main.c //).+
 <code> <code>
  
-#define TEMP_ADC        0+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 *
-            * **Temperature sensor calibration values**- //ACC_TEMP_BIAS// and //ACC_TEMP_SENSITIVITY// paramaters - find your values based on the calculation formula (//ADXL362.h //): +#define FAULT_TRIGGER_1      /1 fault reading triggers an interrupt */ 
-<code>+#define FAULT_TRIGGER_2      /* 2 fault readings triggers an interrupt */ 
 +#define FAULT_TRIGGER_3      /* 3 fault readings triggers an interrupt */ 
 +#define FAULT_TRIGGER_4      /* 4 fault readings triggers an interrupt */
  
-#define ACC_TEMP_BIAS             (float)350 +/* Alarm Logic Levels */ 
-#define ACC_TEMP_SENSITIVITY      (float)0.065+#define CT_PIN_POLARITY      /* Critical temp active logic level */ 
 +#define INT_PIN_POLARITY     /* Interrupt temp active logic level */
  
-</code> +/* Interrupt Mode */ 
-            * **Accelerometer range setting** - //ADXL_SENSE// parameter - 2, 4, or 8 are acceptable values to set the [g] range for the adxl362 (//main.c //). +#define INT_CT_MODE      /* Selects comparator or interrupt mode */
-<code>+
  
-#define ADXL_SENSE        2+/* Conversion Mode */ 
 +#define CONTINUOUS_CONVERSION_MODE   /* Continuous conversion */ 
 +#define ONE_SHOT_MODE                /* One shot conversion, then shuts down */ 
 +#define ONE_SAMPLE_PER_SECOND_MODE   /* One second between readings */ 
 +#define SHUTDOWN_MODE                /* Power down mode activated */ 
 + 
 +/* Resolution */ 
 +#define RESOLUTION_13_BITS    /* 13-bit Temperature data */ 
 +#define RESOLUTION_16_BITS    /* 16-bit Temperature data */
  
 </code> </code>
-            * ** Accelerometer scan interval** - how often to update sensor information. Set the // SCAN_SENSOR_TIME // parameter - **msec** (//ADXL362.h//):+ 
 +Assign values to your different temperature setpoints and alarms/interrupts in the //ADT7420.h// file 
 <code> <code>
  
-#define SCAN_SENSOR_TIME   500+/* Temperature monitoring parameters */ 
 +#define TEMP_HIGH_SETPOINT             75          /* Value in Degree C */ 
 +#define TEMP_LOW_SETPOINT              0           /* Value in Degree C */ 
 +#define TEMP_CRITICAL_SETPOINT         100         /* Value in Degree C */ 
 +#define TEMP_HYSTERSIS_SETPOINT        5           /* Value in Degree C */
  
-</code> 
-            * ** Sensor activity and inactivity thresholds** - //ACT_VALUE// and //INACT_VALUE// paramaters used to determine at which acceleration values the sensor can react at sleep/wake-up commands (// ADXL362.h //): 
-<code> 
-#define ACT_VALUE          50 
-#define INACT_VALUE        50 
-</code> 
-            * ** Sensor activity and inactivity time** - //ACT_TIMER// and //INACT_TIMER// paramaters used to determine sleep/wake-up intervals(// ADXL362.h //): 
-<code> 
-#define ACT_TIMER          50 
-#define INACT_TIMER        50 
 </code> </code>
  
 +===== 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 for ADuCM360 microcontroller. +The user must press the **<ENTER>** key each time they want to display the results. 
-            * **CMSIS** – contains files related to ADuCM360 platformsuch as//ADuCM360.h// (registers definitions)//system_ADuCM360.c/h// (system clock)//vectors_ADuCM360.c// (interrupt vector table). + 
-            * **cortexm** – contains files for system management (start-up, reset, exception handler).+{{ :resources:eval:user-guides:eval-adicup360:reference_designs:adt7420:putty_output_display.png?600 |}} 
 + 
 +===== How to use the Tools ===== 
 + 
 +The official tool we promote for use with the EVAL-ADICUP360 is CrossCore Embedded Studio For more information on downloading the tools and a quick start guide on how to use the tool basicsplease check out the [[resources:eval:user-guides:eval-adicup360:tools|Tools Overview page.]] 
 + 
 +==== Importing ==== 
 + 
 +For more detailed instructions on importing this application/demo example into the CrossCore Embedded Studios toolsplease view our [[resources:eval:user-guides:eval-adicup360:tools:cces_user_guide#how_to_import_existing_projects_into_your_workspace|How to import existing projects into your workspace]] section. 
 + 
 +==== Debugging ==== 
 + 
 +For more detailed instructions on importing this application/demo example into the CrossCore Embedded Studios toolsplease view our [[resources:eval:user-guides:eval-adicup360:tools:cces_user_guide#how_to_configure_the_debug_session_for_an_aducm360_application|How to configure the debug session]] section. 
 + 
 +==== 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.
 +\\
 +\\
 +{{:resources:eval:user-guides:eval-adicup360:reference_designs:adt7420:adumc360_ide_project_structure.png?400 |}}
 +
 +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 //Communication.c/h// files contain I2C and UART specific data, meanwhile the //ADT7420.c/h// files contain the temperature information data and threshold registers. Here are parameters you can configure:
 +            
 +\\
 +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 //
resources/eval/user-guides/eval-adicup360/reference_designs/demo_adt7420.1483460404.txt.gz · Last modified: 03 Jan 2017 17:20 by Brandon Bushey