>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
>
>>Return-Path: <
RemoveMEowner-piclistTakeThisOuT
MITVMA.MIT.EDU>
>>X-Sender: sdle@ensae
>>Date: Thu, 28 Mar 1996 14:39:29 +0100
>>Reply-To: pic microcontroller discussion list <
spamBeGonePICLISTspamBeGone
mitvma.mit.edu>
>>Sender: pic microcontroller discussion list <
TakeThisOuTPICLISTEraseME
spam_OUTmitvma.mit.edu>
>>From: Sipke de Leeuw <
RemoveMEsdle
TakeThisOuTENSAE.ERICSSON.SE>
>>Subject: my mpsim problems
>>To: Multiple recipients of list PICLIST <
PICLISTEraseME
.....mitvma.mit.edu>
>>X-UIDL: f1ddf1a5569c441a66c2568944079114
>>
>>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 ...
>>
>Myke
>
>"We're Starfleet officers, weird is part of the job."
>
>Capt. Catherine Janeway
>
>