Technical reference
14
© 2005 Pico Technology Limited. All rights reserved.
USBTC08044-2
The following code is a fragment of a C application demonstrating how to use legacy
mode with the USB TC-08 driver:
//==========================================================
// Setting up and running the unit in Legacy mode
// This is designed to make it easier to adapt code written
// for the Serial TC08 for use with the USB TC08
//==========================================================
// use 50Hz mains noise rejection
// set each channel up as a type K thermocouple
// switch off filtering for all channels
usb_tc08_legacy_set_channel
usb_tc08_legacy_get_cycle
(handle, &this_cycle_no);
(last_cycle_no != this_cycle_no)
last_cycle_no = this_cycle_no;
// now do something with the readings
// check that they have not overflowed
// by comparing each reading with 2147483647L
// or LONG_MAX (include limits.h)
usb_tc08_legacy_get_cold_junction
(handle, &cold_junction);
// now do something with the cold junction temperature