Skip to content

Commit

Permalink
MPAE-14342: Readme image improvements. Header licenses updated to fix…
Browse files Browse the repository at this point in the history
… typos
  • Loading branch information
robertperkel committed Jul 12, 2022
1 parent 1204cff commit 138c1e9
Show file tree
Hide file tree
Showing 12 changed files with 86 additions and 17 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

This virtual kit creates a simple room temperature monitor using the AVR&reg; DD microcontroller to communicate with an MLX90632 Far InfraRed (FIR) sensor to measure the temperature of an object (which is assumed to represent the room's temperature). Communication with the MLX90632 is over I<sup>2</sup>C and data is sent to the computer over UART. Measurements from this demo can be read in plaintext on a serial terminal, or can be plotted over time in MPLAB&reg; Data Visualizer.

This demo was co-developed with Melexis
This code example was created from the [Window Security Sensor with an AVR DB, MLX90632, and MLX90392](https://github.com/microchip-pic-avr-examples/avr128db28-smart-security-sensor-mplab) demo and co-developed with Melexis.

![Melexis](./images/melexis.png)
![Melexis](./images/melexis.png)

## Related Documentation

Expand All @@ -31,7 +31,7 @@ This demo was co-developed with Melexis

### Hardware Setup

Connect the IR Thermo 3 Click to any of the slots on the Curiosity Nano Base Board. Operating voltage was set at 3.3V.
Connect the IR Thermo 3 Click to any of the slots on the Curiosity Nano Base Board. The operating voltage of the Click was set at 3.3V.

### I/O Usage

Expand Down Expand Up @@ -109,7 +109,7 @@ The temperature unit is set by `#define DEFAULT_TEMP_UNIT` in **tempMonitor.h**.
- 'F' = Fahrenheit
- 'K' = Kelvin

Please note, the unit specifiers are *case sensitive*. If an invalid specifier is set, the program will default to Celsius.
Please note, the unit specifiers are *case-sensitive*. If an invalid specifier is set, the program will default to Celsius.

## Theory of Operation

Expand All @@ -121,7 +121,7 @@ This feature can be bypassed by holding SW0 down when powering up the Curiosity

### Main Loop

The main loop of this program is fairly simple. The microcontroller runs a state-machine that controls the sampling and data processing of the measurement data from the FIR sensor. If the data is ready to printed, then the microcontroller will also print the data to the UART. After performing these actions, the microcontroller will enter sleep until the Real Time Clock (RTC) wakes it up to repeat the cycle.
The microcontroller runs a state machine that controls the sampling and data processing of the measurement data from the FIR sensor. If the data is ready to printed, then the microcontroller will also print the data to the UART. After performing these actions, the microcontroller will enter sleep until the Real Time Clock (RTC) wakes it up to repeat the cycle.

### FIR Sensor State Machine

Expand All @@ -136,7 +136,7 @@ In `TEMP_START`, the sensor is triggered to begin acquiring a new measurement. T

In `TEMP_WAIT`, the sensor is polled to see if new results are ready. If they are not ready, the state machine remains in `TEMP_WAIT`. If results are ready, and no error occurs during data transfer, then the state machine transitions to `TEMP_RESULTS`. If an error occurs during result reading, then the state machine is moved to the `TEMP_ERROR` state.

In `TEMP_RESULTS`, the data received from the sensor is processed to get a temperature value. This step is the slowest state, as the calculation function is an iterative function with floating point operations and square roots.
In `TEMP_RESULTS`, the data received from the sensor is processed to get a temperature value. This step is the slowest state, as the calculation function is an iterative function with floating point operations and square roots. Additionally, results are printed here.

In `TEMP_ERROR`, nothing will occur. If a program enters this state, a reset of the microcontroller is required. Depending on what triggered this state, a power cycle of the sensor may also be required. This state is usually triggered by an I<sup>2</sup>C communication failure.

Expand Down
Binary file modified images/loadConfiguration.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/terminalSettings.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/terminalStart.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/variableStreamerSetup.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 19 additions & 3 deletions room-temp-mcc.X/EEPROM_Locations.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
/*
© 2022 Microchip Technology Inc. and its subsidiaries
Subject to your compliance with these terms, you may use Microchip software and any derivatives exclusively with Microchip products. You are responsible for complying with 3rd party license terms applicable to your use of 3rd party software (including open source software) that may accompany Microchip software. SOFTWARE IS “AS IS.” NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP’S TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE
© [2022] Microchip Technology Inc. and its subsidiaries.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/


#ifndef MLX90632_EEPROM_DEFINES_H
#define MLX90632_EEPROM_DEFINES_H

Expand Down
21 changes: 18 additions & 3 deletions room-temp-mcc.X/MLX90632.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
/*
© 2022 Microchip Technology Inc. and its subsidiaries
Subject to your compliance with these terms, you may use Microchip software and any derivatives exclusively with Microchip products. You are responsible for complying with 3rd party license terms applicable to your use of 3rd party software (including open source software) that may accompany Microchip software. SOFTWARE IS “AS IS.” NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP’S TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE
© [2022] Microchip Technology Inc. and its subsidiaries.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/

#ifndef MLX90632_H
Expand Down
21 changes: 21 additions & 0 deletions room-temp-mcc.X/MLX90632_Defines.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
© [2022] Microchip Technology Inc. and its subsidiaries.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/

#ifndef MLX90632_DEFINES_H
#define MLX90632_DEFINES_H

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@
:101DEE003DE934BF20E020830196BF91AF91089565
:101DFE000E94610F0E942D108EE291E80E94DC0F6E
:101E0E0086B386FB882780F90E942C0F0E949E0BBA
:0E1E1E000E9465108823D1F30E94C508F7CFFB
:0E1E1E000E94651081110E94C5088895F7CFBB
:101E2C00CF93811105C00E94A905C82F811108C04C
:101E3C000E949E00C82F882331F00E94AA0603C07E
:0C1E4C0081E0809391608C2FCF9108956D
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@
:101870003DE934BF20E020830196BF91AF910895E8
:101880000E94AF0C0E94E50D8EE291E80E947C0D53
:1018900086B386FB882780F90E946D0C0E943D0A62
:0E18A0000E948D0E8823D1F30E948606F7CF9A
:0E18A0000E948D0E81110E9486068895F7CF5A
:1018AE00CF93882341F00E940803C82F882359F054
:1018BE000E94AC0408C00E94EE03C82F882399F33F
:0C18CE0081E0809391608C2FCF910895F1
Expand Down
2 changes: 2 additions & 0 deletions room-temp-mcc.X/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ int main(void)
{
tempMonitor_printResults();
}

asm("SLEEP");

}
}
21 changes: 18 additions & 3 deletions room-temp-mcc.X/tempMonitor.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
/*
© 2022 Microchip Technology Inc. and its subsidiaries
Subject to your compliance with these terms, you may use Microchip software and any derivatives exclusively with Microchip products. You are responsible for complying with 3rd party license terms applicable to your use of 3rd party software (including open source software) that may accompany Microchip software. SOFTWARE IS “AS IS.” NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP’S TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE
© [2022] Microchip Technology Inc. and its subsidiaries.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/

#ifndef TEMPMONITOR_H
Expand Down

0 comments on commit 138c1e9

Please sign in to comment.