Searching \ for 'my mpsim problems' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=mpsim+problems
Search entire site for: 'my mpsim problems'.

Truncated match.
PICList Thread
'my mpsim problems'
1996\03\28@084037 by Sipke de Leeuw

flavicon
face
Hello you all,

First off all: sorry when this message is sended twice to you. It won't happen
again!

I am new on the piclist group. I have some trouble with the MPSIM simulator.
A discussion is going on between me and Microchip, but they don't seem to be
able to help me. Can someone help me ??

The conversations with Microchip are below ...


Greetings:                                  ... Sipke de Leeuw ...



{Quote hidden}

_________________________________
{Quote hidden}

1996\03\29@085119 by myke predko

flavicon
face
Sipke,

I haven't seen a lot of other people reply to your request yet, but I will
add my two cents on this.

I have found that any simulator is going to give you an approximation of
what's going to happen.  I went through similar problems when I did my code
for reading a TV I/R Remote Control.  My first version, best case, only had
four instruction cycles before the next edge would come in.

This turned out to be too close and even though MPSIM indicated that there
wasn't any problems, I found a bunch.  (Which translates to mean the program
couldn't read anything coming through.)

My solution was to re-order the program so that I would have 40-50 cycles
before the next expected interrupt.  At this point, the program worked fine
and correlated to the simulator.

In the databooks that I have, interrupt latency seems to vary when the edge
is received in the instruction timing.  This may be what you're seeing here;
the simulator doesn't accurately handle at what point the interrupt happens.

I don't think this is a Microchip problem, I have seen the same thing on
other simulators I have used.  The only way you can be absolutely sure that
everything will work down to individual instructions is to use an emulator
pod (which costs mucho).  I have found the best way to ensure your interrupt
driven programs work correctly is to leave lots of "space" before and after
your expected interrupts.

The only analogy I can think of is in terms of Cp and CpK in manufacturing
processes.  Make sure that your code can handle input irregardless of
whether or not the signals come in when you expect.  Plot out when you
expect them, then give a few instructions on either side and design your
program to work right in the middle of that range.

Sorry I can't be of more help,

Myke

{Quote hidden}

Myke

"We're Starfleet officers, weird is part of the job."

Capt. Catherine Janeway

1996\03\29@092920 by Sipke de Leeuw

flavicon
face
Hello,

Thank you Myke for your information.

I am aware of the simulator 'approximations'. I have't seen a simulator for a
processor that works exacltly as the processor itself. Still I think it must
be possible to make one ...

I do have another, hopefully more interresting, question for this piclist.
Is there a difference in interrupt latency time when using the TMR0 as
interrupt generator? I personally don't think so because the TMR0 expires
always at a known time synchronised to the clock, but I'm not sure.
By the way: I'm using the PIC16C84.

Greetings to you all:                 ... Sipke ...


At 08:48 29/03/96 EST, you wrote:
{Quote hidden}

1996\03\30@163141 by myke predko

flavicon
face
Sipke Wrote...

>Hello,
...
>
>I am aware of the simulator 'approximations'. I have't seen a simulator for a
>processor that works exacltly as the processor itself. Still I think it must
>be possible to make one ...
>
Yes, I believe that it's possible to write one as well, and I was going to
comment about how much extra time it would take for the Simulator to run.
After thinking about it, it shouldn't be tough at all; the big change would
be making the simulator input based on time rather than on cycles (as mpsim
does).
>
>I do have another, hopefully more interresting, question for this piclist.
>Is there a difference in interrupt latency time when using the TMR0 as
>interrupt generator? I personally don't think so because the TMR0 expires
>always at a known time synchronised to the clock, but I'm not sure.
>By the way: I'm using the PIC16C84.
>
What I have seen (although with fairly limited experiments and monitoring
equipment) is 3 cycles after the edge of the interrupt.  I haven't seen any
differences.

Good luck,
Myke

"We're Starfleet officers, weird is part of the job."

Capt. Catherine Janeway


'my mpsim problems'
1996\04\01@105333 by Przemek Klosowski
flavicon
face
  >
  >I am aware of the simulator 'approximations'. I have't seen a simulator for
a
  >processor that works exacltly as the processor itself. Still I think it must
  >be possible to make one ...
  >
  Yes, I believe that it's possible to write one as well, and I was going to
  comment about how much extra time it would take for the Simulator to run.

I couldn't resist to comment that it all comes from a certain mindset. This
list has some very sophisticated PIC users, who could probably spot and fix
simulator bugs before breakfast. They won't, however, because the simulator
is an opaque WinDOS executable.

This is in contrast with the way things work in _my_ favorite
environment, Linux: source (and tools to compile it) is available for
everything, and if a bug bothers you enough, you fix it---there is
enough users that statistically speaking bugs do get fixed, because
someone will always get mad enough to do the work.

I understand the need for companies to guard their intellectual
property and all that, but such needs are often at odds with
sophisticated users' requirements to see what is going on and fix
things.  I do hope that in the long term companies with open policies
will prevail commercially.

       przemek

More... (looser matching)
- Last day of these posts
- In 1996 , 1997 only
- Today
- New search...