I am doing a project where I need to store information into flash memory and read it back using an mbed. I can't get it to work right, but I noticed that even if there is no connection to power or ground, I can still read non-zero bytes from it. Most of them are 0 but some are 255. Why is that?
|
|
The inputs are floating and there might be some remaining flux on the board which is slightly conductive, pulling some inputs high or low. If the board was completely clean, you would probably see random values caused by noise. |
||||
|
|
|
If the input pins have clamping diodes input high/low levels may pass via them to \$V_{DD}\$/\$V_{SS}\$. I recently read an article where this idea was used to power an RFID tag from the input pins connected to the pickup coil. (As a matter of fact the microcontroller had only the coil connected to two I/O pins.)
|
|||
|
|
|
Assuming that the method of communication with the flash has no pull-up/down on the powered side then the pin is floating and can be influenced by just about anything (stray magnetic fields). Also, there may be internal connection paths on the flash between other pins you are driving (e.g. address or clock) that behave in an undefined manner while power isn't applied. Here's a commentary roundup from the piclist on the interesting things that float input can do: http://www.piclist.com/tecHREF/logic/xtrapins.htm (It's geared toward convincing people not to leave inputs floating on purpose in their designs, but it should provide some insight on what you're experiencing.) |
|||||
|
