View Full Version : parallel prom/eprom

Kevin Brown
12-08-2009, 03:51 AM
I need to read from some 1m 128x8 proms any quick and easy ideas

12-08-2009, 04:08 AM
hI Kevin BrowN

Use 2 74HCT4040 in cascade as ADDres counter and you can read them by Proeller on 8bit bus.


1. 2 - 74HCT4040 cascade connected.

Propeller pins used
_______________ 2 - 1 resat Counters to 0 .... 2 Coun CLK - (seqential addres to PROMS) +1 every CLK.
_______________ 2 - 1 /CS _ 1 - /RW (Output enable to PROM)
_______________ 8 - Input pins To read data


Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


12-08-2009, 04:34 AM
That's how I used to program EPROMs via a PC printer port, many years ago.


Amateur radio callsign: G1HSM

Kevin Brown
12-08-2009, 07:51 AM
I though about using the 74HCT4040's but don't want to pay to get them here in time for this project. I was hoping some one would have a slick way of doing it with software that would be easy for a newbe to the propeller,


Mike Green
12-08-2009, 08:59 AM
You didn't make it clear, but I assume you have a 128K x 8 EEPROM (1 megabit) which would need 17 address bits, 8 data bits, and 3 control lines (/RD, /WR, /OE). That's 28. It doesn't leave much. You could use 28/29 for two of the address lines since the Propeller's boot EEPROM isn't needed after booting, so you'd have 0-7 for data, 8-10 for the control lines, and 11-29 for the address lines. You could still use 30/31 for talking to a PC.

12-08-2009, 09:08 AM
Mike I am doing the same thing with a 2764 eprom , I was wondering could any of the control lines RD/, WR/. OE. Just be tied high or low and not controlled? And one more thing ,, Don't you need to connect all the address s lines?
I get using the data lines but for sake of argument just say a 2716 ,, 16KX8 Eprom wouldn't you need to connect all 16 address lines to the prop beside all the control lines??? then to read shift through all the address lines ++ shift right by one until end of address??

Post Edited (mikediv) : 12/8/2009 2:30:05 AM GMT

Kevin Brown
12-08-2009, 09:37 AM
Mike G. you are correct it is 128Kx8 All I need do do is read the OTP prom. I will not be doing any thing else with the propeller at that time so no extra pins is fine.

12-08-2009, 10:58 AM
You could also use any chips available such as a '595, '273, '174, etc. to load with the upper address bits if you only need a few more bits than are available on the prop.

Mike Green
12-08-2009, 11:20 AM
For a PROM, you don't actually need any control lines. You could tie /CE and /OE to ground and, if there is any /WE, you'd tie that to Vdd. The PROM I/O lines would be connected to Prop I/O 0-7 and the PROM address lines would be connected to Prop I/O 8-24.

Kevin Brown
12-09-2009, 08:17 AM
do you know of any objects that I can use or look at would give me a head start.


Mike Green
12-09-2009, 08:27 AM
This is really too simple to devote an object to. In Spin using the pins I mentioned, just do something like:

DIRA[ 24..8 ]~ ' This makes pins 24 to 8 into outputs. Pins 7 to 0 are inputs by default.
OUTA[ 24..8 ] := myAddress ' This sets pins 24 to 8 to the address to use
myData := INA[ 7..0 ] ' This reads the data on pins 7 to 0

You can put the first statement into your initialization routine. The last two statements are all you need otherwise.

Kevin Brown
12-09-2009, 08:51 AM
Mike thanks for your time and patience with a newbe. I alway try to make thing to complicated, I need to read the entire chip and was tring to figure out how to step though the address's. I spent a lot of time looking for ideas on how to step though the address space. I was looking at incrimenting a real number and converting to hex for myaddress and out puting the data to terminal to save is that reasonable?

Mike Green
12-09-2009, 09:53 AM
That's overkill. You don't need real numbers. You've got 32 bit integers. That's way more than enough to handle a 17 bit address. You don't need to do any conversions unless you want to look at the value (like on a terminal) and the HEX routine in any of the terminal/serial I/O objects will take care of that for you. For example:

DIRA[ 24..8 ]~~
repeat myAddress from 0 to $1FFFF
OUTA[ 24..8 ] := myAddress
myData := INA[ 7..0 ]
ser.str(string(" $"))

Kevin Brown
12-09-2009, 10:29 AM
Mike thanks so much you have saved me so much time. It would have taken me several weeks to figure this out. Now that I can see it.....simple. The only thing I dont understand is what INA does. I did a search on it but did not find a clear answer I am guessing that it is a grouping/combine statment

thanks again


Kevin Brown
12-09-2009, 10:55 AM
I found it, now I really feel dumb

thanks again

12-10-2009, 03:40 AM
Hey Kevin if you get this to work can you share your results? I am trying to figure it out as I type I think I have the interface to the prop chip done correctly but I am having trouble with code .. I was thinking for reading prom something like a start address 000000 and then doing an increment right command all the way through the entire address range, I am stuck at how to read the data lines and then what to do with it. Example lets just say I start with 0000000000000000 and read D0-7 then 0000000000000001 and read D0-7 I cant figure out how to save data
what I am trying to do is read a Spin program from a 2764 save it , then burn it to another 2764 and be able to use prom in a prop project so the 2764 would hold my spin program . So far I can only read the D0-7 lines as binary but cant save the data anywhere??
I hope I am explaining this properly ,, I just want to be able to write spin code to 2764s and be able to have my prop board read the code back and run it, I do have erpom burner by the way so I can burn a hex program ..

Mike Green
12-10-2009, 06:05 AM
You can use your EPROM burner to burn a copy of the .eeprom file produced by the Propeller Tool. Unfortunately, that won't really help you. The Propeller will only boot from a 32K or larger I2C memory. It can't boot from a parallel memory like the 2764. You could write your own boot routine (has to be in assembly), store that in a 32K EEPROM, and use that to boot from the set of four 2764s, but it's a very inefficient way to do business.

12-10-2009, 09:09 AM
Mike to be honest that would be fine ,, I can load my prop Spin code and than have it load the spin program from the prom The reason I am doing this is I have 50,, 2764s and 50,, 27128 parts I just wanted to do it for the heck of it and it will just help me learn Spin
I wrote an LED blink Spin program very simple used the prop tool to save it as binary and then burned it into a 2764 I am not sure it was done right because I have not figured out how to read the 2764 with the prop chip ,, I can do a compare with the eprom burner software and it says its fine. So this is not somehting that is being done for any reason other than my satisfaction LOL that and I have tons of chips
But thank you Mike for all the help .. Not to change subject but if you happen to read this post or anyone can someone clear up serial eeproms ,, I am confused as to size ,, with the parallel old proms like the 2764 they were 8 bit devices so if you had a 16 bit machine you had to use 2 chips 64X8 and so on 32 bit machine 4 chips ,, but if a device is serial do they still measure in X bits and would it matter? I see some of the new parts like the prop eeprom is 256K is that by 32 bits how does that work ????

Kevin Brown
12-10-2009, 09:17 AM

All I am trying to do is read proms, I will not be doing anything else with the data, it will be output to a terminal application on the pc, I can then save the output. As you can see Mike G did did just about all of it in the simple statement above.

12-10-2009, 09:26 AM
That's fine Kevin I would love to just be able to do that I am a complete noob to programing I never even learned basic so while I can do some Spin stuff I am struggling with anything more complicated that using the I/O in very simple examples.
It helps me a lot to actually just jump in and do stuff with the prop hardware is easy for me programing is tough but thanks for letting me share in this post Kevin how did you end up doing your interface to your prom mine is kind of messy but I used 1K resistors and did like Mike said for the control

Mike Green
12-10-2009, 09:36 AM
@mikediv - Serial EEPROMs and other forms of serial memory work in bytes. The data is transferred serially, but it's grouped in hunks of 8 bits.

In terms of loading programs, you really have to use an assembly routine to do the loading because, if you're using Spin, you have to overlay the existing running program with the new program and there are tables scattered around memory that are needed for execution of the existing program that's trying to do the loading. An assembly program can stop all the other cogs and doesn't have to use any of the hub (shared) memory while it's doing the loading, then can start up a Spin interpreter to handle the newly loaded program.