Pi Rtc Dio with Raspberry Pi FAQ

Moderator: Steve

Pi Rtc Dio with Raspberry Pi FAQ

Postby mikronauts » Mon Oct 13, 2014 1:22 pm

This forum is for discussions about Pi Rtc Dio, Mikronauts Real Time Clock & Digital I/O Expansion board for the Raspberry Pi.

Pi Rtc Dio features 32 digital I/O's, a real time clock, 3.3V power regulation and a prototyping area.

Each digital I/O can be independently configured to provide:

- digital input
- digital output

Pi Rtc Dio is supported by C and Python libraries for the Raspberry Pi, and the RTC is directly supported by Raspbian.

Please post your questions about using Pi Rtc Dio with a Raspberry Pi in this forum.

For more complete details about Pi Rtc Dio, including documentation and example code, please see the Pi Rtc Dio product page:

http://www.mikronauts.com/raspberry-pi/pi-rtc-dio/

For more details about the Raspberry Pi, please see:

http://www.raspberrypi.org
mikronauts
 
Posts: 119
Joined: Tue Sep 16, 2014 6:58 pm

Re: Pi Rtc Dio with Raspberry Pi FAQ

Postby gmeister » Fri Jan 30, 2015 10:09 am

I am presently building the Pi Rtc Dio Gold kit and the Build Manual is not available yet. For the most part, the excellent photos on the Mikronauts site are sufficient to build from, but I do have a couple of questions that can't be answered from the photos.

The kit comes with a trim capacitor which has a flat side, suggesting that it might have polarity, but the silk screen on the board doesn't seem to indicate this. Does the orientation of the trim capacitor matter?

There are four jumper positions located under the DIP sockets for the MCP23017's, J1 through J4. I am sure that these are for determining the I2C addresses of the two DIO chips. I could experiment to figure out what addresses are available, but is there a table that can be provided that spells this out?

Thank you.
gmeister
 
Posts: 4
Joined: Thu Jan 29, 2015 11:25 pm

Re: Pi Rtc Dio with Raspberry Pi FAQ

Postby mikronauts » Fri Jan 30, 2015 3:30 pm

Thank you - good questions, and you are correct, the build manual is not ready yet.

1) The orientation of the variable capacitor does not matter as it is not a polarized capacitor

2) You are correct, the jumpers determine the address.

The MCP23017 can be addressed at I2C addresses 0x20-0x27

As there are two IC's on Pi Rtc Dio, address line A0 is used to select the IC. IC1 has A0=0, and IC2 has A0=1

There can be four Pi Rtc Dio boards on an I2C bus (only one may have the RTC section populated)

Board 0:

IC1 J1 A1 = 0, A2 = 0
IC2 J1 A1 = 0, A2 = 0

Board 1:

IC1 J1 A1 = 0, A2 = 1
IC2 J1 A1 = 0, A2 = 1

Board 2:

IC1 J1 A1 = 1, A2 = 0
IC2 J1 A1 = 1, A2 = 0

Board 3:

IC1 J1 A1 = 1, A2 = 1
IC2 J1 A1 = 1, A2 = 1

Please excuse the poor quality of the attached image, the version for the manual will look much better.

I hope to have the manual uploaded sometime next week.

Pi_Rtc_Dio_Jumpers.jpg
Pi_Rtc_Dio_Jumpers.jpg (317.63 KiB) Viewed 10970 times


gmeister wrote:I am presently building the Pi Rtc Dio Gold kit and the Build Manual is not available yet. For the most part, the excellent photos on the Mikronauts site are sufficient to build from, but I do have a couple of questions that can't be answered from the photos.

The kit comes with a trim capacitor which has a flat side, suggesting that it might have polarity, but the silk screen on the board doesn't seem to indicate this. Does the orientation of the trim capacitor matter?

There are four jumper positions located under the DIP sockets for the MCP23017's, J1 through J4. I am sure that these are for determining the I2C addresses of the two DIO chips. I could experiment to figure out what addresses are available, but is there a table that can be provided that spells this out?

Thank you.
mikronauts
 
Posts: 119
Joined: Tue Sep 16, 2014 6:58 pm

Re: Pi Rtc Dio with Raspberry Pi FAQ

Postby gmeister » Wed Feb 11, 2015 6:08 pm

I downloaded the new RPi firmware that uses the Device Tree structure in January '15 and have been struggling to get the RTC on the Rpi Rtc Dio to work. I finally gave up and reverted to an older firmware so that I could get everything working properly.

In your RPi 2 Model B review you indicated that you were able to get the RTC working by writing two python scripts to read and set the hardware clock. Could you make those two scripts available to us? I would like to remain current with the firmware releases but can't until I know that I can get the RTC working.
gmeister
 
Posts: 4
Joined: Thu Jan 29, 2015 11:25 pm

Re: Pi Rtc Dio with Raspberry Pi FAQ

Postby mikronauts » Thu Feb 12, 2015 5:48 pm

Hi gmeister,

I will be uploading those scripts soon - I need to clean them up a bit first, and add a bit more code.

Currently:

- I can read the rtc and print the time
- I can set the rtc to the system time

The missing piece is to set the system time from the RTC time.

Once I write that missing piece, it will be possible to put getrtc.py into your /etc/rc.local and have it set the time every time you boot your Pi!

Regards,

Bill

gmeister wrote:I downloaded the new RPi firmware that uses the Device Tree structure in January '15 and have been struggling to get the RTC on the Rpi Rtc Dio to work. I finally gave up and reverted to an older firmware so that I could get everything working properly.

In your RPi 2 Model B review you indicated that you were able to get the RTC working by writing two python scripts to read and set the hardware clock. Could you make those two scripts available to us? I would like to remain current with the firmware releases but can't until I know that I can get the RTC working.
mikronauts
 
Posts: 119
Joined: Tue Sep 16, 2014 6:58 pm

Re: Pi Rtc Dio with Raspberry Pi FAQ

Postby gmeister » Thu Mar 26, 2015 4:35 pm

Good news! I see that the Raspian folks have added a Device Tree overlay for the PCF8563 real time clock used on the Pi Rtc Dio.
gmeister
 
Posts: 4
Joined: Thu Jan 29, 2015 11:25 pm

Re: Pi Rtc Dio with Raspberry Pi FAQ

Postby mikronauts » Mon Apr 06, 2015 2:45 pm

Excellent!

Sorry for the delayed response... I was on vacation in Hawaii :)

gmeister wrote:Good news! I see that the Raspian folks have added a Device Tree overlay for the PCF8563 real time clock used on the Pi Rtc Dio.
mikronauts
 
Posts: 119
Joined: Tue Sep 16, 2014 6:58 pm

Re: Pi Rtc Dio with Raspberry Pi FAQ

Postby gmeister » Mon Apr 06, 2015 4:14 pm

Hi Bill. I trust the cruise to Hawaii was great.

I have tried to get the RTC working using device tree without success. I can't find any examples on the internet to walk me through the process. I am sure that I am missing something simple. The device driver loads properly (i2cdetect shows UU at address 0x51), but commands such as 'sudo hwclock -r' timeout with an error 'No such file or directory'. Any idea what I am not doing?
gmeister
 
Posts: 4
Joined: Thu Jan 29, 2015 11:25 pm

Re: Pi Rtc Dio with Raspberry Pi FAQ

Postby mikronauts » Mon Apr 06, 2015 8:55 pm

Hi Greg.

Thanks, the cruise was GREAT :)

I don't think you are doing anything wrong - or at least anything different than what I've experienced.

As far as I can tell, the latest Raspbians added support for the RPi2, and busted hwclock. I hope I am wrong, and I will follow up some other avenues to get hwclock running.

I hope to put up the python code for reading/writing the PCF8563 soon, which will at least get it running.

gmeister wrote:Hi Bill. I trust the cruise to Hawaii was great.

I have tried to get the RTC working using device tree without success. I can't find any examples on the internet to walk me through the process. I am sure that I am missing something simple. The device driver loads properly (i2cdetect shows UU at address 0x51), but commands such as 'sudo hwclock -r' timeout with an error 'No such file or directory'. Any idea what I am not doing?
mikronauts
 
Posts: 119
Joined: Tue Sep 16, 2014 6:58 pm

Re: Pi Rtc Dio with Raspberry Pi FAQ

Postby mikronauts » Sat May 09, 2015 7:03 am

You may have noticed that the "gold" version with the RTC was not available for a while.

The reason for this was simple - I ran out of PCF8563 dip 8 chips, and when I tried to order some from my normal distributors, I found out that the dip package was discontinued!

Fortunately I was able to find existing stock in Asia, and ordered several hundred to re-stock.

I'll make RTC versions of the board available shortly, as soon as I've had a chance to test a random sample of the newly arrived chips from Asia.

In the future I'll probably make a new board revision that will switch to the SOIC-8 version of the PCF8563 as that is still readily available.
mikronauts
 
Posts: 119
Joined: Tue Sep 16, 2014 6:58 pm

Next

Return to Pi Rtc Dio

Who is online

Users browsing this forum: No registered users and 1 guest

cron