Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
The SHM75 sensor belongs to the I2C family and as a such needs two lines to connect with a microcontroller: SCK(clock) and SDA(data) .. see picture below ..
As you intend to use 89C51 you can select virually any two pins, for example P1.0 and P1.1 ..
Some designers use pins from P0 port because of their Open Drain configuration ..
Keep in mind that both lines require 10kΩ pullups ..