
This project is to function as a tiny 16-bit calculator that can directly read keypad inputs from an external connected 4x4 keypad (for 0x0 to 0xF input) and operation keys (+ - * / = AC (neg)). The output will be decoded to be used with 5 common-cathode 7-seg display, with the support of external shift registers with serial input and shift clock (optionally with a storage register and output enable active low pin).
Connect the keypad IO pins to a physical keypad with key presses being shorts between row and col pins, and wire the operation keys as active-high buttons with pull-down resistors. Connect the output pins to a shift register which the output pins are connected to the anodes of a common-cathode 7-seg display.
Alternatively, the pins can all be connected to a microcontroller that simulates the pins' functionalities.
+, -, *, /, =, AC, (neg).| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | i_BL0 | o_WL0 | o_ADD |
| 1 | i_BL1 | o_WL1 | o_SUB |
| 2 | i_BL2 | o_WL2 | o_MUL |
| 3 | i_BL3 | o_WL3 | o_DIV |
| 4 | i_ADD | o_SER | i_EQ |
| 5 | i_SUB | o_SRCLK | i_AC |
| 6 | i_MUL | o_RCLK | i_NEG |
| 7 | i_DIV | o_OE_n | i_NEG_EN |