Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Retain Data While Powered Off


  • Please log in to reply
11 replies to this topic

#1 StefanUSMC

StefanUSMC

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts
  • LocationWisconsin, USA

Posted 29 November 2012 - 04:59 AM

Hello, I have been searching for a way to save variables when the power to the ND is off. I read that it may be possible to write directly to flash with NetMF 4.2. Is this accurate? If not, can I use a coin cell battery to maintain power on the board? Basically I have a PCB w/ ND Mini that has a connector that goes to a second board w/ an LCD and Keypad for adjusting settings without a PC. It is not possible to have the PCB w/ ND connected to power between programming via LCD/Keypad and installation. Thanks, Brandon

#2 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 29 November 2012 - 06:29 AM

Hi Brandon, You might look at FRAM, http://www.digikey.c...ity=0&PV149=120 I have two of the small 8Kx8 chips to experiment with; one I2C and the other SPI. These are non-volatile and much faster than EEPROM or flash with better endurance. I am currently working with a 23K256 SRAM, but the battery backup is a bother. Baxter

#3 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 29 November 2012 - 11:25 AM

Or look at adding an SD Card https://www.sparkfun.com/products/544 Guess it depends how much stuff you are looking to store. SD card is good if you need to store both variables and log data. Non-Volatile RAM is definitely a good choice if you don't need a lot of storage space. Both solutions can work via I2C. Just depends on your needs.

#4 StefanUSMC

StefanUSMC

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts
  • LocationWisconsin, USA

Posted 29 November 2012 - 10:29 PM

I only need to save a few settings, so an SD card is not required for this project. The FRAM looks like the way to go. Do I need to write my own drivers for this device, or are they included in the NetMF filestream?

#5 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 29 November 2012 - 11:49 PM

You need to write your own driver. Here is a driver for the 23K256 from The Tinyclr Codeshare by Savich, http://www.tinyclr.c...share/entry/275 You will probably need to change some of the addresses and maybe some other stuff for the FRAM. Look at the datasheet. Baxter

#6 cys

cys

    Advanced Member

  • Members
  • PipPipPip
  • 113 posts
  • LocationSoCal

Posted 23 December 2012 - 07:39 PM

Another option that I've been using: https://www.sparkfun.com/products/301?

#7 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 23 December 2012 - 10:17 PM

i prefeer eeproms (24fc512) easy to use, speed ok, cheap can read/write single addresses and pages

#8 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 23 December 2012 - 11:05 PM

i prefeer eeproms (24fc512)
easy to use, speed ok, cheap
can read/write single addresses and pages


I just designed breakout that can host 4 cascaded eeproms. Should have the boards back in early January. This will give me up to 2meg storage with I2C.

#9 kiwi65

kiwi65

    Member

  • Members
  • PipPip
  • 23 posts

Posted 14 June 2015 - 05:22 AM

HI Dave,

 

Looks like you've had some success getting your Mini to talk I2C. I'm frustrated at my inability to do likewise, and wonder if I could trouble you for a little help....

 

In a nutshell, I've been trying (unsuccessfully) to get my Mini hooked up to a 24LC256 eeprom. After several days I've concluded that

 

a) My Mini and eeprom hardware setup correctly. I've checked and aligned with 5 or more comments/posts/photos, and confirmed against the datasheet

 

B) My program is correct. The last version I coded by hand turned out to be practically identical to Stefan's, so I binned mine and I'm now using his!

 

c) There is a pesky question floating around in my mind about I2C bugs in the 4.2 firmware. Here's what I'm running:

 

 

.NetMF v4.2.0.0

NetduinoMini, Build Date:        Sep 19 2012 19:40:47
ARM Compiler version 410894
 
TinyCLR (Build 4.2.0.0)
 
Starting...
Created EE.
Started Hardware.
Create TS.
Loading start at 13ed64, end 154648
Assembly: mscorlib (4.2.0.0)
Assembly: Microsoft.SPOT.Native (4.2.0.0)
Assembly: Microsoft.SPOT.Hardware (4.2.0.0)
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.2.0.0)
Assembly: Microsoft.SPOT.IO (4.2.0.0)
Assembly: System.IO (4.2.0.0)
Assembly: Microsoft.SPOT.Hardware.PWM (4.2.0.1)
Assembly: SecretLabs.NETMF.Diagnostics (4.2.0.0)
Assembly: SecretLabs.NETMF.IO (4.2.0.0)
Loading Deployment Assemblies.
Attaching deployed file.Assembly: Microsoft.SPOT.Graphics (4.2.0.0) 
Attaching deployed file.Assembly: Microsoft.SPOT.Net.Security (4.2.0.0)
Attaching deployed file.Assembly: SecretLabs.NETMF.Hardware.NetduinoMini (4.2.0.1)
Attaching deployed file.Assembly: System.Http (4.2.0.0)
Attaching deployed file.Assembly: System (4.2.0.0)
Attaching deployed file.Assembly: System.Net.Security (4.2.0.0)
Attaching deployed file.Assembly: Json.NetMF (1.3.0.0)
Attaching deployed file.Assembly: Roam.Scout (1.0.0.0)
Attaching deployed file.Assembly: Microsoft.SPOT.Net (4.2.0.0)
Attaching deployed file.Assembly: SecretLabs.NETMF.Hardware (4.2.0.0)

 

Dave, is there anything you'd suggest I try to get my I2C eeprom working? I've run out of investigative energy... and Google now turns up pages of purple links... ie I've been to all of those pages already!

 

Thanks in advance.

 

Andrew



#10 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 14 June 2015 - 05:46 AM

I can't see any mention of a hardware diagram, have you put any pull up resistors on the SDA and SCL lines?

Regards,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#11 kiwi65

kiwi65

    Member

  • Members
  • PipPip
  • 23 posts

Posted 14 June 2015 - 05:54 AM

Hi Mark, Thanks for coming back to me. It's been a lonely couple of days! Yes, I have 4k7 pullups, one on each of the SCL and SDA lines. 



#12 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 14 June 2015 - 07:22 AM

4K7, they are the values I would have started with.  Mind you, the data sheet states that typical value is stated as 10K for 100KHz clock.

 

Just checked and I don't have one of these at the moment, I'll see if I can get my hands on one.

 

Regards,

Mark


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.