Continue to Site

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.

Good PIC Simulator?

Status
Not open for further replies.

vsmGuy

New Member
I have a program in which I have two ISRs servicing a timer each, set to interrupt.

These ISRs handle signalling that is time sensetive and hence I need to be able to know how many clock cycles my code (the ISRs) takes to execute.

Once I know that, I believe there will be only one thing that can affect the time - the interrupt latency.

This, I believe, would bring about a jitter of, at most, 1 instuction cycle? (GOTO vs a GOSUB?)

The problem with counting clock cycles in my code (the ISRs) is that I am writing the whole application in C.

There is no reason to worry about C though - the CCS compiler produces a nice .LST file that shows me a nice 1:1 correspondence between the C code I wrote and the ASM it generated.

I treat the ASM output as a human/user friendly output for hexcode and thus in effect its good as me coding the whole application in ASM?

My question is how to best time the clock cycles:

1. Use the MPLAB Simulator?
2. Use the Oshonsoft PIC Simulator?

The MPLAB Simulator is free, but the Oshonsoft PIC Simulator seems to be lightweight and small.

I have never used the Oshonsoft PIC Simulator myself, but a freind showed me how it inherently displays the clock cycles and time spent on execution in its window.

He did some sample code in a variant of Basic for that simulator and is not sure if I can just load a hex file into it and get the same results.

I also saw the Oshonsoft PIC Simulator having rave reviews on many sites on how good a simulator it is, etc

2. Is the Oshonsoft PIC Simulator really that better than the MPLAB Simulator?

3. What kind of "extra" functionality makes it better?

4. Is it some kind of "more user friendliness" than any kind of "extra" functionality that makes it better?
 
I wouldnt say its better.

If you are wanting to check something like interrupts from a external source then use MPLAB Debugger.

Oshonsoft is great for visual confirmation of things like LEDs, 7 Seg and other stuff. I would recommend debugger for what you want to do aka mplab debugger.

You can get all the info like register and such from both but MPLAB is already there, no need to learn a new program and pay $ for it. (notice 1 $ its not too much).

so to anwer:
2. MPLAB is from microchip so its the best i assume....
3. Oshonsoft has plugins like leds, buttons, 7 seg and many more which can give you a nice feel for it
4. its about the same since there are so many options in both :D
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top