Quantcast
Channel: Wicked Device Support - Latest posts
Viewing all articles
Browse latest Browse all 651

Wildfire RTC not setting

$
0
0

Hi @Matt_H, I need a little more information about your hardware setup. What exactly are you connecting the WildFire to that has an MCP79410 and how are you connecting it?

I just now pulled the latest from GitHub from:

... and built Angular Clock using Arduino 1.6.5, with "WildFire v3 [optiboot]" selected under Tools => Board and it compiled successfully for me. If you look closer at the lines in the Angular Clock code that call rtc.setDateTime they all look like this:

rtc.setDateTime(tm.Second,tm.Minute,tm.Hour,1,tm.Day,tm.Month,tm.Year);

... with dayOfWeek set to 1 which is no big deal. In the datasheet for the MCP79410, the day of week is described as "Contains a value from 1 to 7. The representation is user-defined" and we don't use it for anything in the stock code AFAIK.

If I were to venture a guess at your problem, it would probably be something electrical. Here are some common problems:

  • Grounds may not connected between two boards.
  • Power might not be connected between the two boards.
  • MCP79410 is an I2C device. I2C requires external pull-up resistors (typically 4.7k Ohms) on both SCL and SDA lines.

A good way to check if the WildFire sees the MCP79410 in the first place would be to load it up with an I2C bus scanner sketch and see if it's detected at slave address 0x57 at all. If it's not, almost certainly one of the things I listed above is to blame.

The last thing I can think of right now is that only one processor can master the I2C bus at a time. So if, for example, you are using an Angular Clock board with stock software to host the MCP79410, you'll at a minimum need to clear the software on the ATmega328p on the Angular Clock board (for example load Examples => 01.Basics => BareMinimum) before wiring a WildFire to the board can talk to the MCP79410 without interference.

I hope that something I've said here helps, and have a great holiday season!


Viewing all articles
Browse latest Browse all 651

Trending Articles