Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

MPLAB simulation help

Status
Not open for further replies.

yohanevindra

New Member
im using MPLAB for my PIC projects, and I also have Proteus. The problem is that the oscilloscope in proteus doesnt seem to work, which means that i cant see the wave output on pins properly...

ive never used the sim in MPLAB, so how do you do it with tht?i need to ensure i get proper delays or 20ms and 1-2ms for my servo control so i want to check that with MPLAB since i wont hav access to an oscilloscope until after the weekend..
 

Pommie

Well-Known Member
Most Helpful Member
Put a breakpoint on anywhere that you change the output pin and use the stopwatch to time the pulses.

Mike.
 

dougy83

Well-Known Member
If you want it visually, click View->Simulator Logic Analyser. You can select whichever pins you want by clicking on Channels. You can measure the timing using the cursors function.
 

yohanevindra

New Member
Put a breakpoint on anywhere that you change the output pin and use the stopwatch to time the pulses.

Mike.

But the problem is that you can put only one breakpoint..so basically stop the program at the break point and then insert it for the next half of the pulse?


If you want it visually, click View->Simulator Logic Analyser. You can select whichever pins you want by clicking on Channels. You can measure the timing using the cursors function.

so basically the Simulator Logic Analyser is a oscilloscope built into MPLAB?does it give real time displays or do you need to pause it to see the signal?
 

kchriste

New Member
Forum Supporter
You can also right click on the code before your delay and choose "run to cursor". Then zero the stop watch and right click after the delay code and choose "run to cursor". Then look at the stop watch.
 
Last edited:

dougy83

Well-Known Member
But the problem is that you can put only one breakpoint..so basically stop the program at the break point and then insert it for the next half of the pulse?
I can put in as many breakpoints as I like. Maybe breakpoints are limited for the hardware debuggers, but not for the sim.

so basically the Simulator Logic Analyser is a oscilloscope built into MPLAB?does it give real time displays or do you need to pause it to see the signal?
Kind of. You would have to pause to see the data I think. You could also do that by setting a breakpoint.
 

yohanevindra

New Member
never tried the run to cursor..must do that sometime..

and i ve never tried the breakpoints with the sim..its always been with the ICD2...

jus finishing off my code and will let you guys know if i mange to get it working
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top