• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

How do I connect an RTC DS1302 to RP PICO and operate it with Micro Python?

Q&A Forum › How do I connect an RTC DS1302 to RP PICO and operate it with Micro Python?
0 Vote Up Vote Down
Philip Borg asked 11 months ago

I have an RTC DS1302 and wish to connect to the RP Pico using Micropython. The “Raspberry Pi Pico with MicroPython” mentions only DS1307.

2 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 10 months ago

Hi.
The library we use in the eBook is not compatible with the RTC DS1302.
 
I found this library that is compatible with your module: https://github.com/omarbenhamid/micropython-ds1302-rtc/tree/master
 
They have a basic example to show how to use the methods:
 
from machine import Pin
import ds1302
ds = ds1302.DS1302(Pin(5),Pin(18),Pin(19))
ds.date_time() # returns the current datetime.
ds.date_time([2018, 3, 9, 4, 23, 0, 1, 0]) # set datetime.
ds.hour() # returns hour.
ds.second(10) # set second to 10.
 
Let me know if you can adapt our examples to use that library. Otherwise, I can try to help (however, I don’t have that specific module to test).
 
Regards,
Sara
 

0 Vote Up Vote Down
Sara Santos Staff answered 10 months ago

Ok.
Great. 
Then, let me know.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.