Searching \ for 'MPLAB simulation, input' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/ios.htm?key=input
Search entire site for: 'MPLAB simulation, input'.

Truncated match.
PICList Thread
'MPLAB simulation, input'
1998\11\20@171613 by Stig Brautaset

flavicon
face
Ok, written my first program now, assembled it and it works fine. Only thing
is I get a warning from MPASM, which says to ensure that I have the right
bit (RP0) set in the STATUS register, because trisa/b is not located in bank
0. Does it _always_ give this message when it sees trisa/b, even if the
right bits are set?

The snip of code giving me the warning is here:


bsf             STATUS, RP0             ; move to bank 1
movlw  0x0FF
movwf  TRISB                   ; setting trisa/b inputs
movwf  TRISA
bcf             STATUS, RP0             ; back to bank 0


My program doesn't do anything fancy, it is probably the longest and most
ineffective routine for multiplying two 1 byte numbers ever written (at
least it is honest work :-)) but it was the only idea I got. I took it as a
lesson in memorizing the instructionset.

My main problem is that I want to stimulate the input on porta & portb
during simulation, and I can't figure out how!


Stig

=====================================================
Stig Brautaset  -  spam_OUTsbrautasTakeThisOuTspamc2i.net  -  ICQ: 11052183
Student of electronics - http://home.c2i.net/sbrautas
=====================================================

1998\11\20@181809 by andre

flavicon
face
>
>
> bsf             STATUS, RP0             ; move to bank 1
>  movlw  0x0FF
>  movwf  TRISB                   ; setting trisa/b inputs
>  movwf  TRISA
> bcf             STATUS, RP0             ; back to bank 0
>
>

You shouldn't have any spacing after ,

Andre


{Quote hidden}

1998\11\21@175644 by Hanafi Tanudjaja

flavicon
face
>
>My program doesn't do anything fancy, it is probably the longest and most
>ineffective routine for multiplying two 1 byte numbers ever written (at
>least it is honest work :-)) but it was the only idea I got. I took it as a
>lesson in memorizing the instructionset.
>
>My main problem is that I want to stimulate the input on porta & portb
>during simulation, and I can't figure out how!
use stimulus file,make a file using wordstar or dos (edit.com )
like this :

step    Rb7 rb6 rb5 rb4 rb3 rb2 rb1 rb0

fill at what step you want the stimulus content send to portb.
Stimulus file extension name must be  'sti'

load the stimulus file right after load program file like this :
after MPSIM
lo (program name)
st (stimulus file).

Goodluck
Hanafi Tan
>
>=====================================================
>Stig Brautaset  -  sbrautasspamKILLspamc2i.net  -  ICQ: 11052183
>Student of electronics - http://home.c2i.net/sbrautas
>=====================================================
>

1998\11\21@235459 by Eduardo R.

flavicon
face
Hi, as a compliment to the answer you have received, I want to tell you how
I perfom stimulus tasks:

STEP    RB1    RB0
10      0       0
19      1       0
50      0       1
53      1       1
70      0       0
85      1       0
86      0       1


You can follow this instructions using the above template example.
As you can see we are pretending to stimulate PortB, bit 0 and bit 1 with
the following arrangement during the steps 10,19,50,53,70,85 y 86 (refer to
STOPWATCH window). You must save the corresponding stimulus table(going to
FILE > NEW) with the same filename of your project but extension .sti
When ready and with your project open select debug > simulator stimulus >
pin stimulus > enable . Select the righ stimulus file XXXX.sti from the list .

Hope this helps





.

" Happy of those who fears The Lord "
                    Humbleness is the clue.
         ________  ________  ________
        /         /       / /       /
       /_____    /_______/ /_______/
      /         /  \      / \
     /________ /    \    /   \
     ICQ# 10909825   \_ /     \___________
     .....eriveraKILLspamspam.....umemphis.campus.mci.net

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