You are on page 1of 5

14/07/2013

[dsPIC33F]Lm quen MpLAB IDE (P3) | (%

(%

[dsPIC33F]Lm quen MpLAB IDE (P3)


Posted by vtd on February 24, 2012 Debug dng MpLAB Sim Simulator - t tc clock b x l cho Simulator, chn Debugger -> Settings, chnh 20 MHz.

(http://vutuda.files.wordpress.com/2012/02/settings2.jpg) .:. Tc chy ca Simulator ph thuc vo PC, do n ko chy tc thc ca dsPIC30F DSC thit lp trn. Tuy nhin, mi tnh ton thi gian u da theo gi tr clock ny. .:. Mt cch o thi gian trong Simulator l dng Stopwatch. Chn Debugger -> Stopwatch.

(http://vutuda.files.wordpress.com/2012/02/stopwatch.jpg)
vutuda.wordpress.com/2012/02/24/dspiclam-quen-mplab-ide-p3/ 1/5

14/07/2013

[dsPIC33F]Lm quen MpLAB IDE (P3) | (%

.:. Stopwatch lun c xa khi Reset Simulator. - t breakpoint ti main_counter++, n Run chy m phng.

(http://vutuda.files.wordpress.com/2012/02/test.jpg) .:. y, vic thit lp cc thng s mt 21.6 us. .:. Nu n Zero -> ct bn phi l tng thi gian, ct bn tri l thi gian cn thc hin 1 vng lp tr v ng breakpoint hin ti. - Thit lp xem s thay i gi tr cc bin.

(http://vutuda.files.wordpress.com/2012/02/watch.jpg) .:. Bin local khng hin a ch. .:. hin th gi tr thp phn thay v hexa -> right-click vo bin cn hin th trong ca s Watch -> chn Properties.

vutuda.wordpress.com/2012/02/24/dspiclam-quen-mplab-ide-p3/

2/5

14/07/2013

[dsPIC33F]Lm quen MpLAB IDE (P3) | (%

(http://vutuda.files.wordpress.com/2012/02/dec.jpg) - Gi remove breakpoint c, t breakpoint mi ti irq_counter++ trong ISR kim tr cc thng s & thi gian xy ra ngt timer. Chn Run chy m phng.

(http://vutuda.files.wordpress.com/2012/02/check.jpg) .:. C ngt sau ~ 1 ms. - Nu t breakpoint ti sticks = 0, sau Run, khi sticks tng n 1000 & iu kin (sticks == 1000) tha mn -> c 1000 ln ngt xy ra -> Thi gian tri qua 1000*1 ms = 1 s.
vutuda.wordpress.com/2012/02/24/dspiclam-quen-mplab-ide-p3/ 3/5

14/07/2013

[dsPIC33F]Lm quen MpLAB IDE (P3) | (%

(http://vutuda.files.wordpress.com/2012/02/check2.jpg) .:. Khi ci MpLAB X v1.5 trn win7 x64 c th gp trng hp Cannot find include file nhng vn build bnh thng (tuy nhin khng c hint khi truy xut cc thanh ghi). Cch khc phc nh sau:

vutuda.wordpress.com/2012/02/24/dspiclam-quen-mplab-ide-p3/

4/5

14/07/2013

[dsPIC33F]Lm quen MpLAB IDE (P3) | (%

(http://vutuda.files.wordpress.com/2012/02/mplabx.jpg) This entry was posted in MpLAB IDE. Bookmark the About permalink. these ads (http://en.wordpress.com/aboutthese-ads/) Blog at WordPress.com. | The Piano Black Theme.

vutuda.wordpress.com/2012/02/24/dspiclam-quen-mplab-ide-p3/

5/5

You might also like