Hello,
The previous thread quoted by Peg is relevant to all devices in the family, including the SHT11. The sample C code on the Sensiron website should readily adapt to the MC9(S)08 series, since it appears to simply bit-bang the I/O pins.
You would need to define the DATA and SCK signals against the I/O you are using. Note that, for the DATA signal, you would actually be controlling the associated DDR bit, as discussed in the earlier thread. With this arrangement, the send data would be inverted, but the receive data would not - probably not applicable to 80C51 devices with open drain I/O configuration.
For example, if you were to use PTA0 for data, and PTA1 for clock -
#define DATA DDRA_DDRA0
#define SCK PTA_PTA1
Also note the previous comments with respect to floating point calculations done by the sample code.
Regards,
Mac
Message Edited by bigmac on 2007-01-2305:05 PM