The temperature sensor is one of the basic and most widely used sensors in electrical engineering. This diploma describes the program for the temperature sensor AT30TS74. This pre-calibrated sensor can measure from -55 to 125 degrees, with 0.125 degrees accuracy. AT30TS74 is presented as a slave device, to its parent device, nrf52840.
The task is divided into two parts. The first part contains the knowledge of I2C communication and the composition of the driver for the temperature sensor. In all upcoming projects, the driver will allow the user to program the sensor with functions, that can be used by anyone, regardless of the knowledge of the device itself. Sensor has four registers. The first, temperature register, is read-only, as it contains temperature data. The other three registers are designed for the different settings that sensor offers. Driver contains all the necessary functions so that we can change the values of the registers in an easy and fast way.
The second part of the task describes a program that includes the integration of the driver into a real project. The operating system and environment were already set up. My task was to make the logic of retrieving data using my driver. I have set the user two options for obtaining temperature data, he can obtain it periodically or once by pressing a button.
|