Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Support for MCP342x 1 to 4 channels 12 to 18bit differential ADC with I2C interface
29-04-2014, 09:12 PM,
#11
RE: Support for MCP342x 1 to 4 channels 12 to 18bit differential ADC with I2C interface
Hi

Today I have become crazy.
I recompiled my program (now is about in production) with 1003 release, nothing work.
After 10-15 minutes the program freeze without a valid reason (no division by 0 bug).

After 2 hours I recompiled the program with previous 981 release and all working normally.

I checked the difference in p32 folder of the two versions, the modification in i2c.c about I2CWAIT_WORKAROUND have disappeared.
I copied the i2c.c from 981 folder to 1003 folder and now all is returned working normally.

At this point this modification is TOO IMPORTANT.
The 1004 release contains 981 version of i2c.c with predefined I2CWAIT_WORKAROUND.

Thanks djpark for your great idea.


Bye Bye, Moreno
Reply
30-04-2014, 05:19 AM,
#12
Support for MCP342x 1 to 4 channels 12 - 18bit differential ADC with I2C interface
Frankly, Moreno.

I update the pinguino.exe files from the latest easypack but I don't update the library files blindly without comparing the changes. With unmoderated source updating and rapid source change without much concern for the backward compatibility (in my opinion) can be quite dangerous for the project development and maintenance.

As for the I2C hang problem, the workaround is really a temporary workaround only and shouldn't be the solution.

It is a brilliant idea of using the interrupt flag to determine the I2C bus idle without using the interrupt. However, anything that can possibly go wrong will go wrong anyway. Either the interrupt flag is not set or flag is cleared by some other interrupt handling ISR.

The real solution shall be finding out the nature and cause of the event and fix it, or change the way to examine the I2C bus idle. I find that it happens more often when both Timer2 (millis) and RTCC (AlarmEvery*) interrupts are used in the application.

DJ
Reply
30-04-2014, 02:25 PM,
#13
RE: Support for MCP342x 1 to 4 channels 12 to 18bit differential ADC with I2C interface
(29-04-2014, 09:12 PM)moreno Wrote: I recompiled my program (now is about in production) with 1003 release, nothing work.

I don't believe that revision 1003 was a "release" in any formal sense... just another development iteration checked into the source control repository.

The last packaged release was revision 999 (and even then, I'm not sure it can really be called a formal release).

We might need to spell out what can be considered a formal release, if any.
Reply
01-05-2014, 06:43 AM,
#14
RE: Support for MCP342x 1 to 4 channels 12 to 18bit differential ADC with I2C interface
Hi

I do not think is so important define some versions "stable".

I just wanted to emphasize how the modification is important for the stability of I2C communications.
Now are 3 days which program run without problems


Bye Bye, Moreno
Reply
01-05-2014, 03:47 PM,
#15
Support for MCP342x 1 to 4 channels 12 to 18bit differential ADC with I2C interface
(30-04-2014, 02:25 PM)Pinguino Wrote: We might need to spell out what can be considered a formal release, if any.

Many of us are familiar with release style used by many software packages:-

1) nightly snapshot version
2) unstable beta version
3) stable release version
4) old versions (previous stable versions)

All new features or changes are made to the nightly snapshot version to be scrutinized before they can be added to the beta version. Beta version is tested by public to find missed bug before being released as a stable version. There shall be feature freeze for beta and stable versions.

What we have here is 1) nightly snapshot in SVN and 2) unstable beta version in Wiki. The old versions are only found in some outdated web sites.

I don't know if there is any committee or group setting policy or overseeing the Pinguino development but I only see loose combination of individual efforts. Perhaps it is the essence of Pinguino development and I appreciate a lot to these individuals.

I like the simplicity of Pinguino development platform without learning the full development detail of MPLAB X (though I am getting used to). However, in my opinion, the current arrangement may keep the Pinguino at the hobby project level without taking advantage or potential of Pinguino, especially Pinguino32 development.

DJ
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)