How to program a RAM chip using an external file inside Proteus simulator ?

Thread Starter

q12x

Joined Sep 25, 2015
1,657
I want to program a RAM chip inside Proteus simulator, but with an EXTERNAL FILE.
- How can I do that? I never did it, and is the first time for me. Please, much advise required.
I actually did start this research already but I stopped on the contents of the file. I also find fragments of how to program it on youtube.
1 - *.hex file using my notepad and a hex editor named HxD.exe (that is new to me). But I got a ton of errors from Proteus, until I loaded a PIC .hex file and it worked with not errors. The trick that I figure out, was to add :00000001FF inside a new blank *.hex file and I could loaded it with no errors. But after this breakthrough, I have no idea how to make each line of data at which address. And Proteus does not show me the RAM data inside if I am MANUALLY program it.
2 - *.bin file using only notepad. Inside RAM chip Edit properties, a special parameter must be inserted [0.bin,ASCHEX]
(where 0.bin is the name of my file and ,ASCHEX is the parameter.) My best educated guess, this parameter is actually a conversion from bin to hex.
1661604011871.png
And like previous try, the content of the files and how to write correctly, failed.
Inside Proteus I got very random pins ON while changing the address manually. And not as expected from the code inside the file.

So far, I figured out how to MANUALLY program a RAM in Proteus simulator, thanks to youtube and a couple of google searches.
Memory #1
This 6116 was the easiest
1661602345020.png
Memory #2
This one was a bit tricky, and I had to look more careful into it's datasheet. And I managed to make it work.
1661602462398.png
Memory #3
This was a fail in implementation but I understood what it needs to make it work. It is by far the strangest RAM I ever encountered for manual programming. This simulation didnt work because that Monostable Multivibrator pulse circuit didnt want to work at all, probably some program bug or a mistake I made but im blind to see it; so I probably have to make a 555 circuit for it. Im showing it anyway because I made a part of it.
1661602532884.png 1661602633967.png

Thank you !
 
Last edited:

Thread Starter

q12x

Joined Sep 25, 2015
1,657
Thank you very much mister dl324, this helps.
I downloaded that proteus file from that link page, I loaded it into my proteus v8.11, it complained a little but it worked. Now I can play with its contents. Very interesting program. I still have to check those files and test them in my program. For now I play a bit in this new file and I clearly see some inverted results. Instead of 14 it says 41 and so on, exactly after 11. And probably this was that guy problem to resolve, I didn't read its thread at all. Shame of me, but I go for the prize first.
Thank you again, very interesting find.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,657
So mister @absf made some code in some program and then compile it as .hex files that he post them as attachments ready to download. Which is fine for that guy, but not for me. All that I need is what did he used? what program?
The code I have to make it myself but I need the logic and the tool.
That post is partially good, but not there yet. Im glad you find it mister @dl324. Its still a + for me.
Inside both those hex files: - It appears it still have that :00000001FF in ...the ... start of the code but inverse read probably.
And I learned that is a way of programming it and then convert it as hex, not as I imagined it, working it directly in hex format.... heh.
I will give it a try anyway, until the real answer will illuminate my darkness.

This is a more 'easy' hex file content from the 2 files provided on that link.
Code:
:1000000000000000000000000000000000000000F0
:1000100000000000000000000000000000000000E0
:1000200000000000000000000000000000000000D0
:1000300000000000000000000000000000000000C0
:1000400000000000000000000000000000000000B0
:1000500000000000000000000000000000000000A0
:100060000000000001010101010101010101010184
:100070000101010101010101010101010101010170
:100080000101010101010101010101010101010160
:100090000101010101010101010101010101010150
:1000A0000101010101010101010101010101010140
:1000B0000101010101010101010101010101010130
:1000C0000101010101010101020202020202020218
:1000D0000202020202020202020202020202020200
:1000E00002020202020202020202020202020202F0
:1000F00002020202020202020202020202020202E0
:0401000002020202F3
:00000001FF
My observations:
- it starts with :00000001FF but in the end of file, probably that is the start of the program somehow? My proteus was complaining about being in the FIRST line, not last like here. Very strange, but it works like this.
I took a random line:
:1000300000000000000000000000000000000000C0
and split it like this:
:10003 0000 0000 0000 0000 0000 0000 0000 0000 000C0
and I know the reading is right to left
this :10003 MUST be the address ! - but im guessing these stuff at my best of my abilities. Heh
so I numbered how many packages of 4 bits are there.
and are 8 of 4 bits or 10, including the remaining 2 of 5bits each in extremes.
it still doesnt tell me anything that I can use.
Its the best I could dig into by myself.
 
Last edited:

Ian Rogers

Joined Dec 12, 2012
1,136
It cannot be a hex file... It has to be a binary file..
Download a HEX2BIN convertor and it will work..

Or post your hex and I'll do it for you.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,657
My goal is to understand how to write this kind of coded file, or in the very best case write it like a human in a specialized program and convert it , load it into proteus and not getting any errors or bugs (wrong or random IO pins of the RAM getting High).
 

Ian Rogers

Joined Dec 12, 2012
1,136
Open the zip and put in the same directory and enter the ram properties and enter code.bin

Making a bin file is piddle... I use my programmer.. Then the option to save as bin.

I have many hex editors to hand as I use them extensively...

I even wrote my own so I could shift data around in the file..
 

Attachments

Thread Starter

q12x

Joined Sep 25, 2015
1,657
I inserted your file successfully into both proteus saves, that guy with the binary counter and my save.
The code is not doing anything visible. Probably I have too many ways of manually switching to High in the input address of the RAM to actually see something on its outputs.
The good thing it is loading in Proteus without any errors so far. I cant say if there are bugs or not since nothing to display yet.
I am curious how TO MAKE such a file? What programs to use?
So it is not good to actually edit the file in my notepad, save it and re-run the proteus simulation, right? It will never work. Daeeem.
27C64 is my testing RAM that I could find simulatable in Proteus.
1661627752734.png
 

Thread Starter

q12x

Joined Sep 25, 2015
1,657
For me binary is way more intuitive than hex. I can see the actual pin location of the chip when writing in binary, That's why. Its my prefered way when I program for PICs. I never coded complex data, only pin IO's, and binary is stupid simple, at least for me, at least in this case.
 

dl324

Joined Mar 30, 2015
16,845
For me binary is way more intuitive than hex.
The format appears to be the hex format used by EPROM programmers, so there's an address and checksum on each line.

Here's the lower ROM file converted to binary. I converted it with my EPROM programmer software.
 

Attachments

Thread Starter

q12x

Joined Sep 25, 2015
1,657
It is working mister @dl324
What did you do and with what, give me everything.
Thank you !
I tested it with this manual circuit: And all the IO pins lit correspondingly to the 5 Input Addresses.
1661645529606.png
 
Last edited:

dl324

Joined Mar 30, 2015
16,845
What did you do and with what, give me everything.
I recognized it as a hex format used for programming EPROMs, so I read it into the program I use for my Willem EPROM programmers and wrote it back out in binary. I did a dump on Linux to verify that the data looked okay:
Code:
52 Downloads> od -t x1z -v lowerRom16K.bin | head
0000000 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15  >................<
0000020 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31  >.... !"#$%&'()01<
0000040 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47  >23456789@ABCDEFG<
0000060 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63  >HIPQRSTUVWXY`abc<
0000100 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79  >defghipqrstuvwxy<
0000120 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95  >................<
0000140 96 97 98 99 00 01 02 03 04 05 06 07 08 09 10 11  >................<
0000160 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27  >........ !"#$%&'<
0000200 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43  >()0123456789@ABC<
0000220 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59  >DEFGHIPQRSTUVWXY<
This is what the data looked like in the program:
willemHex.jpg
 

Thread Starter

q12x

Joined Sep 25, 2015
1,657
mr @dl324 how do I implement it on my PC? like you did there ?
I really dont understand what you did there. Or how you did it.
 

dl324

Joined Mar 30, 2015
16,845
mr @dl324 how do I implement it on my PC? like you did there ?
I really dont understand what you did there. Or how you did it.
I used the attached program. It will run on Win10, but you need to run in Win98 compatibility mode. It won't function as a programmer because it needs a parallel port and even if you have one, it won't be able to use it. Put all of the files in the same directory.

When you open the program, select a device large enough for the hex file you want to load. Then do ctrl-L (or use the File menu and select Load). Then do ctrl-S (or File->Save) and save as .bin.

Couldn't load or paste an image with Edge, but Chrome would let me paste (but not load).
1661652165332.png

To view the data, select the "Buffer" tab near the bottom of the window. You can click on the Device menu to change devices (or the button labeled 27C16). If you want to do things like swap bytes or invert data, use the Action menu.
 

Attachments

Last edited:

Thread Starter

q12x

Joined Sep 25, 2015
1,657
Excellent, thank you very much mister @dl324 / Dennis !
For the program itself and for the very good instructions !
I really loved these devices back in the 90's - 2000's.
Very simple and direct, to program or communicate with them.
I will update you when I will manage to write a file with it.
 
Top