|
------------- Description -------------
This is a very basic calculator prototype, that Sums and Subtracts 4bit numbers, giving answers up to 8bit numbers.
New on v2: it can now multiply the number stored in R0 by 2.
The FIRST (less significant) and the SECOND (most significant) displays represent R0, and the THIRD display represents R1, both in HEXADECIMAL.
This project DOES NOT give negative answers (due to lack of space). Instead, the result will never be lower than zero. And when it reaches its maximum value (255), the next sum will result in reseting R0, and then adding the remaining value to zero.
The four logic sources found in the bottom-left side are DATA. Take note that the least significant digit is the higher one, and the most significant digit is the lower one.
The four logic sources found centered on the left side are CONTROL. Wait until the signal shown on the scope goes to 0V to give another COMMAND, or it may result in operation bugs.
Press the BUTTON found below the CONTROL pins to give a COMMAND.
--------------- Variables --------------
DATA -> 4 bit input
R0 -> 8 bit buffer
R1 -> 4 bit buffer
-------------- Commands -------------
0000: Pass
10XX: R0=[DATA]
11XX: R1=[DATA]
0100: R0=R0+R1
0101: R0=R0-R1
011X: R0=R0*2
X = Undefined; by default, assume X=0
---------------- Usage ----------------
To see an example, write the number 9 to R0 (R0=[1001]), then the number 3 to R1 (R1=[0011]), and sum both to R0 (R0=R0+R1).
Put 1001 on DATA, put 10XX on CONTROL, and give the COMMAND to write the number 9 on R0.
Put 0011 on DATA, put 11XX on CONTROL, and give the COMMAND to write the number 3 on R1.
Next, put 0100 on CONTROL, then give the COMMAND to sum R0 with R1 and store the answer in R0.
The display should show the letter C, that represents 12 in hexadecimal.
------------ Especifications ----------
Clock -> 50MHz (this varies when the
time scale changes due to bug)
Work -> up to 15RE CLK
|