0
\$\begingroup\$

I am designing a small password based door lock project which is fully made from logic gates and ICs without the use of any sort of programmable devices(it is a simple university project for the Logic Design Course).

And as assigned to me, I need a non volatile memory for this lock in order to store the password, return its value and rewrite it whenever I want. I first thought of EEPROMs but many told me that an EEPROM should be removed from the circuit in order to be reprogrammed which is not acceptable_the memory of the circuit should stay inside the circuit with respect to my project. In addition I was told that the EEPROM is only reprogrammed through a PROGRAMMER.

Here is my problem: How I could implement the EEPROM so that I can read/write to it data without removing it? that's to say my own circuit should be able to read and write to the EEPROM without using a PROGRAMMER . So is this possible? Is there a way for such implementation? Or should I think of another non volatile memory other than the EEPROM to store, read and rewrite the password? If there is another way, please let me now.

Any help is appreciated. I am really a beginner.

\$\endgroup\$
0
\$\begingroup\$

What you've been told about EEPROM's is ancient history. Modern EEPROM's are readily programmable in-circuit. You should read some datasheets of "typical" EEPROM IC's in order to understand how to use them; if you have any detailed questions, you can ask them here (in a new question).

The easiest way to find examples of EEPROM IC's is to search the websites of some of the major electronics vendors; the three that spring to my mind are Element14, Digikey and Mouser, but there are others as well.

There are two types, serial and parallel. Serial use 2-4 wires to signal data serially. Parallel use 8-16 wires for data, up to 20-odd wires for address and 3 or so for control.

Within the serial options, there are SPI and I2C. Given that you're using hardwired logic, I'd very much avoid I2C. SPI would be manageable though.

EEPROM datasheets generally give a thorough explanation of the low-level protocol required to read and write them.

My advice off the top of my head is that a something like a 25LC040 SPI EEPROM would be feasible.

\$\endgroup\$
1
\$\begingroup\$

Whoever told you that the EEPROM had to be programmed off-line using a separate programmer is not correct. That is just one way of doing it but it is not the only way. This person may have been thinking of older technology such as EPROM memory which is often easier to reprogram out of circuit due to the special voltages or timing pulses needed. Yet even EPROM can be done right in circuit.

For your application it may be actually easiest to utilize a CMOS static RAM chip with parallel bus interface and a small coil cell backup battery to provide the non-volatile storage for the password. I say this because it would likely take less logic to support such a setup.

On the other hand there are various types of serial interfaced EEPROM memories that operate off a single voltage rail and can be programmed and erased right in circuit. The two most common interface for these are SPI and I2C. You will find that for a descrete logic design that the SPI type will be easier to operate. Look for a part like a 93C46.

Serial EEPROM type devices are convenient but do require a long pulse time to support the write operation on each data item. For this reason you may want to look at a serial FRAM type device from Cypress that has equal read and write times.

With all this talk of using non-volatile memory devices for your project there may very well be a much more appropriate approach. One that requires a lot less logic circuitry!! If you keep your password design simple such as limiting to three digits (0 to 9 values) you could easily store the password into three 4-bit registers. These registers could be wired up into your logic circuit in a way to have a backup battery power source keep the registers powered and thus preserve their stored content whilst the main power to the door lock was absent. I think with this approach you can still learn a whole lot but at the same time show how engineering solutions can often be way simpler than the way that pops into mind when we have the noise of the modern methods poking away at the back of our brains.

\$\endgroup\$
  • \$\begingroup\$ Care to expand on that, and explain how it can be done with no "programmable" devices, like an MCU? \$\endgroup\$ – Majenko Dec 27 '14 at 12:11
  • \$\begingroup\$ Do you mean that I have the ability to write/rewrite/read from the EEPROM using my own circuit? That's to say without any extra logic? \$\endgroup\$ – Khaldoun Kassam Dec 27 '14 at 12:18
  • \$\begingroup\$ You can design hard wired logic circuits to support any non-volatile memory solution if you put the due diligence to it. It is often thought that an MCU is the only way achieve this but that is not true. An MCU is just a great way to replace gobs and gobs of logic circuits with 1's and 0's in the form of a program stored into a FLASH memory. \$\endgroup\$ – Michael Karas Dec 27 '14 at 12:24
  • \$\begingroup\$ Agree with Michael - dealing with a storage IC will be harder than just making a few bits of SRAM yourself. Thinking laterally, instead of storing the code like a password in RAM, you could store behind each button its "position in the right answer", and have a way of moving forward or failing back to start. \$\endgroup\$ – tomnexus Dec 27 '14 at 15:03
  • 1
    \$\begingroup\$ Just to throw in here: the coin cell SRAM approach actually provides one more layer of safety: once the enclosure is tampered with (e.g. opened) the SRAM is no longer powered. \$\endgroup\$ – Maxthon Chan Dec 27 '14 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.