Simulation Introduction
Ok, my code assembles! Let’s go!
- Not so fast. Sure it assembles, but does it actually do what it’s suppose to do?
- Simulating your code - stepping through it line by line and watching register and port values - will let you catch all sorts of logical and program flow errors.
MPLAB has a free simulator called MPSIM
- Warning: Many of the peripherals are not simulated correctly.
- Coolness: You can step through your code, use watch windows, time routines, set breakpoints, etc.
See MPSIM Example on Example.asm
Previous slide | Next slide | Back to first slide | View graphic version |