I have an ARM board to be powered, which draws between 0.5 and 1.5 ampere’s on 5 volt. Tried using an standard 7805 (2 ampere spec), but the system would not boot. VOut dropped to 4.5 volts and 7805 was getting to hot with +/- 24 volt VIn.
Measuring room or object temperatures with the DS18B20. It is a digital component wich does all the work for you. You only need to COMMAND it do the measurement. A short moment later you can request 2 bytes containing the temperature.
Of course there is a protocal wich says how to communicate. See 1-Wire and the DS18B20 datasheet.
Environment: MPLAB X IDE + HI TECH Compiler for PIC16
#define OW_TRIS TRISA0 //Port mode register, 1=input,0=output
#define OW_PORT RA0 //Pin connected to 1-wire bus
char state = 0;
OW_TRIS = 0; //Set as output
OW_PORT = 0; //Drive Low
OW_TRIS = 1; //Release, Set back as input
state = !OW_PORT; //If devices are present, it will keep the pin low
//! will invert 1=0, 0=1
return state; //Returns 1 if devices are present