|
Post by Tom Maneiro on Jul 1, 2005 16:40:05 GMT -5
Well, since this is the place to talk about electronic things, i need some help with my Digital Circuits class homework. This time, i must design a 2-digit BCD calculator, that sums and substracts two numbers using 7483 complete binary adders, and some 7448 BCD-to-7 segment decoders to view the numbers in some 7-segment LED displays. For now, my circuit does the adding operations OK, but the substraction is not OK... it does weird things! I'm using a XOR "bridge" to select between add and substract operations (using a key), to do it in complement-to-2 system. The schematic is here (in CircuitMaker 2000 format): mipagina.cantv.net/tomman/temp/circuitos/sumador_restador_BCD.cktI need some help, since the next week, that thing should be mounted in a protoboard, and working! (this beast will eat wires like Einstein's crazy hair!, so mounting will not be easy ).
|
|
|
Post by Tom Maneiro on Jul 8, 2005 20:35:30 GMT -5
No help? Should i burn my expensive Tocci/Widmer book?
|
|
|
Post by haroldoop on Jul 9, 2005 6:08:50 GMT -5
Well, last time I designed an electronic circuit was 7 years ago, but I'll take a look at it.
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Jul 9, 2005 12:33:39 GMT -5
there's nothing to subtraction, just take a 2's complement. use xor gates to invert one of the lines, and carry from the lowest bit. i think you missed the carry bit on bit 0, i have no way to open your schematic, so export it as a gif or somthing =P
|
|
|
Post by Tom Maneiro on Jul 9, 2005 17:42:02 GMT -5
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Jul 10, 2005 23:07:24 GMT -5
okay, i see, a bcd adder can't you use a 74ls583 instead? circtui maker might not have this part in its database, but it sure does make the circuit so much smaller (would use 2 ic's for the arithmetic instead of like 6).
something may be wrong with pulling the carry bit on the upper nibble high when doing a subtraction operation. i dunno, i just glanced at the schematic. there should be no need to use comparators, the and-or gate is enough
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Jul 11, 2005 2:47:26 GMT -5
took the time to look at the schematic more closely this time =P, here are things i saw:
- using an addition operation will not be 100% correct. try adding two numbers that sum up to 20, and you won't get a 20 =D. this is because the ic combination (U8C, U8D, U9C, U9D) will only generate a carry for one bit. to add two numbers to get you 20, you'll need more than one bit for a carry. fix it by adding another and-or gate with another adder at the end of the sum of U6. a carry will add 1 more number to the second digit - using three gates to check if a number is greater than 9 (like in U8C, U8D, U9C) is unecessary =) because it can be done with only two gates. like this equation: RESULT=(BIT2 OR BIT1) AND BIT3 - don't bother using another ic to just add a carry (U7) while you have another ic that can get the job done (U5). feed the "carry out" from U6 to "carry in" on U5. if you need to add another bit because of problem #1 i've just mentioned, just use input B1 of U7 to add 1 more number
you probably can't understand what i've suggested without a schematic or something =P, but this is homework, so figure it out =D. you don't need to follow my suggestions exactly if you want to learn, just combine it with your knowledge of digital logic to solve the problem
|
|
|
Post by Tom Maneiro on Jul 13, 2005 10:25:30 GMT -5
OK, i will try...
EDIT: Adder fixed, it works OK!
I had to redesign a bit the circuit, but at least i fixed the carry thing, i took the exit of the and-or BCD fault detector, and feed to the MSB adder.
Now the issue is... substraction!
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Jul 22, 2005 19:07:40 GMT -5
dunno if that fixes you addition 100%
once addition is fixed, subtraction isn't difficult at all, you already have the xor gates there and everything ready to go. subtraction is only the complement of one register, added by 1
btw, wasn't the homework deadline like a week ago? =)
|
|