Pages: [1]   Go Down
Author Topic: AYUUUUUDAAAAA CON RTC MODULE DS1302  (Read 72 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hola amigos del foro nose porque me sale asi con el DS1302 para usar el reloj en tiempo real

esto es lo que me sale en el monitor serial:
Monday 02.00.2000 -- 00:01:00
Monday 02.00.2000 -- 00:01:01
Monday 02.00.2000 -- 00:01:10
Monday 02.00.2000 -- 00:01:11
Monday 02.00.2000 -- 00:01:08
Monday 02.00.2000 -- 00:01:49
Monday 02.00.2000 -- 00:01:08
Monday 02.00.2000 -- 00:01:09
Monday 02.00.2000 -- 00:01:10
Monday 02.00.2000 -- 00:01:51
Monday 02.00.2000 -- 00:01:08
Monday 02.00.2000 -- 00:01:09
Monday 02.00.2000 -- 00:01:00
Monday 02.00.2000 -- 00:01:01
Monday 02.00.2000 -- 00:01:00
Monday 02.00.2000 -- 00:01:41
Monday 02.00.2000 -- 00:01:00

esta es la programación:

#include <DS1302.h>

// Init the DS1302
DS1302 rtc(2, 3, 4);

void setup()
{
  // Set the clock to run-mode, and disable the write protection
  rtc.halt(false);
  rtc.writeProtect(false);
 
  // Setup Serial connection
  Serial.begin(9600);

  // The following lines can be commented out to use the values already stored in the DS1302
  rtc.setDOW(FRIDAY);        // Set Day-of-Week to FRIDAY
  rtc.setTime(12, 0, 0);     // Set the time to 12:00:00 (24hr format)
  rtc.setDate(6, 8, 2010);   // Set the date to August 6th, 2010
}

void loop()
{
  // Send Day-of-Week
  Serial.print(rtc.getDOWStr());
  Serial.print(" ");
 
  // Send date
  Serial.print(rtc.getDateStr());
  Serial.print(" -- ");

  // Send time
  Serial.println(rtc.getTimeStr());
 
  // Wait one second before repeating smiley
  delay (1000);
}
Logged

Offline Offline
Sr. Member
****
Karma: 8
Posts: 343
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

de donde sacaste la librería
probaste con esta?

https://github.com/msparks/arduino-ds1302
Logged

Pages: [1]   Go Up
Jump to: