How to use DS1302 RTC and Micro SD card module to log data from DS18B20 Temperature sensor in the real time?

Hello dears.
hear I am to ask how to use the DS1302 RTC module and micro SD card module with aduino uno to log real time data from DS18B20 temperature sensor to my project. I am new for arduino and i was searching for YouTube video tutorials in this issue and I couldn't get one. I am looking for your help with the circuit diagram and code for the data logging process. thanks in advance.

Have you written code to read from the RTC and temperature sensor?
Have you written code to write to an SD card?

If not, example code exists in the libraries for these devices.

If you spend some time with the examples included with your IDE most of your answer will be there depending on how you define real time data. When you measure it will be at a given time but that time will have passed by the time you can do anything with the data. A microprocessor does things one step at a time. It will read then whatever your code tells it to do.

1. Check if the following circuit of Fig-1 is helpful to you.

Figure-1:

2. Connect only the DS18B20 sensor. Write codes/sketch to acquire temperature signal and show it on Serial Moniotor at 1-sec interval. You can get the codes from the examples of the IDE or you can use the following sketch.

#include <OneWire.h>
OneWire ds(2);
byte addr[8];
byte busStatus;
byte data[9];
float temp;
void setup()
{
  Serial.begin(9600);
  ds.reset();
  ds.search(addr); //getting the address of Sesnor
}

void loop()
{
  ds.reset();       //bring 1-Wire into idle state
  ds.select(addr); //slect with DS with address addr
  ds.write(0x44);    //conversion command
  do   //let sensor take as much time as it needs to finish conversion
  {
    busStatus = ds.read();
  }
  while (busStatus != 0xFF);
  //---------------------------
  ds.reset();
  ds.select(addr);  //selectimg the desired DS18B20
  ds.write(0xBE);    //Function command to read Scratchpad Memory (9Byte)
  ds.read_bytes(data, 9); //data comes from DS and are saved into buffer data[9]
  //---------------------------------

  int16_t raw = (data[1] << 8) | data[0]; //---data[0] and data[1] contains temperature data : 12-bit resolution-----
  temp = (float)raw / 16.0;  //12-bit resolution
  Serial.print("Temperature of Sensor: ");
  Serial.println(temp, 2);   //2-digit after decimal point
  delay(1000);
}

3. If Step-2 works, then connect the RTC with UNO. Set the current time manually or taking it from PC and show the time on the Serial Monitor at 1-sec interval.

4. If Step-3 works, then connect the SD Card. Write codes/sketch to save the message "Forum"; read it back and show on Serial Monitor.

5. Combine all the above sketches together and start data logging. Data logging will stop when you press the switch K1.