I created a new video showing how to use MPLAB SIM's realtime watch feature. You can combine this simulator feature with the Data Monitor and Control Interface (DMCI). The video also shows a few features that were new to MPLAB IDE 7.52, such as the editor's open include file function and DMCI's Interactive Hot Tracking. Be sure to have the project/workspace that you created with the first video readily available.
C30 Source Code:
#include <p33fxxxx.h> #include <math.h>
#define SCALE 100.0 #define INTERVAL 0.001
volatile int result; long double __attribute__((persistent)) t; int __attribute__((persistent)) Amp; int __attribute__((persistent)) Freq;
int main (void) { t = 0; while (1) { result = ((long double)Amp) * (sinl (((long double)Freq/SCALE) * t));