04-22-2014 09:58 AM - edited 04-22-2014 10:01 AM
Hi everyone. It's been along walk to finally create an account and post this problem here, but after countless hours and researching i'm out of ideas.
Here is the problem:
When using multisim MCU for PIC's, I have never, ever been able to make delays work with assembly. I have been working with the microchip microcontrollers for years now but never used them within multisim until now.
The main problem is, well, the delays just dosn't work. As soon as I insert a delay loop into any code in multisim, the I/O pins just go to high and stay there.
For example, let me show my problem using the following example (included with .ms13 and .asm file):
Lets set up 16f84a to blink all outputs with a ~500ms delay. Probes are used as indicators aswell as logic analyser. This code has been tested in other software, for example MPLABX and it works fine there.
All help is much appreciated
05-06-2014 01:17 PM
Hi James,
Your code is working but the simulation is slow so I reduced the delay time a lot, I made the changes to the following lines and now you can see the probes flash.
Delay Loop movlw d'02'
Delay movlwd '03' ;delay ms (4 MHz clock)