16-bit ALU with ESP32 Control Unit
This project implements a 16-bit Arithmetic Logic Unit (ALU) using TTL (74 series) digital integrated circuits. The control unit is built using an ESP32 microcontroller, enhancing functionality with a user-friendly interface via an OLED display and a rotary encoder for selecting operations.
Disclaimer: This is my first PCB design, and there may be flaws.This may be the worls worst ALU!. Any feedback or suggestions for improvement are welcome.
Features
- Arithmetic Operations: Addition, Subtraction, Increment, Decrement.
- Logical Operations: AND, OR, XOR, NOT.
- User Interface: An OLED display shows the current operation, and a rotary encoder allows for easy selection of operations.
- Control Mechanism: ESP32 provides control signals and manages data flow within the ALU using shift registers.
Components Used
- TTL ICs (74 series) for logic implementation
- ESP32 microcontroller for control signals
- OLED Display (SH1106) for displaying selected operation and result
- Rotary Encoder (KY-040) for operation selection
- Shift Registers (74HC595) for handling input/output
Project Structure
main_code.ino: The primary Arduino code for the ESP32, managing the control signals, encoder input, OLED output, and ALU operations.
images/: Contains bitmaps for icons representing each operation.
README.md: Project documentation.
How It Works
- Control Unit: The ESP32 microcontroller generates control signals based on user input from the rotary encoder. The OLED screen displays the current operation, input values, and results.
- ALU Operations: The ALU performs selected operations on 16-bit data, interfaced via shift registers.
- Result Display: The result of the operation is shown on the OLED display.
Setup and Usage
- Connect the ESP32 to the OLED display and rotary encoder.
- Interface the shift registers with TTL ICs to implement the 16-bit ALU logic.
- Load the Arduino code onto the ESP32.
- Use the rotary encoder to select the desired operation and input values, then view the result on the OLED display.
Future Improvements
- Expand operations to include multiplication and division.
- Optimize the control signal generation for improved speed and accuracy.
- Add support for additional user inputs or controls to expand functionality.