An example of how to proceed with the design Flux diagrams Main program flux diagram Sinusoidal routine Verifying the code for the sinusoidal waveform In the MPLAB environment, using a single breakpoint and the debugging Stopwatch tool, it is possible to get the exact waveform period, a complete cycle of 62 values: Freq = 1/ 1.154 ms = 866.5 Hz In this scope screen is possible to measure approximately the waveform frequency: Freq = 1/ (200 µs/Div)·5,8 Div = 862 Hz. So, the real power of the virtual laboratory has been demonstrated (indeed, this application is very processor demanding and it stuck at 100% and the oscilloscope is not correctly updated). You may want to assay several frequencies adjusting the DELAY_VALUE constant. You can debug your application from both tools, the Proteus-VSM and the MPLAB, using: breakpoints, step by step execution, watching variables and registers, and so on. The target PIC16F84A can be programmed using, for instance, the free IC-Prog software and the cheap TE-20 board connected at the PC Com1 port (RS232). Or instead, at the EPSC labs, you can use the professional PICSTART Plus programmer accessed from the MPLAB itself See also the assembler code to explore how the EEPROM have been uploaded with the data from the Excel spreadsheet.
© Copyright 2026 Paperzz