I got PBP running with MPSIM and now I finely see what is happening and when, thanks for this info.
Mike
I got PBP running with MPSIM and now I finely see what is happening and when, thanks for this info.
Mike
I don't know what's going on here!
Using MPSIM with watch window
I have TIMER1 running, I can observe that TMR1H=218 and TMR1L=8
testa is a word variable.
I execute this operation:
testa = TMR1H
and I see that testa = 218
Then I do this:
testa = TMR1H * 256 + TMR1L
However now testa = 8 instead of 55816
What am I missing?
PS: Sorry for mistyping Darrel's name in post #8, I know a Daryl and it just came out without thinking!
Mike
Last edited by lilimike; - 3rd May 2010 at 04:37. Reason: PS for Darrel
When I send the value of testa on a DEBUG line I get the proper value so it must be a setting in MPSIM somewhere.
I can't figure out why there would be such a setting though!
Mike
Which PIC are you using?
Some with 16-bit read/write modes for timers require you to read low byte first, then high byte.
I am using 16F628A
In the Watch properties of testa I changed the size to 16 bits and that solved it.
Now how can I get the value of each array data in the watch window?
let say I have a variable called ArrayVariable(x)
I would like to read ArrayVariable(1) and ArrayVariable(2)
The only choice I get from the list is _ArrayVariable
Thanks
Mike
Click View, File Registers, and scroll down until you see _ArrayVariable. This will be
_ArrayVariable[0]. After that will be the rest of the array.
Bookmarks