Circuit in Proteus with 4 errors

Thread Starter

q12x

Joined Sep 25, 2015
1,690
I really don't use Proteus much, but I tried to build an 8bit processor in this simulator. Why starting small, right? Haha.
I read the book [Digital Computer Electronics by Malvino] until SAP2 (p179) - also I include it in the download link.
The explanations in the book are Awesome, I really like them !!! but it gets very complicated, very quickly. I have a partial knowledge of the things he is saying in the book, but not everything.
I learned Proteus (better), it's interface and it's tools with this occasion.
I managed to make SAP1 (Simple As Possible 1) Computer in Proteus; but I got 4 errors I can not find the problem and the computer does not compute anything. I don't know where to look to be sincere.
I managed to successfully simulate a working [Memory basic ROM] and a [Memory Small TTL 74189] in Proteus. (No errors in these2) They are also included in the save directory inside the link. Just to see that I managed to make something work !

- Please check my saved files from provided link and see if you can repair my 4 errors I got in [8bitCalculator] save file.
I bet is a rookie mistake but I don't see it at all. Thank you in advance. Try it out and don't be afraid of the apparent complexity of the wiring. It's intimidating, I know. I am also pretty sure I build and linked everything correctly, you are welcome to check that out as well... please confirm to me if you do so, but really my 4 errors are the most concerning matter. I want this thing working.
My hope is to find somebody here on the forums who is more comfortable using Proteus than me and can give me an easy fix. I am definitely not that comfortable, but I am starting to get. I believe the 4 errors are connected.

This was way out of my comfort zone and I took my time with it, enjoying my breaks because I had some very tough days with this project. It was hard and intense for me. But I did something!
yaay, even if is broken...
I attached all the important files in this external link from my google drive account.
Full package(book+circuits+save files): https://drive.google.com/file/d/1Is9rTb8Lzl0tTTU_9srhOD0vbfhBiXo8/view?usp=sharing
Thank you very much ! I believe in you ! (whoever you are). Haha.
 

dl324

Joined Mar 30, 2015
16,916
Please check my saved files from provided link and see if you can repair my 4 errors I got in [8bitCalculator] save file.
I don't think many members will be using Proteus because it isn't free.

Digital Works is a free logic simulator that I've been using. It has some limitations, but I've found good enough. I've also used Cedar Logic and Logisim.
Free Software (mecanique.co.uk)
 

Thread Starter

q12x

Joined Sep 25, 2015
1,690
Thank you mister @dl324 ! I peek in this book very summarily through each page until the end of it before starting to actually read anything in the beginning, but now im actually reading it and im on page 179. What exited me about it, is the fact the author is promising to program in assembly this processor after building it. He is actually referring to build this for real, with real TTL IC's. I dont have them but I have this simulator (also not free, but shht) and I know for sure I can feed him hex files to PICs simulations. I know because I did a few PIC simulations and the respective codes in it, in the past. I also got a suggestion to read this book and you know I listen to interesting people.
So... this is my real goal with using this particular simulator.
Now... If the other free simulators you mentioned, are capable of loading and "program" the device im building, then Ill give it a try in them as well, though it was very hard for me to assemble this circuit here. It took me a couple of days with breaks. Boy it was overwhelming in some moments. Im so glad I finish it, you have no idea.
In the end, I will have to remake the entire circuit, or at least the part that is giving me the errors and hopefully I will debug it myself, but that is a bit tedious and hard for me as a rookie with this software. At least is a plan. Haha.
Until then, try to confirm to me if you can feed code into those free simulators and if actually they run both the code and the circuit in the same time. You seem to know them better than me.
 

dl324

Joined Mar 30, 2015
16,916
try to confirm to me if you can feed code into those free simulators and if actually they run both the code and the circuit in the same time.
Digital Works doesn't have the capability to load code, but you can program the code in ROM devices. It'll be tedious to enter. I think I started decoding the format Digital Works uses, but I lost interest.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,690
I know about ROM "programming" or better say, soldering. I made one for the curiosity of it in one of my working examples I provided for Proteus. Im more interested in asm code injecting. That's the real piece of the game. But thanks anyway. I am always get interesting information from you guys, it's what im counting on.
After SAP1 (Simple As Possible 1) 8bit Computer, follows SAP2 and SAP3 circuits, where they introduce new sets of instructions, more close to assembly and then the assembly language itself.
For now, it is pure circuit construction. Fun for some. Haha. This one was a bit over my ears. As hard as it is, I still dream to have build it in reality with those IC's he is specifying. Mmm... A dream for another time.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,690
Update:
I tried your free logic circuit programs, but this circuit I have here is simply too complicated for them. I will stick with Proteus.
I tried to debug the 8BitComputer circuit in Proteus, and I managed to clean the errors. What I did: I inserted on the red "error" wire for most susceptible IC's, 4 jumpers, for each "error" wire. And I did it for only 3 IC's that I suspected them the most. Now, with those jumpers activated, it's like it was before, teoretically, a simple wire, but now I dont get any errors of any kind. The circuit still behaves as before. 4 leds ON, 4 leds OFF in the 8 Wire/Word Bus.
When simulation is running, the 555 Clock circuit is doing it's thing, pulsating the Clock output. And every IC is receiving fine this signal on it's clock input. I put a couple of logic probes and they show me the activity of this Clock. So it was relatively easy to debug to this point. I believe it is more complicated than this. I believe my circuit is OK. Excepting those weird errors I got before which got solved by inserting jumpers on the wires (which should not solved the problem, but it did). Haha. I believe it is a couple of Manual switching and a specific order of switching some elements there, also the ram programming as well. So its a bit more complicated problem. I believe there are some special way of making certain IC run correctly ! And not as simply as it is described in the book.
---
The bottom line is: I push it as far as I could. I failed, but I learned some interesting stuff along the way, even if I failed the main goal.
 

dl324

Joined Mar 30, 2015
16,916
I tried your free logic circuit programs, but this circuit I have here is simply too complicated for them.
Can you post schematics for SAP1? When I find myself with nothing better to do, I'd like to try it to see if Digital Works can handle it.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,690
Can you post schematics for SAP1? When I find myself with nothing better to do, I'd like to try it to see if Digital Works can handle it.
Sorry for the late response mister dl324 (the website didnt announce me) and thank you for being curious about this issue. Its a hard thing!!! I manage to get rid of the (evident) 4 errors but... I imagine the error is from something much more deep, and more manually to set some parameters like setting the ram bits, some other logic circuits like some switches in there or something. I abandoned the project because I find an emulator for a 6502 processor and I can test the code in it to learn the bastard.
Look Up ^ in this very page, and find this line with this link in it:
1633966366052.png
Download it and you have everything in it.
It will still be nice to make it work !
I encountered a special problem in building it, and I resolve it relatively easy, getting lucky on youtube. In the book original circuit, he does not show these details - he presume you should know such details if you are born engineer, like he was. I surely dont know everything. This image will say 1000 words:

My very first error I got in building this thing, was the NOT gate. NOT gate is the triangle symbol, pointing down. As we can happily observe, he does not put any pull down resistor in parallel with the NOT gate, in it's original circuit in the left. And no gnd either.
Proteus didnt even want to look at me straight, throwing at me with ridiculous errors, when I build it exactly as his diagram. After I did my homework on youtube, everything worked very FINE in Proteus. As you can see in the right, that pull down to gnd resistor, is making the NOT gate to work properly and without any weird errors.
The folowing errors that I got from the ENTIRE blody 8bit computer circuit, I BET MY dic it is from such particularities. This is the "deep" problem i was referring. There are a bunch of IC's there, and for sure some have some particularities to work normally (both in reality and in proteus), that I am simply too low level electronist to know about them. It is a challenge to find those particularities, for sure. But dont take my absolute word for anything, because this is just my best guess of what it may be. It may be NOT ! Haha.Get it? NOT?
 
Last edited:

dl324

Joined Mar 30, 2015
16,916
I'm surprised that URL worked the first time I typed it...
My very first error I got in building this thing, was the NOT gate. NOT gate is the triangle symbol, pointing down. As we can happily observe, he does not put any pull down resistor in parallel with the NOT gate, in it's original circuit in the left. And no gnd either.
How far did you get with implementing the ROM?

He didn't show any resistors or ground because it's assumed that the address lines (A0-A2) will be connected to other signals that will always have a valid state.

Digital Works doesn't have resistors or diodes, so that ROM circuit can't be simulated. You'd use a ROM device and just program it appropriately.
 

dl324

Joined Mar 30, 2015
16,916
This is how I implemented the ROM:
1633971389295.png
This is the smallest ROM I could make, so I tied the high address (A3) to ground. CD4510 is a presettable synchronous decade up/down counter. LEDs in this simulator don't require current limiting resistors, and they don't load outputs.

ROM programming:
1633971587590.png
 

Thread Starter

q12x

Joined Sep 25, 2015
1,690
Hello mister dl324
How far did you get with implementing the ROM?
Completely ! And it is working. I included my working Test NOT gate as well in the same circuit.
Please Zoom inside the image to be able to read the tiny text and observe details. The images are @ very good quality but because tiny text, and very small width lines in it, it looks weird. Zooming into image is the key to read it properly.
I put the 3 projects image files into a single package .zip file here in this post as an attachment to be downloaded.
Have Fun. :cool:
 

Attachments

dl324

Joined Mar 30, 2015
16,916
Was your hesitance to use Digital Works related to it not having the components you needed? Most of the commercial parts that come with DW are pretty useless.

Here's my work-in-progress layout for the ACCUMULATOR (with the provided 74LS83 component placed for reference):
1634081749648.png

I created my own LS83 and LS173 parts and I've started putting pin numbers on the symbols I create. I have to place switches and LEDs because DW won't allow dangling wires.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,690
I have to place switches and LEDs because DW(DigitalWorks) won't allow dangling wires.
It's a very good point with dangling wires, and I didn't thought about. Proteus is not complaining about dangling wires, but it may have a quiet error because of them.
I did terminate the W Bus with jumpers and resistors and red leds and a ground for the leds. But I did that only to output something and to test the circuit I was constructing.
1634109163184.png

Now that you mentioned about dangling wires, I jumped and repaired the other end of the W bus who was dangling in the breeze.
Here is the repair i made for it:
1634109338251.png
but nothing changed. The circuit behaves as before.

My repair of the 4 errors, and nobody asked me, was to actually add jumpers on the error wire, close to the IC that I suspect to be the bastard. To find the problem IC or the problem source pins, I actually interrupted the wires manually. Then next to its trouble pins, I inserted the jumpers inline with the wires, in the hope of switching the error. But the program shut off the error message completly, after inserting those jumpers on those trouble wires, and the error still persist because I can see it in the last 4 leds on the W bus, they are staying OFF. You can see it as well in the first picture.
This is the most suspicious IC 74LS126 for those 4 errors:
1634109787197.png
I marked with red boxes the jumpers, and the entire IC comprised of 4 little triangle gates.
From its datasheet: "This device contains four independent gates each of which performs a non-inverting buffer function. The outputs have the 3-STATE feature " Link .pdf here.
It is my first time working with this IC, also first time working with TTLs, and first (serious) time working with logic gates. My 3 states of 'first time'. It is my belief that this IC needs some additional components or wiring like the NOT gate problem circuit I had before.
I am writing this observation of the error I got, more for the people who can test this circuit in Proteus, using my save files. But also if you actually used such IC in reality and you know the tricks to make it work. If it is any trick. I really dont know.
 
Last edited:

Thread Starter

q12x

Joined Sep 25, 2015
1,690
ROM programming:
1634111679844.png
I wasn't able to program the Memory in Digital Works. For some weird reason, your memory here is shown yellow and happy to accept input and modifications. But my memory is gray out and it will not accept any input.
I will try to make your circuit and see if that counter will modify the memory. I wished I could modify it manually.
You specified: " CD4510 is a presettable synchronous decade up/down counter " and I actualy guided after your name and I find in Parts Centre this "Presettable synchronous 4 Bit Binary Counter; Synchronous Reset" but it is completely other chip than yours. It is a 74HC163.
Update: I learned how to make a macro in Digital Works, using its Help tutorial.
But your CD4510 is not listed in it's Parts Centre. I looked in the pdf of this cd4510 and is quite complicated to build a macro of it. It is for me as a beginner. I made a google search for this part for Digital Works, but nothing come out. Hmm... I dont know how you do it. Did you model that CD4510 counter yourself? That is impressive !
 
Last edited:

dl324

Joined Mar 30, 2015
16,916
I wasn't able to program the Memory in Digital Works. For some weird reason, your memory here is shown yellow and happy to accept input and modifications. But my memory is gray out and it will not accept any input.
I'm not certain why you can't modify memory contents. It's a little funky. You need to select the data for an address and delete it (you can't just enter a new value). Once you've entered data, you need to enter a carriage return for the data to be saved. If you don't, that address will revert to the previous data. I can't count the number of times I've had to re-enter data.
You specified: " CD4510 is a presettable synchronous decade up/down counter " and I actualy guided after your name and I find in Parts Centre this "Presettable synchronous 4 Bit Binary Counter; Synchronous Reset" but it is completely other chip than yours. It is a 74HC163.
You could use 74HC163 instead, but the provided IC's are difficult to use because they don't have pin function or pin numbers labeled, so you need to have the datasheet handy (DW has them), and keep counting the pins.

And when you look at the schematic, you need to have the datasheet for reference, count pins, and keep functionality in your head. That's why no pro would use IC pinouts for drawing schematics. It's very rare that the pins would be arranged in a manner that made sense. Just consider the order of the pins on 74189. Data and outputs are interleaved. When Malvino drew that symbol, he put the data lines on one edge (top in this case), data on the left, and outputs on the bottom.

The flow in a schematic should be primarily left to right and top to bottom. I don't like the the way he implemented the two counters. He flipped a flip flop in one of them, but the flow in both was right to left. I made them flow left to right in my schematic.
I looked in the pdf of this cd4510 and is quite complicated to build a macro of it. It is for me as a beginner. I made a google search for this part for Digital Works, but nothing come out. Hmm... I dont know how you do it. Did you model that CD4510 counter yourself?
I used the schematic provided by some manufacturer and entered it. I use pretty much the same component placement as the datasheet to facilitate debugging. Here's my CD4510:
1634138420784.png
I just noticed that if I flipped the top NAND gate on the far right, I could eliminate 2 wire crossings and the Up/Dwn label on one of the wires doesn't seem right. I've tested the part and it's working. That's something you'll have to do for every component you create.

I also made the special flip flop they used. Sometimes they give a schematic diagram, sometimes I have to create something on my own to implement the desired functionality. They didn't in this case. Here's what I inferred from the logic diagram:
1634142507197.png
Here's the Motorola logic diagram:
1634141688974.png
I DeMorgan-ized some of the gates. You lose some circuit intent when you do that, but it saved me from having to create those components. It's awful to try to use arcs in the template editor.

I cut some slack for the draftsman who drew this schematic for the unnecessary wire crossings on the two right most gates. Back in those days they drew them by hand using ink, straight edges, and templates. But, she/he could have redrawn the logic on the right on a new sheet and cut and pasted for the final artwork. That was done all the time for printed publications (I was a typesetter for my high school paper and yearbook for 2 years).

I didn't like RCA's schematic:
1634142689622.png

I only recently started putting pin numbers on the symbols (and that editor is a pain in the a** to use). The window is small and can't be resized. One of the limitations of DW is that you can't zoom in our out. Moving wires is also clunky. I just deal with the limitations because the simulator is free and it's easy to make your own components.

I'm still working on how to implement a 74189. That part inverts the data when it's read. This is what I have so far:
1634139029830.png
I could replace the NAND-INVERT with AND, but I had the NAND gates already connected before I read the part about complementing the output. I could also replace the 4 inverts on the inputs of the OR gates with a single inverter driving the 4 OR gates; but this is my initial attempt.

This is what National Semiconductor gave:
1634139077696.png
Their sense outputs must be tri-state:
1634139157964.png

IC designers also consider gate delays, so sometimes they'll insert buffers to slow something down to match another path. I don't think DW is that sophisticated, so I don't worry about matching delays. There are also times when they'll invert the inverted output from a flip flop. They do that so they can use a big inverter to be able to drive the external load. They'll also sometimes invert inputs once or twice. That's to reduce loading on the driving circuit. If you saw a die photo of a decapped CD4049, an inverting buffer, you'd see that they use 3 inverters. A small on the input to reduce driver loading, then a bigger one driving an even larger output inverter.
 
Last edited:

dl324

Joined Mar 30, 2015
16,916
It is my first time working with this IC, also first time working with TTLs, and first (serious) time working with logic gates. My 3 states of 'first time'. It is my belief that this IC needs some additional components or wiring like the NOT gate problem circuit I had before.
The connections shown in the book are correct. The tri-state buffers are in a high impedance state when the enable line is LOW, so the output is only active when enable is HIGH. You shouldn't need those jumpers. They use tri-state outputs to avoid bus contention.
 

dl324

Joined Mar 30, 2015
16,916
But my memory is gray out and it will not accept any input.
I will try to make your circuit and see if that counter will modify the memory. I wished I could modify it manually.
The memory I used was a ROM. It can't be modified by the circuit. You can do that using a RAM component:
1634148341190.png
Digital Works always requires a clock element. I used the switches to set address and enable the RAM.

When you program, make sure you have the R/W# pin HIGH or the program will write to the RAM.


EDIT:
I just noticed something strange about DW that's probably a bug. When I programmed address 0x0, the program clears that address when the clock is started.

If I pause the clock, modify address 0x0, and them resume the clock, it doesn't reset the contents of 0x0.
 
Last edited:

dl324

Joined Mar 30, 2015
16,916
I noticed that Malvino has some errors or omissions.

In the following, and in other places, he has floating inputs:
1634174722561.png

I also didn't see anything in the text where he said that you had to invert the data you wrote into the RAM because 74189 inverts the stored data when it's read.

EDIT: Malvino was assuming that you had read the earlier chapters. This is what the above should have looked like; don't know why he thought leaving out the pull up resistors was a good idea:
1634177421056.png
He also has you write the data inverted so it's correct when it is read from the RAM:
1634177491523.png
 
Last edited:

dl324

Joined Mar 30, 2015
16,916
This is what my 74189 for Digital Works ended up being:
1634185311166.png
1634178608829.png
EDIT: Simplified the component.
 
Last edited:

Thread Starter

q12x

Joined Sep 25, 2015
1,690
I noticed that Malvino has some errors or omissions.
In the following, and in other places, he has floating inputs:
1634244368295.png
...
EDIT: Malvino was assuming that you had read the earlier chapters....don't know why he thought leaving out the pull up resistors was a good idea:
I learn something from you right now. So every input/output must have a pull resistor on it all the time? Either pull down or up,depends on the case. I actually read everything until the circuits and I was hesitant to build it. But after building the simple ROM and then the RAM, I got courage to make all of it. He is specifying this is a "Simple As Possible" SAP 8bit computer, which means, he did took out everything that is complicating the circuit. He tested probably how low components you can build with and not including pull up resistors in this example, is his mentality of SAP version for this device. I would have do it the same in his place. Later he is adding the correct pull up resistors as you observed, showing he knows what is doing. It is an educative circuit after all, remember that. It helped me going on. Very good book that I got from some assembler language friends.
If you are afraid of using Proteus because commercial rape, don't be, because it is an educative tool as well beside being an industry tool, and it is dedicated to students as well, and no one will dare to say how old or young a student should be. If they are saying only under 30 you are allowed to be a student, send them to me to spit in their mouth. So my advice for you, as old you feel about yourself, doesn't matter, take the damn program, and use it without remorse. We are not capable of making money out of it, that is for sure. They will be happy to know people are interested in their product and they should pay us on using their tools. Haha. Trust me on this, it is very user friendly program and very capable and very much inclined on logic TTL building with it, it is my impression after using it for a little while. I am used to it but I can not say I am a veteran. It is 1000 times more easy to build in it. So that's my piece of advice, use it or not, its your choice.
In the mean time I will try learning your Digital Works because it is another tool in my tool belt.
I managed to figure out why the RAM was not writable. It was a very technical bug in the DW, I selected with the mouse the entire row of numbers from address 01, and when I pressed key 1 from keyboard, nothing automatically got erased as in every editor or textbox out there. It is having it's own way of being written. You must press backspace key and then type the 1 in a free space. It also does not overriding a character. If I select a 0 and type 1, nothing happens, no overriding. And you must press Enter key after each modification. It is possible to insert numbers only ONE WAY ! Absolutely deranged. But hey... it worked after all. I was asking myself how you managed to write the data into ram, and I am the black sheep of the universe who cant use the ram data at all. And yes the 0x0000 address is not retaining the data, it is zero itself every time. It must be a reserved memory space, so I will treat it as that.
My progress with DW is very slow but I am glad that you reach such high hills with your circuit. I still insist on you starting using Proteus. I am still fighting in DW with making a macro. From this perspective, making macros and full components out of logic gates DW is very nice and kind of easy to learn and to use. I dont know if Proteus is capable of doing this. I never look for it. It will be very cool to be able to do it, oh boy.
 
Top