We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hey can any body did this i need to interface both ds18b20 and at24c04 with 8051 there are more examples but problem is for at24co4 i need 12 mhz crystal and for ds18b20 i need 11.059 mhz. can it be done with any one of those crystals? plz i need it badly
caesar
"problem is for at24co4 i need 12 mhz crystal and for ds18b20 i need 11.059 mhz."
No. you don't!
All you need to do is to look at the bits that rely upon instruction timing (eg, timing loops), and adjust those for whatever crystal frequency you choose.
You will also have to adjust timer settings, baud rate divisors, etc - but that's just a matter of applying the formulae shown in the datasheet.
Note that 11.059 MHz is specifically designed for easy, accurate generation of standard baud rates...
See: http://www.keil.com/c51/baudrate.asp