Hi all
how can i interface DS1820 temperature sensor with 89s52 uC. So that it can display temp on LCD.
thanks in advance
aditya
The datasheet for the DS1820 tells what interface it has. It will tell what size of pull-up you need and the timing for the protocol.
The datasheet for your display will give the needed information how it should interface to the processor.
Google will find you sample code for the Dallas one-wire interface. Most probably, you will be able to find sample code for your display too.
Integrate and add a bit of glue code in between, that picks up the temperature values and formats them into a string and displays that string.
How much have you done already?
You don't even need google: just go straight to the Manufacturer's website - where you got the datasheet - and the code is right there, under your very nose, ready to use!
The manufacturers code may be a good starting point.
But Google may be able to help with a link that has code ported for the relevant processor - including timer initializations etc.
Do they teach people how to read data sheets in school anymore?
ND
The manufacturers code may be a good starting point. not as good as the datasheet, I have seen much 'untested' "manufacturers code"
But Google may be able to help with a link that has code ported for the relevant processor .... and is probably faulty. THEN we are AGAIN where someone who does not have the foggiest idea about what the code does can not find out what is wrong.
I STRONGLY TOTALLY ABSOLUTELY advocate against using "sample code" till you (have the ability to) code it yourself. Then, if you have a problem, you can understand the "sample code" and there may be a hint as to what you, yourself, missed.
Erik
In this particular case, the manufacturer (Maxim) is not just providing "sample" code - but gives you a complete protocol implementation (apart from the target-specific timer).
Yes, of course, you do have to spend some time reading the documentation - including the Datasheets - but it does work pretty much out-of-the-box
View all questions in Keil forum