Modul RTC DS3231 for Raspberry Pi Arduino

Modul RTC DS3231 for Raspberry Pi Arduino

Kode Produk:RAS005
Ketersediaan:Tersedia
Harga: Rp.50.000,00
Jml:  

The popular Raspberry Pi computer unfortunately lacks a real time clock. This is a high precision Real Time Clock (RTC) module for the Raspberry Pi, either Model A or Model B. Designed to connect directly to the Raspberry Pi GPIO port with an ultra small footprint.

The RTC maintains seconds, minutes, hours, day, date, month, and year information. The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with an AM/PM indicator. Two programmable time-of- day alarms and a programmable square-wave output are provided. Address and data are transferred serially through an I2C bidirectional bus.

Specification

    Accuracy ±2ppm from 0°C to +40°C
    Accuracy ±3.5ppm from -40°C to +85°C
    Battery Backup Input for Continuous Timekeeping
    Operating Temperature Ranges - Commercial: 0°C to +70°C, Industrial: -40°C to +85°C
    Low-Power Consumption
    Real-Time Clock Counts Seconds, Minutes, Hours, Day, Date, Month, and Year with Leap Year Compensation Valid Up to 2100
    Two Time-of-Day Alarms
    Programmable Square-Wave Output
    Fast (400kHz) I2C Interface
    3.3V Operation
    Digital Temp Sensor Output: ±3°C Accuracy
    Register for Aging Trim
    RST Output/Pushbutton Reset Debounce Input
    Underwriters Laboratories (UL) Recognized

Basic Step
1.Remove the module blacklist entry so it can be loaded on boot
sudo sed -i 's/blacklist i2c-bcm2708/#blacklist i2c-bcm2708/' /etc/modprobe.d/raspi-blacklist.conf

2.Load the module now
sudo modprobe i2c-bcm2708

3.Notify Linux of the Dallas RTC device
echo ds1307 0x68 | sudo tee /sys/class/i2c-adapter/i2c-1/new_device

4.Test whether Linux can see our RTC module.
sudo hwclock

That's it! You can also add the i2c initialisation command to rc.local which means it will be run at every boot up;

5.Add the RTC device on boot
sudo sed -i 's#^exit 0$#echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device#' /etc/rc.local
echo exit 0 | sudo tee -a /etc/rc.local

This doesn't cover automatically setting the clock on boot and but you can do so by adding another line (above exit 0) to rc.local with;

hwclock -s

 

 


 

 

Tulis review



Note: HTML tidak diterjemahkan!

Jelek           Bagus



Facebook Comments ()