Simple NV RAM/memory for just a few bits

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Twenty Log

Well-known member
Joined
Jan 7, 2010
Messages
213
Location
New Hampshire, USA
Howdy...

Just kicking an idea around to figure out...  I have maybe 13 MOMENTARY push buttons that affect various analog circuit parameters...

These momentary push buttons use D flip flops to toggle the state of circuit modifiers in the analog circuits...

There is no microprocessor in this design....

The thing is, when the lights go out, the D flip flops lose their state (of course)....

Is there a way to back up the D flip flop states?

I was thinking an SRAM chip with battery backup, that gets new state information updates when buttons are pressed or D flip flops get updates upon power on reset (POR) from the SRAM....

However, I think a super/ultra capacitor would be better than a battery... would last for a few days, which is plenty...

I found some NV SRAM chips, with special power failure to quantum trap NV RAM from Cypress (that are NRND), but they are ghastly expensive, and I do not need 4MB (just 13 bits or so)....

SRAM seems to be less expensive, but it is hard to find just a tiny parallel SRAM that is not too expensive...

The other issue is that with 13 states to backup, an x8 SRAM will now need some sort of state machine or clock to get 13~14 bits into it... maybe not a problem here, but just a consideration..

-----
So the question is, is there a simple SRAM or static type logic that can save state with an ultra cap for a few days or so without the use of a microprocessor?

The switches cannot be changed and will be momentary....

Interesting puzzle....


 
While a micro may sound like over kill, you can buy a modest microprocessor with flash memory for a few dollars, and use it to replace all of your glue circuitry, debounce the switches, etc. and get the NV memory you want.

Once you get the digital brain, you can make it do more clever tricks... For a production design the micro could be smaller and cheaper than bunch of conventional logic.

JR
 
Indeed... this is true and quite close in terms of cost...  Thanks for the thoughts... a conundrum still in my feeble mind... hmmmm....

The D flops are probably $0.50, the hex hysteresis buffers with slowdown capacitors are $0.50, plus capacitor cost, and relay drivers are $0.31  all totaling somewhere near $4 +/-....  (now adding some sort of SRAM with POR read/load into flops, extra)... I'm probably forgetting a $0.50 chip or two...  plus cost for installation of all these different chips (my limited time)....

Yes, things like TI MSP series might be a good fit and maybe on par with cost, but my concern is a micro with a clock and FCC issues/certification...  plus ramp up time in learning the new compiler, data registers, etc, and in the meantime there is no working circuit until the software is done...  And then some platforms like silicon labs might have the Kiel compiler that is $3k~$4k, when starting to go beyond the limited free compiler included...

If I do put in a micro, I would want to also have Ethernet for various nefarious reasons and then I might just change all knobs to encoders... Mk II perhaps...  So, now an OS like uCLinux, or at least a simple ThreadX style OS to handle CGI requests.... But I do not have time for that now ;)

I was also hoping that whatever is designed here might last for 50+ years, and my thoughts of Flash code block chips might have 20 year data retention? planned obsolescence?  A simple (digitally controlled) analog EQ not working after 20 years or latching up into some unknown state upon "boot"?

I dunno... I'm on the fence...  parameters can change, like the 50 year spec, or the number of flops etc...  Still designing the circuit spec...

Thoughts?
 
Twenty Log said:
Indeed... this is true and quite close in terms of cost...  Thanks for the thoughts... a conundrum still in my feeble mind... hmmmm....
I am an old analog dog, but the math for micros is compelling and impossible (for me) to ignore.
The D flops are probably $0.50, the hex hysteresis buffers with slowdown capacitors are $0.50, plus capacitor cost, and relay drivers are $0.31  all totaling somewhere near $4 +/-....  (now adding some sort of SRAM with POR read/load into flops, extra)... I'm probably forgetting a $0.50 chip or two...  plus cost for installation of all these different chips (my limited time)....
With modern contract manufacturing, cost to place parts can exceed cost of the parts especially for simple glue logic.
Yes, things like TI MSP series might be a good fit and maybe on par with cost, but my concern is a micro with a clock and FCC issues/certification... 
If you clock any stand alone memory chip, you will probably make more EMI than a micro running from it's own internal free running clock, driving on-chip memory. Of course layout and PS decoupling matters.

I am not familiar with TI micros, but similar feature sets (probably) from several makers.
plus ramp up time in learning the new compiler, data registers, etc, and in the meantime there is no working circuit until the software is done...
that's the barrier for entry, I crossed that bridge years ago and never looked back.
And then some platforms like silicon labs might have the Kiel compiler that is $3k~$4k, when starting to go beyond the limited free compiler included...
I write in assembler so no expensive support required but is can be more time consuming .
If I do put in a micro, I would want to also have Ethernet for various nefarious reasons and then I might just change all knobs to encoders... Mk II perhaps...  So, now an OS like uCLinux, or at least a simple ThreadX style OS to handle CGI requests.... But I do not have time for that now ;)
beware feature creep... it is possible to KISS
I was also hoping that whatever is designed here might last for 50+ years, and my thoughts of Flash code block chips might have 20 year data retention? planned obsolescence?  A simple (digitally controlled) analog EQ not working after 20 years or latching up into some unknown state upon "boot"?
A flash micro is similar technology, will probably last longer than me... don't know about you.
I dunno... I'm on the fence...  parameters can change, like the 50 year spec, or the number of flops etc...  Still designing the circuit spec...

Thoughts?
One additional benefit of soft technology, is that you can change and add software based features, after the hardware is frozen.

JR
 
Was just reminded...  My experience has been that when I purchase an eval board/kit for a microprocessor that has Ethernet on it, that the Ethernet PHY chipset or the RJ-45 connector with integrated magnetics (or both) is already obsolete and not available... now the head scratching and engineering ensues; "driver" rewrite with new chip selection or just buy another eval board and convert schematics/PCB again (or be wise to the obsolescence fact before purchasing as it has happened to me twice now)?

One eval board design is originally from 2007...  Eval board purchased in 2011 with PHY obsolete...  Doesn't give me the warm fuzzies ...

ehhhh... FWIW....  maybe I'm just unlucky....

teaching a new dog an old trick.... yes, the micro math is very compelling coupled with add-on features after the fact....  yet discrete logic is somewhat DIY friendly...  Yes, I am a slightly (slightly; I vaguely remember the 1970s) younger dog, but still a dog none the less ;)

but I suspect that if this design goes production based whether by hand or pick-and-place, that it would be a design available on secondary markets perhaps a couple of decades from now and it would be nice for it to still work for the young engineer who pulled up in his/her automatic levitating car that just purchased it at the local ham radio flea market...

It is interesting to see that the Motorola 6502 is back, FWIW....  For a while there, I don't think it was around for rechipping my Atari-400, unless maybe as an IP core...  (we re-cap consoles, but re-chipping? hmmm...)

Notwithstanding, my experience with a 1,000 part (including popcorn parts) analog audio PCB, was about $960 for the contract mfg to place by hand (I did not kit the parts so it cost a little more)... so about <$1 per part...  I do not have any data on pick-place, although I imagine the NRE tooling to set up....

So yup... expensive for placement....

Yah, I suppose a one pulse clocking of any chip can stick out like a sore thumb if decoupling and PCB design is not accounted for as it is below the audio band and has harmonics well into the audio band...  I used to do signal integrity analysis for high speed logic... I don't know if my simulator can go that low in frequency....

What is the sound of one pulse clocking?  :)

Ohm......

I'll go look at some micros later today methinks...  I suppose OTP would last a long time...
 
Twenty Log said:
And then some platforms like silicon labs might have the Kiel compiler that is $3k~$4k, when starting to go beyond the limited free compiler included...

Silicon Labs supports SDCC for all of their 8051 variants, and recent versions of that compiler work quite well. You can configure their IDE to compile using SDCC and then program the micro and debug in that same IDE. Oh, and the JTAG dongle is $40.

If I do put in a micro, I would want to also have Ethernet for various nefarious reasons and then I might just change all knobs to encoders... Mk II perhaps...  So, now an OS like uCLinux, or at least a simple ThreadX style OS to handle CGI requests.... But I do not have time for that now ;)

I would use USB for that instead. (MIDI over USB? Lots of options. Look at the SiLabs C8051F320 devices for USB options.) However, again SiLabs offers a neat little 100-BaseT Ethernet interface for their MCUs which have the EMIF. But that seems like overkill.

I was also hoping that whatever is designed here might last for 50+ years, and my thoughts of Flash code block chips might have 20 year data retention? planned obsolescence?  A simple (digitally controlled) analog EQ not working after 20 years or latching up into some unknown state upon "boot"?

I think hoping that something will last for fifty years is a worthy endeavor but probably not realistic.

-a
 
Twenty Log said:
The thing is, when the lights go out, the D flip flops lose their state (of course)....

Is there a way to back up the D flip flop states?

I was thinking an SRAM chip with battery backup, that gets new state information updates when buttons are pressed or D flip flops get updates upon power on reset (POR) from the SRAM....

However, I think a super/ultra capacitor would be better than a battery... would last for a few days, which is plenty...

An SRAM chip is effectively made out of D flip-flops.

You may want to look for a low-power logic family, put the D FFs on their own power rail (with back-up battery/supercap) and isolate the I/Os with analog switches, tri-state buffers or the like. No clock, so you're staying within the letter of the FCC/CE regs.

JDB.
[all this is reasonably common in low-power systems design]
 
+1 old school CD40xx cmos logic can run down to 3V and draws silly low current in static operation.

PCB mounted batteries are out of favor for 50 year product life, and simple electrolytic caps will leak more current than CMOS draws at idle.  Maybe super caps and careful design?

I've never seen or handles a super cap let alone designed one in so I have nothing to offer there.

If the product only has to hold state for days at a time simple, months/years less simple.

JR

 
you might want to check out the arduino comunity. www.arduino.cc really lots of god stuff, free IDE, many people helping and Atmel microcontroller are really cheap. gets you up and running in no time and you can then put the firmware into your production microcontroller...

atmel chips range from tiny low pincount to large 144 pin monsters. I2c bus IO extender like microchip MCP23017 can help with pincount. and eeprom already on board.... I have the same config for some 80+ switches in the works, from larger Atmel microcontroller and eight MCP23017....

- michael
 
Hmmm.... All excellent suggestions...

Open source is like having 10,000 people working with you...

FWIW... I found the TI MSP430 series has FRAM (lead-zirconium-titanate) that is ferroelectric-crystal polarity memory and has wear/tear of thousands of years...  data retention still seems to be 10 years, but most likely will last longer...

http://www.ti.com/mcu/docs/mcuproductcontentnp.tsp?familyId=1751&sectionId=95&tabId=2840&family=mcu

I did not know Motorola did not make the 6502...  hmmm I thought there was some connection between the 6800 or somesuch... maybe that was misinformation when I was kid...  Need to update my organic SRAMs ;)

Some of the MSPs seem to be about the same cost as the static logic approach...

Interesting...

Cheers...

 
I've mostly dabbled with the MSP430's. (because I work at TI)

The new launchpad's are cool.. $4.30 gets a dev kit, and your away!

I posted in another thread of yours, the code I use for debouncing and reacting to events. Real simple stuff.
The parameters your talking about can sit in INFO FLASH on a regular MSP430G2xxx device.

The low current consumption of the MSP430 helps you with EMI in this case (I believe... although I welcome being corrected).

I just finished a small project that uses an MSP430 and it's ADC to do a VU Meter. Walk in the park!

Cheers

/R
 

Latest posts

Back
Top