Texts: I don't want the code, just the justification please.
An electronic card designed by a manufacturer of numerical control machines uses the 74LS181. However, lately, getting the original component or a replacement has resulted in very long delivery times and/or a high cost. You want to replace its functionality by using a C that preferably has the highest pin-to-pin compatibility.
The 74LS181 is capable of performing 32 operations (16 logical and 16 arithmetic) as well as providing output pins for advanced carrying management. After reviewing the schematic of the card, it has been observed that pins 15 and 17 of the C.I. are not used, and that pin 7 is connected to VCC.
Select and program using assembly language, a C (PIC16F690 or PIC16F877) that complies with the third column of the function table of the 74LS181 specification sheet. Justify the selection. Assemble a circuit in Proteus to check its operation.
Function Table:
Mode Select Inputs
Active LOW Operands & F Outputs Logic Arithmetic (Note 2)
so (M=H (M=LCn=L L A A minus 1 H AB AB minus 1 L A+B AB minus 1 H Logic 1 minus 1 L g+ A plus A+B H B AB plus (A+B) L AB A minus B minus 1 H A+B A+B L AB A plus A+B H AB A plus B 1 B AB plus (A+ B) H. A+B A+B L Logic 0 A plus A (Note 1 H AB AB plus A L AB AB minus A H A A
Active HIGH Operands & Fn Outputs Logic Arithmetic (Note 2)
(M=H (M=L(Cn=H A A A+B A+B A+B Logic 0 AB A plus AB B A+B plus AB AOB A minus B minus 1 AB AB minus 1 A+B A plus AB AB A plus B B A+B plus AB AB AB.minus.1 Logic 1 A plus A(Note 1) A+B A+B plus A A+B A+B plus A A A minus 1
S3 L L
S2 L
S1 L L H H L L H H L L H H L L H H
L L H H H H L L L
L L L L L H H H H H H H H
H H H H
Note 2: Arithmetic operations expressed in 2's complement notation.