To set up DS1302 …

You will ned to instal an library https://github.com/Makuna/Rtc/wiki

 

Go to example and try to find this:

Connecting the Device

// CONNECTIONS:
// DS1302 CLK/SCLK --> 5
// DS1302 DAT/IO --> 6
// DS1302 RST/CE --> 4
// DS1302 VCC --> 3.3v - 5v
// DS1302 GND --> GND

ThreeWire myWire(6,5,4); // IO, SCLK, CE
RtcDS1302<ThreeWire> Rtc(myWire);

  void setup() {
  //RtcDateTime(year, month, dayOfMonth, hour, minute, second);
  // To set the on the device uncoment line below:
  //Rtc.SetDateTime(RtcDateTime(2022, 10, 30, 20, 43, 00));
}
  
  void loop() {
  RtcDateTime now = Rtc.GetDateTime();
  int displaytime = (now.Hour() * 100) + now.Minute();
  Serial.println(displaytime);
}