|
Example to Read temperature using the DS1621
///////////////////////////////////////////////////////////////////////////
//// ////
//// EX_TEMP.C ////
//// ////
//// Reads temperature using the DS1621 and sends it over the RS232 ////
//// ////
//// (C) Copyright 1996,1997 Custom Computer Services ////
//// ////
///////////////////////////////////////////////////////////////////////////
#include <16F84.H>
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_A3, rcv=PIN_A2)
#include
main() {
byte value;
init_temp();
do {
value = read_temp();
printf("%u\r\n",value);
delay_ms(1000);
}while (TRUE);
}
|