From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

Assembly delay's do not work in Multisim MCU

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

Download All
0 Kudos
Message 1 of 2
(5,171 Views)

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)

 

Tien P.

National Instruments
0 Kudos
Message 2 of 2
(5,055 Views)