EEPROM Programmer design - Page 1
Forum section: electronics / projects

author: banedon
author_rank: Regular Contributor
timestamp: August 26, 2013, 02:26:06 pm
content: Hi guysI've been delving (probably off the deep end) into digital eletronics. After completing my previous design for a Full Adder circuit, I thought I'd try something a little more... adventurous: a manual EEPROM programmer!Memory and (eventually) microcontroller is something I've always wanted to try, so thought this would be a good way to learn.I'm posting this to gather your thoughts and comments on my design - and to see if I've completely stuffed anything up.One thing to keep in mind is that I ahven't done the timing digram yet so this may still need additional (or different) components dependig on what that reveals (timing diagrams scare me - never done them before!).Here's the projects premise with a link to the schematic beneath:EEPROM Reader/WriterPartsItem Qty PartC1-4 4 100nF ceramicSW1-3 3 8 way dip/rocket switchSW4 1 2 poll switchSW5 1 push button switchIC1 1 Atmel AT28C64B CMOS (64Kb / 8K x8) parallel EEPROMIC2 1 Texas Instruments 74HCT245 CMOS Bus transceiverIC3-8 6 NXP 74HCT4511 CMOS BCD to 7 segment driver/latch/decoderIC9 1 Texas Instruments CD74HC4050 CMOS InverterR1-4,23,24 6 8 way 500R/250mW resistor chip/networkR15-18 4 8 way 4k7/250mW resistor chip/networkR5-14,19-22 14 10k 250mW resistorsD3(a-d) 1 KINGBRIGHT - CC56-11CGKWA 4x7 segment LED displayIntentionEnable the reading and writing of a parallel EEPROM using dip switches and outputting the results to displaysUser interface & useThe user has 3 sets of 8 way dip switch banks (SW1-3), a toggle switch (SW4) and a push button (SW5).Reading: The toggle switch (SW4) is set to read . The user sets the address being read on the address dip switch banks (SW 1 & 2) and then the push button switch (SW5) is pressed for a second to do the read operation. Data outputs appear on D4 and D5.Writing: The toggle switch (SW4) is set to write. The user sets the address being written on the address dip switch banks (SW 1 & 2), sets the data to be written on the data dip switch bank (SW3). The push button switch (SW5) is then pressed for a second to do the write operation.Schematic snapshot>>> The note detailing how SW4 operates regarding read/write info is incorrect (my bad).It should say:"Closed = Low / READ operationOpen = High / WRITE operation"Sorry!

author: sync
author_rank: Frequent Contributor
timestamp: August 26, 2013, 03:01:03 pm
content: Some remarks. You need to debounce SW5 for writing. Also the Atmel datasheet specify the write pulse width from 100ns min. to 1us max. Maybe the EEPROM won't work or will be damaged when you use much, much longer manually generated pulses. Then DIP switches have a lifetime of a few 1000 cycles. But i'm guessing you will give up before.

author: banedon
author_rank: Regular Contributor
timestamp: August 26, 2013, 04:00:40 pm
content: I found some switch debouncing idea here so will have athink on that:http://www.labbookpages.co.uk/electronics/debounce.htmlIn the case of needing to limit the button press time, I obviously need to find something that'll take an input and then output only for a predetermined time. I.e. received the SW5 button press signal nd output for just of 100ns - even if SW5 is still being held...Going to have to have a think on that. Cheers for taking the time to high-light these problems.

author: baljemmett
author_rank: Unknown
timestamp: August 26, 2013, 04:39:27 pm
content: Another thing you may not have considered is that the display decoder chips you're using are BCD, rather than hex - and not even one of the variants that produce various symbols for 0xA-0xF, but instead one that blanks the display for those undefined BCD values. You might find this somewhat restrictive - around 60% of all possible data values won't display usefully!

author: banedon
author_rank: Regular Contributor
timestamp: August 26, 2013, 05:02:08 pm
content: Hi baljemmettYeah, I thought of that earlier today. Given that most LED 7-seg displays have the same inputs, I was going to look at changing them over for hex ones later. It's a pity as I rather liked the idea of having a joined 4-in-a-row set.@SyncI've found a guide on youtube which mentions using a resistor/capacitor/schmitt trigger combination to debounce the switches.The only thing which might be a problem with the example in the video is that it inverts the input, so obviously I need to using a non-inverting one.

author: banedon
author_rank: Regular Contributor
timestamp: August 26, 2013, 05:38:42 pm
content: Thinking on the set time for accessing the EEPROM, what about using a J-K flip-flop / 555 Timer combination?

author: sync
author_rank: Frequent Contributor
timestamp: August 26, 2013, 07:17:23 pm
content: Quote from: banedon on August 26, 2013, 05:02:08 pmThat's a classic way to debounce a switch. For the non-inverting one just use an inverter after it. The 74HC14 schmitt trigger has 6 of them. You can use them as normal inverters. Also for your 74HC4050 which is non-inverting btw.To generate the write pulse you can use a monostable multivibrator. Look at the 74HC221. It even has a schmitt trigger for the B trigger input build in. So you don't need an extra IC for debouncing.But there will be new problem. You uses SW5 for reading the EEPROM too. Now it will only display the value for a very short time. You won't see it. I would change the circuit that it always display the values when in read mode.Another thing. Setting the addresses with DIP switches will be very annoying. I would use a up/down counter. With up and down keys for each digit. But also with a carry from from one digit to the next, e.g. 1F -> 20. This alone is a nice beginners project into discrete digital logic.Quote from: banedon on August 26, 2013, 05:38:42 pmI don't thing a 555 is suitable for sub micro second pulses.

author: banedon
author_rank: Regular Contributor
timestamp: August 26, 2013, 07:36:41 pm
content: Fantastic. I'll look into your recommendations and see what's what. Ultimately, I'm not serious about using this circuit to write data to an EEPROM which is then used elsewhere; I'm more interested in seeing what this teaches me and just getting it to work at all.I wouldn't worry too much about me knackering my fingers and raging at DIP switches. If I get it working at all I can remake the user interface if needed - like a carry over project.BTW, you don't happen to know of a CMOS BCD Encoder/Decoder which supports characters A-F (as wll as 0-9) do you? I've had a look at Farnell's website and all the ones I look at there seem to be straight 0-9 with anything else blanked.UPDATE: Looking at my schematic, do I need the resistor network R17 given that there are no switches on the data bus and only ICs load that bus now? I had it on there from before I added IC2 which is a 74HC245 bus transceiver (so that I can stop the data bus being loaded by SW3 during read operations). However, R15 and 16 stay as they are loaded directly by SW1 & 2...?Also, to address what you were saying about the results not being displayed for long enough because of SW5. Perhaps I should employ a latch which holds /LE on ICs3-8 once they've gone low...THis is getting complicated and I've not got to the hard part yet lol. But nothing ever comes if you don't have to work at it (or persue advice in this case!)Further update - here's the new debounce circuitry:

author: sync
author_rank: Frequent Contributor
timestamp: August 27, 2013, 04:48:24 pm
content: Quote from: banedon on August 26, 2013, 07:36:41 pmNo. I only found a few obsolete parts.QuoteNo.You also don't need the pull up resistors for /BI and /LI at the 74HCT4511. Just connect the inputs directly to +5V.QuoteYes.QuoteSorry, i didn't realized that 7 segment decoders are latched. When /LE goes high the value is stored and the display remains. It should work. But the values are only updated when SW5 is pressed. Not when you change the DIP switches. Do you what this?QuoteThe signal from IC10B has the wrong polarity. When SW5 is pressed it goes high. You need to invert it. You can just use a remaining inverter from the 74HC14.And replace the 74HC4050 with another inverter from the 74HC14. The 74HC4050 is non-inverting.

author: Paul Price
author_rank: Super Contributor
timestamp: August 27, 2013, 05:42:23 pm
content: You can use schmidt-trigger gates for debounce but your circuit gives you an active high pulse to the *Write pin, but I think an active low pulse is needed. If you cascade two schmidt-trigger stages with a short R-C coupling for create the correct short pulse for write from the second schmidt-trigger stage.

author: banedon
author_rank: Regular Contributor
timestamp: August 27, 2013, 11:45:01 pm
content: Hi guysI've put in an inverter on SW4 & 5 lines to deal with the debounce circuitry signal inversion effect. Also, changed the outputs to reflect the corrected outputs for IC1 /WE line (well spotted!).The truth table for SW4 should now be:Updated circuitry schematic:I'm still stuck for displays... does anyone have any suggestions? I wanted to use 7 segmented LED displays as they're very basic and easy to use.

author: sync
author_rank: Frequent Contributor
timestamp: August 28, 2013, 06:54:11 pm
content: Quote from: banedon on August 27, 2013, 11:45:01 pmNot really. Here is the truth table directly from the 74HC4050 datasheet. See, it doesn't invert your signal.And here is a small drawing error. You are shorting both switches together.QuoteThis is normally done in software on a microcontroller. It can be done with a programmable logic (PAL, GAL, CPLD, FPGA), discrete logic or a *ROM too. The dedicated hex to 7 segment decoders are obsolete, hard to get and very expensive (10$ each or more).Or you can go the classic unix way and use octal numbers instead of hex.Use only 3 bits per digit. Then the 74HC4511 will work perfectly.

author: banedon
author_rank: Regular Contributor
timestamp: August 28, 2013, 08:56:16 pm
content: Hi SynThanks for the heads up regarding the drawing error (it was Eagle trying to be helpful after I moved the lines) and also inverters. I've replaced the 4050 with a 4049 (same family, just inverting version).I don't really want to introduce a CPU at this stage (ironically, it's partly for a small 6502 microcomputer project that I'd doing this project - need to write the EEPROM). Can an LCD display accept hex numbers and display them?

author: banedon
author_rank: Regular Contributor
timestamp: August 29, 2013, 07:55:31 pm
content: Ok. I've "simplied" the display a little () so that I can at least try and test the unit. I can decide later on a more suitable display method.Here's the latest schematic:

author: mariush
author_rank: Super Contributor
timestamp: August 29, 2013, 09:16:53 pm
content: You could just light up one digit at a time to save shift registers and resistors and lower the power consumption ... maybe use a ULN2003A or ULN2004A if you use the proper type of led digits.

author: sync
author_rank: Frequent Contributor
timestamp: August 30, 2013, 03:25:14 pm
content: Quote from: banedon on August 28, 2013, 08:56:16 pmThe 4049 will work.QuoteNo.Quote from: banedon on August 29, 2013, 07:55:31 pmYou need base resistors for the LED driving transistors. 4.7k Ohm in series with the base is ok.The circuit could work. The write pulse length problem is not fixed. But maybe it's not an problem. Prototype it and see what's happen.

author: banedon
author_rank: Regular Contributor
timestamp: August 31, 2013, 10:14:02 pm
content: I tried a test circuit with just the address bus & data bus switches (and pull down resistors) connects. /WE was tied low to GND and /OE tied to +5V. I put in SW5 and the debounce circuitry and linked that to the /CE pin (I tied the SW5 high when closed and the used a 4k7 drop down resistor to do away with the need for the inverter).Unfortunately it didn't work. here's a picky. Took me ages to wire it up. I checked that the switches worked when closed, that the /CE pin went low when the SW5 was pressed. Also buzzed out the lines from +5V rail through the switches to the pins. Double checked correct lines went to the correct pins.I used did use a 9V battery through an L7805 +V regulator (max 1.5 Amp). Both are new and seemed to be supplying the correct voltage.Possibly a timing issue?BTW the EEPROM itself is has been tested using a batronix BX32 programmer. I wrote a test file to it fine and am using it to check to see if I have written anything.If anyone has any advice please let me know. In the meantime I'll try and figure it out myself(and possibly purchase a hammer...).