DS1307 with PIC32

General questions about Firewing...

DS1307 with PIC32

Postby Coccoliso » Mon Nov 06, 2017 1:48 pm

Hi at all,

I have a problem with a source that worked with the FW24 but with the FW32 I have some long term problems.
The program reads the Time structure of the DS1307 by comparing the value of the minutes with the one previously stored.
In the FW24 version, the thing works constantly without blocks for hours, with the FW32 after a dozen reading cycles freezes.
I have found several postings in web that refer to the I2C of the PI32MX that can cause problems but I seem to understand from the sources that any FW (18/24/32) does not use the routines of a "native" I2C .. either wrong?
I would implement native routines (..the thing is dated 2014) but before that I would like to know if I am going to meet other problems I do not know, is there something more that I'm lost?
User avatar
Coccoliso
 
Posts: 177
Joined: Sat Sep 27, 2014 10:02 am

Re: DS1307 with PIC32

Postby Jerry Messina » Mon Nov 06, 2017 4:12 pm

There are hardware I2C modules (HI2C.bas) for MCU08 and MCU16, but I don't remember seeing one for MCU32.

For the 32MX I think it's just the bit-banged I2C.bas module unless there's one floating around I didn't see.
Jerry Messina
 
Posts: 280
Joined: Thu Feb 14, 2013 10:16 am

Re: DS1307 with PIC32

Postby Coccoliso » Mon Nov 06, 2017 4:28 pm

Hi Jerry,

I thank you for clarification, I thought there was no native I2C module (FW24 or FW32) because the DS1307 library always loads the I2C.BAS module even when you compile FW24.
Now that you told me this I try to look at the HI2C.bas of the FW24 version.
For the clock then I'll still ask you something because there is a GetPeripheralClock and an FCL clock that will definitely give me a twist :roll: on the I2CnBRG calculation.
User avatar
Coccoliso
 
Posts: 177
Joined: Sat Sep 27, 2014 10:02 am

Re: DS1307 with PIC32

Postby David John Barker » Mon Nov 06, 2017 5:10 pm

I2C support in Firewing defaults to software (bit banged) in order to provide pin compatibility with the Arduino platform. However, there are hardware I2C libraries available for 8 and 16 bit (but not 32)
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: DS1307 with PIC32

Postby Coccoliso » Tue Nov 07, 2017 11:23 am

Hi at all,

all clear! ;)
Last edited by Coccoliso on Tue Nov 07, 2017 3:57 pm, edited 2 times in total.
User avatar
Coccoliso
 
Posts: 177
Joined: Sat Sep 27, 2014 10:02 am

Re: DS1307 with PIC32

Postby David John Barker » Tue Nov 07, 2017 11:36 am

Just to be clear on anyone reading this thread:

(1)
bit banged I2C routines provide Arduino shield compatibility

(2)
Hardware I2C pinout is not compatible with Arduino shields.

(3)
Firewing defaults to software I2C for the reasons given in (1)
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm


Return to Questions

Who is online

Users browsing this forum: No registered users and 3 guests

cron

x