RTC Teensy 3.1

Status
Not open for further replies.

tignix

Member
A simple question on Teensy3.1RTC :

Using TimeSerial program in the examples folder of Arduino IDE I can correctly set the Data and Time into Teensy.

Using TimeTeensy3, also from examples of Arduino IDE, I can retreive the Data correctly but Time is always around 2 minutes and 14 seconds behind..!


Please helps

Ciao
 
How do you know that the time is correctly set when you use the time setting sketch? That is not clear from your post.

Then what metric do you use to decide that Time is around 2 minutes 14 seconds behind?
 
It's also suspicious [and possibly a route towards the answer] that the the is always consistently off. i would expect it to differ over time, if there's something configured wrong.
 
If you remove the battery, disconnect Teensy from any power source, and short VBAT to GND for 5 seconds (to make absolutely sure the capacitors on the board get fully discharged), and then power back up, do you get a different result?

Perhaps the Teensy 3.1 time will initialize to the date/time when you last compiled a program?

The TimeSerial example only changes the memory-only time keeping by the Time library. To change the actual RTC, you need to set the time while TimeTeensy3 is running, so Teensy3Clock.set() gets called.
 
Hi Paul,

I made the following procedure :

No power to Teensy
Battery remouved
Short of battery holder terminals
TimeTensy3 and TimeSerial running
Looking at Epoch Converter on internet I made syncronization entering "T1414493400", the timestamp of 10.50 Local time Rome(Italy) when this was the actual time.., and miracle, whether you believe it or not, now everything is ok within a second...!
Out of joke, I thank you very much and next, I ask you if there is a way to get the day of week data.

Again thanks a lot

Ennio
 
Teensy3.1 and Adafruit Ultimate GPS

Hi,

I purchased Adafruit Ultimate GPS and verified that it works correctly on Arduino Pro Mini.
Operation with Teensy3.1 have not been positive.
Obviously everything is due to my lack of knowledge of the details / changes to be made on the system.
Someone who has a working system could be kind enough to tell me in detail the software to use and libraries ....? !!
As far as HW connections are concerned, I have some confusion about Tx/Rx.
Following the Adafruit tutorial but with some reluctance, I connected Tx to Tx and Rx to Rx, and to my surprise the data transfer works well ......
What about connecting with Teensy..??

Please help

Thanks
 
On the Teensy 3.1, change the Serial to Serial1 to talk to the GPS if you've hooked RX to 0 and TX to 1. Change the Serial to Serial2 if you've hooked RX to 9 and TX to 10. Change the Serial to Serial3 if you've hooked RX to 7 and TX to 8. Since the Teensy 3.1 has hardware FIFOS for Serial1/Serial2, you should use those over Serial3. Unlike the Arduino, writes/reads to Serial do not write to both the USB connection and the first hardware UART.
 
I apologize, but being really a beginner in the field, I would need a simple program to use to connect the GPS to Teensy 3.1 with the details of its libraries and connections of Tx and Rx pins of the CPU.

thanks again
 
Take a look at the examples in the TinyGPS library. There are several there. You'll also want to look at the Time library for Teensy 3 specific time related code. Don't forget to add the appropriate crystal to the Teensy 3 board as well.
 
Status
Not open for further replies.
Back
Top