The mcsim is a web application written using Blazor that simulates the behavior of microcontrollers for educational and research purposes. It also allows for generation of state machine and timing diagrams. It is currently a work in progress and thus buggy.
- Simulation of various microcontroller architectures, including AVR and ARM.
- Support for embedded C programming.
- Debugging features such as breakpoints, watchpoints, and step-by-step execution.
- Customizable input/output peripherals, including LEDs, switches, speakers, 7 segment display, and serial communication.
- Graphical user interface for easy simulation setup and control.
- Generation of timing diagrams to visualize inputs and outputs.
- Generation of state machine diagrams
- Converting state machine diagrams to C code.
The simulator requires the following software to be installed on your system:
- .NET 7.0
- Microsoft Visual Studio or a similar IDE for C# development
To build and run the simulator, follow these steps:
- Clone the repository to your local machine.
- Open the solution file in Visual Studio or another IDE that supports .NET development.
- Build the project using the IDE's build tools.
- Run the simulator using the IDE's debugging tools.
To use the simulator, follow these steps:
- Launch the simulator by running
dotnet run
. - Load the microcontroller code and simulation configuration.
- Configure the input/output peripherals as needed.
- Start the simulation using the Run menu.
- Use the debugging features to step through the code and observe the behavior of the microcontroller.
We welcome contributions from the community. Before submitting a pull request, please make sure to run the tests and ensure that your changes do not introduce any regressions.
The mcsim is released under the MIT License. See the LICENSE file for details.