C-Program CODE #include <p18F4550.h> #include<stdio.h> #include "delayy.h" #include "DS1820.h" #include "serTr.h" #include "VI.h" #define TRUE 1; #define FALSE 0; typedef unsigned char bool; typedef unsigned char uint8; static uint8 ROM_NO[8]; static uint8 LastDiscrepancy; static uint8 LastDeviceFlag; void DS1820(void); void FindDevices(void); uint8 OWFirst(void); uint8 OWSearch(void); void main() { int r; TXSTA = 0x20; // for asynchronous , tx enable settings SPBRG = 18; // for 12mhz baud rate. TXSTAbits.TXEN = 1; RCSTAbits.SPEN = 1; for(r=0;r<10;r++) DS1820_DelayUs(10000); //1sec delay DS1820(); // this function also contains V and I calling functions } /*****************************************/ void DS1820(void) { uint8 rslt, i,j; uint8 All_ROM[5][8]; int r,tem[9]; int cnt;...
ALL ABOUT TECHNOLOGY,andthinker embedded tutorials and IOT tutorials ,interview questions