Hello, im working with 80c552 yC. On the Board is also an SRAM (xdata). To keep it's data after disconnecting the external power supply, i connected it with a battery. It works fine... Inside the SRAM, i have an Array of unsigned char* to save "Strings" in it. Now my problem: If i cut the external power supply and connect it again, some Strings in the array have very strange characters inside. This happens sometimes, not all the the time. I checked the software, but there is everything ok. Could it be, that the processor does some undefined things if the exrternal power supply breaks down and writes some bits into the SRAM on undefined adresses? Can anybody help me solving that problem? Andre (Germany)
Andre, I don't know much about your design, but is it possible that the external power supply when it's initially connected drags down the SAME supply lines that the battery is connected to? If so, you need to bypass this somehow with filter caps and/or blocking diodes, etc. Does this SRAM have an entirely separate battery back-up input voltage, or is this something you've worked up yourself?
connected it with a battery. ... If i cut the external power supply and connect it again, some Strings in the array have very strange characters inside. are you sure the battery gives enough voltage? the 552 is quite hungry. For best data intergrity the battery and the external power should be connected through diodes prior to the regulator. Erik
"Could it be, that the processor does some undefined things if the exrternal power supply breaks down and writes some bits into the SRAM on undefined adresses?" Yes, that's possible. Do you have a proper reset controller on your board? As the others have said, it's also possible that poor power supply design could allow this to happen. Maybe both!
Thanks for your answers, yes i have diodes included in my battery power supply circuit. AM
You need to disable the SRAM when the power fails. The CPU can do anything when the power fails. there are chips that will reset the CPU and disable the SRAM chip select.