Has anyone used this ChronoDot with the Teensy 2++ (Teensyduino software)?
http://www.adafruit.com/products/255
http://docs.macetech.com/doku.php/chronodot
I connected:
ChronoDot GND to pin Teensy 2++ (GND)
ChronoDot VCC to pin Teensy 2++ (+5V)
ChronoDot SCL to pin Teensy 2++ (pin 0) I Didn't see SCL pin for Teensyduino pinouts (just for C language pinouts)?
ChronoDot SDA to pin Teensy 2++ (pin 1) I Didn't see SDA pin for Teensyduino pinouts (just for C language pinouts)?
All of the examples I saw did not show any 4.7K or 10K resistors soldered in for R1, R2 on the ChronoDot. The DS1307 uses 2.2K and this uses 4.7K or 10K? Confusing?? I did not solder in any resistors into the ChronoDot yet.
Is this correct? I bring up the Serial Monitor (set at 9600) and see nothing happening. Resistors maybe? Which ones if any?
Used this example code from the Macetech site:
#include <Wire.h>
void setup()
{
Wire.begin();
Serial.begin(9600);
// clear /EOSC bit
// Sometimes necessary to ensure that the clock
// keeps running on just battery power. Once set,
// it shouldn't need to be reset but it's a good
// idea to make sure.
Wire.beginTransmission(0x68); // address DS3231
Wire.send(0x0E); // select register
Wire.send(0b00011100); // write register bitmap, bit 7 is /EOSC
Wire.endTransmission();
}
void loop()
{
// send request to receive data starting at register 0
Wire.beginTransmission(0x68); // 0x68 is DS3231 device address
Wire.send(0); // start at register 0
Wire.endTransmission();
Wire.requestFrom(0x68, 3); // request three bytes (seconds, minutes, hours)
while(Wire.available())
{
int seconds = Wire.receive(); // get seconds
int minutes = Wire.receive(); // get minutes
int hours = Wire.receive(); // get hours
seconds = (((seconds & 0b11110000)>>4)*10 + (seconds & 0b00001111)); // convert BCD to decimal
minutes = (((minutes & 0b11110000)>>4)*10 + (minutes & 0b00001111)); // convert BCD to decimal
hours = (((hours & 0b00110000)>>4)*10 + (hours & 0b00001111)); // convert BCD to decimal (assume 24 hour mode)
Serial.print(hours); Serial.print(":"); Serial.print(minutes); Serial.print(":"); Serial.println(seconds);
}
delay(1000);
}
http://www.adafruit.com/products/255
http://docs.macetech.com/doku.php/chronodot
I connected:
ChronoDot GND to pin Teensy 2++ (GND)
ChronoDot VCC to pin Teensy 2++ (+5V)
ChronoDot SCL to pin Teensy 2++ (pin 0) I Didn't see SCL pin for Teensyduino pinouts (just for C language pinouts)?
ChronoDot SDA to pin Teensy 2++ (pin 1) I Didn't see SDA pin for Teensyduino pinouts (just for C language pinouts)?
All of the examples I saw did not show any 4.7K or 10K resistors soldered in for R1, R2 on the ChronoDot. The DS1307 uses 2.2K and this uses 4.7K or 10K? Confusing?? I did not solder in any resistors into the ChronoDot yet.
Is this correct? I bring up the Serial Monitor (set at 9600) and see nothing happening. Resistors maybe? Which ones if any?
Used this example code from the Macetech site:
#include <Wire.h>
void setup()
{
Wire.begin();
Serial.begin(9600);
// clear /EOSC bit
// Sometimes necessary to ensure that the clock
// keeps running on just battery power. Once set,
// it shouldn't need to be reset but it's a good
// idea to make sure.
Wire.beginTransmission(0x68); // address DS3231
Wire.send(0x0E); // select register
Wire.send(0b00011100); // write register bitmap, bit 7 is /EOSC
Wire.endTransmission();
}
void loop()
{
// send request to receive data starting at register 0
Wire.beginTransmission(0x68); // 0x68 is DS3231 device address
Wire.send(0); // start at register 0
Wire.endTransmission();
Wire.requestFrom(0x68, 3); // request three bytes (seconds, minutes, hours)
while(Wire.available())
{
int seconds = Wire.receive(); // get seconds
int minutes = Wire.receive(); // get minutes
int hours = Wire.receive(); // get hours
seconds = (((seconds & 0b11110000)>>4)*10 + (seconds & 0b00001111)); // convert BCD to decimal
minutes = (((minutes & 0b11110000)>>4)*10 + (minutes & 0b00001111)); // convert BCD to decimal
hours = (((hours & 0b00110000)>>4)*10 + (hours & 0b00001111)); // convert BCD to decimal (assume 24 hour mode)
Serial.print(hours); Serial.print(":"); Serial.print(minutes); Serial.print(":"); Serial.println(seconds);
}
delay(1000);
}