1 Abstract Windows operating systems (NT, 2000, XP, 2003) were not designed for real-time and time-critical applications. But, due to the market requirements, many of the monitoring and control applications are to use Windows NT based operating systems. One of the most important parameter in almost all applications is temperature. Therefore, this article addresses the problem of temperature monitoring using a non real-time operating system, like Windows. A number of four solutions for thermal sensors usage are presented. Index Terms thermal sensor, real-time, time-critical, device driver, 1-Wire bus, temperature monitor, high-resolution timing. I. INTRODUCTION Due to the large usage of Windows NT based operating systems (OS) in industry applications it becomes necessary to monitor and control all kind of parameters with these operating systems, despite of their lack of determinism. The monitoring and control process usually implies real-time or critical-time features, but Windows operating systems were not designed for this kind of applications. Ideally, for supporting real-time applications, a real-time OS (RTOS) ought to be used [1]. However, market forces and acceptance of Windows in industrial applications have generated a need for achieving real-time functionality in Windows NT based operating systems [1,2,3]. Temperature became one of the most important parameter [4] in digital and electronic systems. Therefore, it is necessary to have a simple and efficient mechanism implemented in order to monitor the temperature of different modules in the system or the environment of different systems. This paper presents and proposes some solutions to connect the thermal sensors to the available PC interfaces (serial or parallel port) running Windows NT based operating systems (Windows NT, Windows 2000, Windows XP and Windows 2003). Usually, thermal sensors are connected through one or two wires serial buses, like Dallas 1-Wire bus, PC’s SMBus or I 2 C bus. The 1-Wire bus and 1-Wire devices were used in our applications and they are presented in the next section. This section presents also the problems implied by Windows real-time limitations related to 1-Wire protocol implementation. In the section III, Windows features used to implement a real-time or quasi-real time application. Temperature monitoring solutions with their performance and cost (in hardware and system loading) are presented in section IV. The conclusions of the paper are presented in the last section. II. 1-WIRE BUS AND 1-WIRE DEVICES The 1-Wire bus is a low cost bi-directional serial bus, used to interconnect different devices. The bus has a wired- AND structure and works using common TTL values. It comprises one fixed master and several slaves. The communication taking place between a master and a slave is half-duplex (data flows in both directions, but only one direction at a time). This is an asynchronous communication and thus no clock line is necessary [5]. 1- Wire devices use a power supply between 3V and 5V, but there is also a possibility to power the sensor from the data line using parasite power, consequently eliminating the need of an external power supply. [6] For communication to occur, each slave device must have a unique address. The devices that can connect to a 1- Wire bus have a lasered ROM section containing a 64 bit serial number [5]. This number is guaranteed to be unique and acts as device address. The master sends a reset pulse and receives a presence pulse from devices on the bus. Next, the master chooses one slave, using its 64 bit address. At this point communication only takes place between the master and the chosen slave, until another reset pulse is issued. [6] The DS18S20 (and DS1821 and DS1822) is a thermal digital sensor manufactured by Dallas Semiconductors. Communication with such a sensor occurs over a 1-Wire bus. The sensor measures temperature and automatically converts it to a digital value. The DS18S20 sensor can measure temperatures between -55º and +125º Celsius. It has ±0.5 º accuracy in the -10º to 85º range. The sampling and the conversion of the temperature into a digital value takes maximum 750ms [6]. The temperature is stored as a 9-bit word in an internal memory. This value can be sent to a master, if requested. There is also a possibility to set alarms. Two alarm thresholds (a high value and a low value) can be defined in the non-volatile memory. Those values will remain set even if the power supply goes down. If the temperature falls out Using Windows NT Based Operating Systems for Real-Time Temperature Monitoring Marius Marcu, Victor Tomescu, Mihai Zilahi and Mihai Ionas Department of Computer Software and Engineering, “Politehnica” University of Timisoara, Faculty of Automation Control and Computer Science, Postal Address 2 V. Parvan Timisoara, Romania Phone: (40) 0256-403263, E-Mail: mmarcu@cs.utt.ro , WWW: http://www.cs.utt.ro/~mmarcu