Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

How do I do this with an EEPROM?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

How do I do this with an EEPROM?

by electronbee on Sun Sep 25, 2011 3:27 am

I have searched a bit here, as well as on Google. However, I am at such a state of n00b with EEPROMs that I don't even know how to "ask" the question properly let alone search for it. So, i will fill you guys in with what I have so far, and, hopefully, someone can point me in the right direction. I actually took this class during the summer at my school but the Professor basically shot through the lectures and straight to the 68HC11. So, I can actually program a 68HC11, as well as a BasicSTAMP, but, not an EEPROM. ;/ Either way, those two are overkill for this project of mine.

I know that EEPROM's take in an EEP file. But, I know nothing else unfortunately. I appreciate any help anyone can provide.

My problem: I want to change the bit output of the knobs in my car to another output to control another module. they are "soft-switches" in that they have a ground, and 4 output pins which are grounded accordingly. I was told that I can use a parallel EEPROM, such as the CAT2816A-D. I can make my table in Excel, then, burn it into the EEPROM, connect the wires, and I'm off.

But, that's as much as I know. I'll paste the table below, the first column is what the switch outputs and the second column is what I want it to output.

0000 0111
1110 1100
1010 1111
0010 1110
0011 1010
1011 1011
1111 1001
0111 1000
0101 0001
1101 0011
1001 0010
electronbee
 
Posts: 6
Joined: Wed May 04, 2011 2:26 am

Re: How do I do this with an EEPROM?

by westfw on Sun Sep 25, 2011 3:04 pm

A parallel EEPROM is a memory device. You feed in an address, and you get out data.
For your example, you would program address 0 to contain 0111, address 0xE (1110) to contain 1100, and so on. All in all you have four bits of address (16 possible locations) and 4 bits of output; a 16x4 bit memory. You're using the EEPROM as a translation table...

Current parallel EEPROMs tend to be for program storage, and have densities closer to 128000x8
(yeah, that's 64k TIMES bigger than you need.) These may or may not be silly to use; they're not always that expensive (JameCo has a 32k*8 part for $2) You would need to set up a programmer; for EEPROM that should be pretty easy. For EPROM and PROM (which are also available, and use different technologies for storing the bits) the programmer can get quite complex.

It is probably simpler to program a microcontroller to do the translation, even if it IS overkill.

Or, the problem is probably simple enough to throw simple gates at. You have 4 signals, each of which is some logic function of 4 inputs. You can do this in no more than 5 chips of 74xxx logic; probably less.

westfw
 
Posts: 1731
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Re: How do I do this with an EEPROM?

by electronbee on Sun Sep 25, 2011 10:18 pm

I would hesitate to do this with logic gates. I have Logic Aid and I made the initial circuit with the correct mapping. It's a little messy and then I'd have to make a PCB to take it all off the breadboard and hide it behind the car controls.

As I will probably have to make three of these, and each will be different, I'll use a PIC I think. Plus, that totally rationalizes the purchase of a PIC development kit. :)

But, the class I took on the 68HC11 and logic design is coming back to me and I will still look into the EEPROM as a look-up/translation table.
electronbee
 
Posts: 6
Joined: Wed May 04, 2011 2:26 am

Re: How do I do this with an EEPROM?

by zener on Sun Sep 25, 2011 10:49 pm

Did you notice the 4th column is the exact opposite of the 6th column? That makes the gate approach even easier. And the 2nd column is almost the exact opposite of the 7th (all except one of the states). I am not sure how much that would help. You can use Karnaugh maps to do it. http://k-map.sourceforge.net/

zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Re: How do I do this with an EEPROM?

by zener on Sun Sep 25, 2011 10:51 pm

electronbee wrote:As I will probably have to make three of these, and each will be different, I'll use a PIC I think. Plus, that totally rationalizes the purchase of a PIC development kit. :)

I like the PICkit

zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Please be positive and constructive with your questions and comments.