Hello,
You are correct. However, as explained in a previous thread, the control of the DATA line will need to differ from the sample code, for the HCS08 MCU to be compatible with SHT11 requirements - the DATA signal must never be driven high. This is achieved by controlling the DDR bit, rather than the port register bit.
For example,
Initialise DATA and CLOCK lines with -
PTBD_PTBD0 = 0; /* This setting not altered */
PTBDD_PTBDD1 = 1; /* CLOCK line is output */
Set DATA line low -
PTBDD_PTBDD0 = 1; /* Set pin for output */
Set DATA line high -
PTBDD_PTBDD0 = 0; /* Set pin for input/high-Z */
Set CLOCK line low -
PTBD_PTBD1 = 0;
Set CLOCK line high -
PTBD_PTBD1 = 1;
Regards,
Mac