Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 16:37 17 Sep 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Saving Variables for basic logging etc.

     Page 2 of 2    
Author Message
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 11:15am 01 Jun 2016
Copy link to clipboard 
Print this post

  Geoffg said  
On the AT24C32. There are many different flash chips on the market and that makes it hard (if not impossible) to write a universal driver.

Geoff


My thoughts were entirely based on not the chips out there, but the observation that the most common RTC modules out there seems to be the DS3231 with a AT24C32.
If this situation changed, the whole thing would go pear shaped.

I really don't know what people use as far as RTC's are concerned, but would assume this was the common choice.

Was certainly not thinking a universal driver.

Specifically AT24C32, as I am making the assumption that anyone with an RTC module will possibly have one already present, or if they want the feature they would need to choose an RTC with a DS3231 & AT24C32.

Cheers

Phil
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 12:08pm 01 Jun 2016
Copy link to clipboard 
Print this post

  Geoffg said  
As a general statement, it is impossible to make any programming environment do every high level function that everyone might want. There are just too many functions and everyone's requirements will be different.

Geoff


Hi Geoff,

I completely agree on the point of too many different requirements, and have learned that lesson from my suggestions relating to multi TEMP sensors on a single wire.

Totally unnecessary, easily done in basic, and I'm doing it now with 12 lines of code.
Until I worked that out I just went with 2 sensors, 2 wires.

I do though think a SAVE type function has a different priority, particularly at the level of the very basic introductory users.

Not saying I'm right in this case, but, saving certain data could be considered almost as fundmental as printing or display it, at a new users basic level.
(Mind you I have 2 IT clients that type & print simple Word documents, yet proclaim they have never saved a single thing...)


I haven't put much thought on putting Peter's solution to use, as I'm assuming once I want that it does, I will find very similar support already present in the MicroMite+, so I'd just use that. (Already have 4 sitting here).

At this point I don't need this capability, and probably won't in the future, due to what's available in the MM+.
Mostly considering from the POV of other potential new users.

All would be on the presumption that the new user chose the supported RTC module if they wanted the feature.


Cheers

Phil
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 10:24am 23 Aug 2016
Copy link to clipboard 
Print this post

  Phil23 said  
  Geoffg said  
On the AT24C32. There are many different flash chips on the market and that makes it hard (if not impossible) to write a universal driver.

Geoff


My thoughts were entirely based on not the chips out there, but the observation that the most common RTC modules out there seems to be the DS3231 with a AT24C32.
If this situation changed, the whole thing would go pear shaped.

I really don't know what people use as far as RTC's are concerned, but would assume this was the common choice........


Think it's worthwhile bumping this at this point in time.

We've got 2 MM+'s out there now that both specify using the DC3231 RTC's.
Plugged directly to the board; Explore 100 & Peter Mather's Ultimate Backpack.

Then there's the Energy Meter in SC, with 28 Pin & the quote:-

[Quote]We use this chip to store logging duration, accumulated
power usage and cost information, so that if there's a blackout
or brownout and the unit resets, you don't lose all the
data. However, note that logged data is stored in RAM as
the EEPROM is too small.[/quote]

Phil.
 
LouisG
Senior Member

Joined: 19/03/2016
Location: Australia
Posts: 129
Posted: 01:10am 24 Aug 2016
Copy link to clipboard 
Print this post


I've been following this interesting thread for a while. Whilst not being overly knowledgeable on the subject could I suggest a theoretically possible means of frequently saving a handful of variables without wearing out flash?

A lot of applications might leave a considerable portion, perhaps the bulk of program flash memory in the PIC32 chip unutilised. Could variables be repeatedly saved in sequence along successive bytes of this flash, such that upon eventually reaching the very end byte of flash memory, subsequent saves would continue starting back at the first byte of flash not used for program? The frequency of writes to any particular byte in such a pool of flash could thus be reduced by a factor of perhaps 1000.

I didn't say it would be easy ...


-
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4071
Posted: 02:09am 24 Aug 2016
Copy link to clipboard 
Print this post

That's wear levelling.

The flash may already have it internally but if not it's a bit of a pain to implement just for this.

A lot easier to use external flash with far better life - if you can't change how often things are saved.

John
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025