Cerbuino RTC help

Hi Everyone,

I have a project with Cerbuino, almost completed data logger application battery powered, SD card store. Still working on ENC28 connection.

This application requires RTC, I was going thru the forum, ghi website related pages how to activate RTC. In forum there some links pointing to wiki, thats redirecting us to ghi website:
https://www.ghielectronics.com/docs/46/cerb-family

To make sure I did find all the info, can anyone please give me a summary of all necessary steps to make of activation of RTC on Cerbuino Bee?

What I saw, but confirmation would be greatly appreciated:

  • to add 3V disc battery on BAT pin
  • to add crystal 32.768kHz crystal on ?pins
  • to add 2pcs 8pF capacitors on ???

Thanks a lot in advance,
sandor

Hi Sandor, welcome to the forum.

The page you point to should have all your necessary references, and also includes pictures, although unfortunately not with higher resolution, more detailed images.

to quote:

[quote]To activate RTC you need two hardware changes:

Add crystal on Q2. The frequency of this crystal should be 32.768Khz with load capacitance of 6pF. Here is a part number for a compatible crystal: VT200F-6PF20PPM available from DigiKey
Replace the C21 & C22 caps of Cerb40 (caps C10 & C11 on Cerberus). These need to be replaced with 8pF.

[/quote]

The images don’t help here. I don’t have one to point out where this all goes either. So you should look for some unsoldered points for Q2, and look for C21/C22/C10/C11 and see what they are - take some pics and upload them here and get confirmation before unsoldering/replacing anything ! :slight_smile:

Thanks Brett for your quick response.

Based on topic comments and website photos I attached 2 sketches, probably no soldering will be needed if it can be added to the Arduino style shield.

1, …3D.jpg: Can you please check is it right direction?
2, …Schem.jpg: Are those 2 (C10-C11) capacitors called?, where can I find Q2?

No the shield seems will contain the following things:
(1, opto couples for DI-s)
(2, analog voltage dividers to 3.3V for AI-s)
3, 3V disc battery for RTC
4, 32.768kHz crystal for RTC

Where do yo suggest to connect the 2pcs 8pF capacitors, are they needed?
Anything to adjust in software side to handle well the pins?

Thanks a lot,
sandor

sorry logwood, I think we have to wait for someone else who has a cerb-bee, or GHI, to comment here. Reason is, if you look at the schematic from Cerberus, you can see the RTC capacitors connected to PC14 and PC15, but no such connection shown on the Cerbuino bee schematic.

Thanks Brett,

Yes, you are right.

From forum and the website photo I see the RTC activation possible as per attached sketch.

Can anyone help and confirm? What about 8pF capacitors? What to adjust on software side?

Thanks a lot,
sandor

It wouldn’t hurt to try either way. But to do it right, you need Caps.

ok, thanks Gus.

can you send a schematic or description where to witre the caps?

thanks, best regards,
sandor

Take a look at hydra schematics please.

Thanks Gus,

For wiring I will use the Hydra schematics as per attached sketch, regarding to caps values to stay at 8pF. Isn’t it?

Best regards,
sandor

Yes

Hi,

I’m still working on a Cerbuino project, I use ENC28 for Ethernet access for webserver functions. In DHCP mode already working well, as it is a clear event the the cable is plugged in or not, but how to test that the cable is plugged in static IP mode. Do you know about any event or properties what can tell cable plug status in static mode?

Thanks a lot,
Sandor

When I call the RTC.Initialize() method, the program crashes. I am calling this in the ProgramStarted entry point and when called I continualey get messages in my output window saying

WARN: Total initialization time exceeds xxx seconds

Does anyone know why that call would never return?

Gus, etc. might be able to tell you what the actual problem is. But if you want to try and sort this out on your own, I think the code that you’re executing lives in the PK under…

DeviceCode\GHI\Libraries\GHI.OSHW.Hardware\Managed\RTC.cs

You can probably find this class online (or I can email it to you if you want). Basically you could just put this class into your own project (changing the namespace, etc) and step through it line by line.

What is the “PK”? Wehre can the code be found?

I decompiled the hardware dll and I am pretty sure it is getting stuck at thsi while loop

           do
          ;
        while (RTC.Cerb.RCC_GetFlagStatus(65U) == 0);

THere probably should be a timeout in that code :wink:

PK is Porting Kit. Basically it’s the dotnet runtime, libraries, drivers and config to run netMF on a specific board. This is a good distro that works with the Cerb that you can easily compile on your own…

Good idea decompiling the DLL, but I’m not so sure about that line of code. You said you were getting an error message before. It seems like this code would have just locked up the board. Maybe you could search for that error message and work your way back through the references?

I searched my code, and I don’t have that error message.

No, its acting lke the method is in an infinite loop. The error message I get is the gadgeteer framework complaining the startup time is taking to long, as a result of the RTC.Initiaize() method never returning.

@ slammers - what crystal and caps are you using?

Well, that goes to show how much I use gadgeteer.

I was using a crystal with 12.5pf load cap and 12pf caps to ground. I then found the obscure note that said never use a crystal with 12.5 Cl. I tried changing the loading with a 5pf cap in parallel with the crystal but that did not work either. I have ordered some Crystals with 6pf Cl. I will see if I have any luck with them.

http://www.digikey.ca/product-detail/en/ABS07-120-32.768KHZ-T/535-11937-1-ND/3724046