.NETnanoFramework1.0
Iot.Device.Ds1302 assembly for .NET nanoFramework C# projects
Published
Jun 22, 2026
4mo ago
Total Downloads
14.5K
14,494
Install
dotnet add package nanoFramework.Iot.Device.Ds1302 --version 2.0.0-preview.94
| Product | Versions |
|---|---|
| Other |
README
DS1302 - Realtime Clock
The DS1302 serial real-time clock (RTC) is a lowpower, full binary-coded decimal (BCD) clock/calendar.
Sensor Image

Usage
Connect sensor to the microcontroller.

static void GetTimeFromDs1302()
{
GpioController controller = new GpioController(PinNumberingScheme.Logical);
using Ds1302 rtc = new(13, 12, 14, controller);
if (rtc.IsHalted())
{
Console.WriteLine("RTC is halted!");
}
else
{
rtc.Halt();
Console.WriteLine("RTC was halted now!");
}
var currentTime = new DateTime(2022, 8, 5, 18, 31, 0);
Console.WriteLine(currentTime.ToString());
rtc.DateTime = currentTime;
while (true)
{
// read time
DateTime dt = rtc.DateTime;
Console.WriteLine(dt.ToString("yyyy/MM/dd HH:mm:ss"));
Thread.Sleep(5000);
}
}
Changes from Previous Version
No structural changes between v2.0.0-preview.85 and v2.0.0-preview.94.
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
This version is marked prerelease. Validate its API and upgrade path before production use.No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.