Tuesday, April 17, 2007

    Using MPLAB SIM's realtime watch with DMCI in MPLAB IDE 7.52

    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));

    t += INTERVAL;
    }
    return 0;
    }

    3 comments:

    DiamondDevil said...

    Download the WMV file here.

    Eman said...

    hi thanks for the job.. is it possible to make a similar video and explain how to provide an input to the simulator say to porta? it would surely be very useful
    thanks

    DiamondDevil said...

    Hi Eman, You might be interested in this video. http://www.youtube.com/watch?v=pnkUOL0mmyA
    This is an introduction to the simulator and I believe it covers some basic stimulus.