DS1307 Module โมดูลนาฬิกา Tiny RTC I2C modules 24C32 memory DS1307 clock

DS1307 Module โมดูลนาฬิกา Tiny RTC I2C modules 24C32 memory DS1307 clock
DS1307 Module โมดูลนาฬิกา Tiny RTC I2C modules 24C32 memory DS1307 clockDS1307 Module โมดูลนาฬิกา Tiny RTC I2C modules 24C32 memory DS1307 clockDS1307 Module โมดูลนาฬิกา Tiny RTC I2C modules 24C32 memory DS1307 clockDS1307 Module โมดูลนาฬิกา Tiny RTC I2C modules 24C32 memory DS1307 clock
รหัสสินค้า SKU-00608
หมวดหมู่ โมดูลนาฬิกา
ราคา 50.00 บาท
สถานะสินค้า พร้อมส่ง
ลงสินค้า 19 ก.ย. 2565
อัพเดทล่าสุด 19 ก.ย. 2565
คงเหลือ ไม่จำกัด
จำนวน
ชิ้น
หยิบลงตะกร้า
บัตรประชาชน
บุ๊คแบ๊งค์
คุ้มครองโดย LnwPay

DS1307 Module โมดูลนาฬิกา Tiny RTC I2C modules 24C32 memory DS1307 clock

โมดูลนาฬิกาแบบเรียวไทม์ ใช้ IC เบอร์ DS 1307 เก็บข้อมูลวันเวลา แสดงผลเวลาได้ทั้งแบบ 12 และ แบบ 24 ชั่วโมง ใช้ง่ายมีไลบารีมาตรฐานพร้อมใช้งาน

DS1307 I2C real time clock chip (RTC)
24C32 32K I2C EEPROM memory
Using LIR2032 rechargeable lithium battery and charging circuit with
DS1307 with battery backup can not solve the problem of literacy.
Fully charged, can provide DS1307 timing 1 year.
Compact design, 27mm * 28mm * 8.4mm
Leads to the DS1307 clock pin provides a clock signal for the microcontroller.
Other I2C devices can be cascaded.

DS1307 is a low power, with 56 bytes of non-volatile RAM clock calendar full BCD code real-time clock chip, the address and data via a two-wire bidirectional serial bus transmission, the chip provides seconds, minutes, hours and other information , the number of days of each month can be automatically adjusted. And there is a leap year compensation. AM / PM flag determines clock operates in 24 hours or 12 hours mode, the chip has a built-in power-sense circuit, brownout detect, and battery switching function.

DS1307 features:

Available on the second, hour, minute, number of days per month, month, week, count the number of days, and has a leap year compensation. Record on the line in 2100.

  • 56 bytes of non-volatile RAM
  • Two-wire serial interface
  • Programmable square-wave output
  • Automatic power-down detection and switching circuit
  • In battery backup mode, power consumption is less than 500nA

  ________________________________________________________________________________________________ 

ตัวอย่างการใช้งาน

โมดูลนาฬิกา RTC DS1307 -> Arduino

  • Vcc ->  5V
  • Gnd -> Gnd
  • SCL -> A5
  • SDA -> A4

ภายในโมดูลจะประกอบไปด้วย DS1307 และ AT24C32 ซึ่งเป็น

ต่อใช้งานร่วมกับ Arduino ด้วยบัส I2C และการอ่านค่าเวลาของจะต้องอ่านจากจิสเตอร์ DS1307 เพื่อลดความยุ่งยากผมจะใช้ library ซึ่งมีคนเขียนไว้เรียบร้อยแล้วสามารถดาวน์โหลดที่ https://github.com/jarzebski/Arduino-DS1307

เรามาเริ่มกันเลย หลังจากที่ดาวน์โหลดและติดตั้งเรียบร้อยแล้ว ให้ใส่โค๊ตตามตัวอย่างนี้นะครับ

 

  #include <Wire.h>
  #include <DS1307.h>
  DS1307 clock;
  RTCDateTime dt;
  void setup()
  {
  Serial.begin(9600);
  // Initialize DS1307
  Serial.println("Initialize DS1307");;
  clock.begin();
  // If date not set
  if (!clock.isReady())
  // Manual (YYYY, MM, DD, HH, II, SS
  clock.setDateTime(2014, 4, 13, 19, 21, 00);
  }
  }
   
  void loop()
  {
  dt = clock.getDateTime();
  Serial.print("Long number format: ");
  Serial.println(clock.dateFormat("d-m-Y H:i:s", dt));
   
  Serial.print("Long format with month name: ");
  Serial.println(clock.dateFormat("d F Y H:i:s", dt));
   
  Serial.print("Short format witch 12h mode: ");
  Serial.println(clock.dateFormat("jS M y, h:ia", dt));
   
  Serial.print("Today is: ");
  Serial.print(clock.dateFormat("l, z", dt));
  Serial.println(" days of the year.");
   
  Serial.print("Actual month has: ");
  Serial.print(clock.dateFormat("t", dt));
  Serial.println(" days.");
   
  Serial.print("Unixtime: ");
  Serial.println(clock.dateFormat("U", dt));
   
  delay(1000);
  }
view rawdemo.ino hosted with ❤ by GitHub

 

จะได้ผลัพธ์ดังรูปที่  2 ซึ่งจะแสดงเวลาในรูปแบบต่างๆ ตามที่เราเขียนไว้ใน code

 

2016-08-05_0-03-26

 

ขออธิบายนิดนึงนะครับ  Serial.println(clock.dateFormat(“d-m-Y H:i:s”, dt)); ตามตัวอย่างโค๊ตนี้จะเห็นว่า ใส่แค่ d,m,Y ก็แสดงค่าเวลาออกมได้เลยโดยที่เราไม่ต้องเขียนโค๊ตอ่านค่าจากรีจิสเตอร์ของ RTC เลยเพราะการทำงานทั้งหมดของเขียนไว้ในไลบาร์รี่หมดแล้วเราแค่เรียกใช้และใส่รูปแบบให้ได้ตามที่เราต้อการแค่นั้นเอง ง่ายใช่มั้ยล่ะครับ

________________________________________________________________________________________________ 

ข้อมูลเพิ่มเติม Tiny RTC I2C modules 24C32 memory DS1307 clock for arduino

วิธีการชำระเงิน

ร้านค้านี้ยังไม่ได้กำหนดวิธีการชำระเงิน กรุณา ติดต่อกับทางร้าน เกี่ยวกับรายละเอียดในการชำระเงิน
ทางร้านยังไม่ได้ทำการเพิ่มบัญชีรับเงิน กรุณาติดต่อ เจ้าของร้าน

CATEGORY

MEMBER

STATISTIC

หน้าที่เข้าชม114,272 ครั้ง
ผู้ชมทั้งหมด51,034 ครั้ง
เปิดร้าน31 ก.ค. 2559
ร้านค้าอัพเดท4 ก.ย. 2568

CONTACT US

รายการสั่งซื้อของฉัน
เข้าสู่ระบบด้วย
เข้าสู่ระบบ
สมัครสมาชิก

ยังไม่มีบัญชีเทพ สร้างบัญชีใหม่ ไม่มีค่าใช้จ่าย
สมัครสมาชิก (ฟรี)
รายการสั่งซื้อของฉัน
ข้อมูลร้านค้านี้
ร้านบ้านโค้ด-Bancode
บ้านโค้ด-Bancode
จำหน่ายบอร์ดไมโครคอนโทรลเลอร์ Arduino,Module,Shield,Sensor,R,L,C,IC เเละอื่นๆ โทร.0624952525
เบอร์โทร : 0964188828
อีเมล : bancode.dev@gmail.com
ส่งข้อความติดต่อร้าน
เกี่ยวกับร้านค้านี้
สินค้าที่ดูล่าสุด
ดูสินค้าทั้งหมดในร้าน
สินค้าที่ดูล่าสุด
บันทึกเป็นร้านโปรด
Join เป็นสมาชิกร้าน
แชร์หน้านี้
แชร์หน้านี้

TOP เลื่อนขึ้นบนสุด
พูดคุย-สอบถาม