On Thu, 25 Sep 1997, myke predko wrote: > Bernd Grunwald wrote: > > >Has anyone written some code reading the temperature from an DS1821 into an > >PIC and can help me a little bit with implementing that? Or is there some code > >somewhere on the Internet? > > I have some code for this on my web page for interfacing to a single DS1820: > > http://www.myke.com I just found it and it seems to be exactly what I need. Thanx! > >I want to implement my project on the 16F84 4MHz. I have to wait in some > >condition for about 3 minutes and also have to read the temperature (DS1821) > >meanwhile. But I have only one timer in the PIC and that seems to be not so > >simple. Has anyone an easy method to measure 3 minutes (+-10 sec) without using > >the timer and working with the pic meanwhile. The IRQ pin PB0 would be > >available, but I don't want to use much more external components ... > > Why don't you use the Watchdog timer? If you have to use the Prescaler for If I understood the Datasheet correct, the Watchdog timer resets the PIC, if it is not in sleep mode?!? > something else, you could use a 16 bit timer to count to 10,000 (which is > the number of 18 msec intervals in 3 minutes). Do You mean an external timer? -- CU. -|-\_ Internet: embo@bse.netestate.de -|+/ PGP key available on request