The idea of reading temperature via USB is straightforward. Construction is reliable, precise and requires few components. The circuit is elementary as there is USB to UART converter IC used.
USB to UART conversion is performed via F232RQ chip from FTDI (Future Technology Devices International). Besides the ability to convert this chip also can work in bit-bang mode (bit controlled transfer). In bit-band mode I/O lines work as both direction data-lines that can be easily controlled by the user. So there can be any digital circuit connected to F232RQ pins, in this case, AD7814 temperature sensor from Analog Devices is connected. Temperature sensor uses only three data lines: SCK, SS, and SDO of four SPI data bus. SDI line of AD7814 has to be grounded as we do not need to send any data to the sensor. FT232 works as an SPI master which emulates AD7814 protocol. Data from the temperature sensor reads together with other bus signals on FT232. The chip allows reading data while writing. Sleep signal is used to power off AD7814 temperature sensor when USB is inactive (sensor is powered from USB and consumes about 20mA).
When programming you need to activate chip and emulate SPI function for reading temperature values.
This way program can read FT232 port status depending on if pins are set as input or output. Each FT232 has its serial number it is possible to identify multiple sensors connected to one USB port.
To get the current temperature value program has to write byte 35 to port register. Sensor waits for 16 clock cycles on SCK line while CS is pulled down. Clock cycle may be 1MHz. After reading 10 bits, further data may be ignored. Anyway, it is recommended to read the datasheet for more details about configuring and reading data from this temperature sensor.
The current design can be used to read various sensors including I2C, SPI, UART and other with the digital interface. Sorry no sample program included.