VLAB v2.0 Bug?

For C and ASSEMBLY users to post questions and code snippets for programming in C and ASSEMBLY. And for any other C or ASM course related questions.

Moderators: Benj, Mods

Post Reply
econnections
Posts: 35
Joined: Fri Dec 26, 2008 4:02 pm
Contact:

VLAB v2.0 Bug?

Post by econnections »

I am unable to load a value of FF into the W reg (ie movlw H'FF'). When I try to do this W shows 7F. If I increment the W I can get it to contain FF but not load it. Is this a bug? Is there a fix?

Any help would be appreciated. Thanks

User avatar
Steve
Matrix Staff
Posts: 3422
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: VLAB v2.0 Bug?

Post by Steve »

This seems strange. I've just created a program tthat simply has the instruction "MOVLW FF" and this works in the VPIC as expected. Can you please provide us with some more details of the problem, perhaps with a screenshot.

econnections
Posts: 35
Joined: Fri Dec 26, 2008 4:02 pm
Contact:

Re: VLAB v2.0 Bug?

Post by econnections »

Thanks for reply. This evening I will produce screen shots showing VLAB activity for your assistance. I assume you are using the same version?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: VLAB v2.0 Bug?

Post by Benj »

Hello

Seems to be some inconsistency here...

When you say VLAB do you mean VPIC?

Which software CD and version are you using?

econnections
Posts: 35
Joined: Fri Dec 26, 2008 4:02 pm
Contact:

Re: VLAB v2.0 Bug?

Post by econnections »

The link below shows the VLAB button in the ASM for PICmicro opening the Virtual PICmicro MCU. I treated the VLAB and Virtual PIC (VPIC) as two names discribing the same tool (simulator). As a beginner to assembly programming and ASM for PICmicro the between the two names is not made clear in the tutorials.

http://www.global-office.co.uk/pic/index.htm

Figures 3 & 4 show the register W being loaded with 0xFF and the binary equivalent using the movlw instruction. When the instruction is executed the value 0x7F appears in W and the ALU which is not what was intended.

I can't work out what is going wrong so I hope you can help.

If the program is allowed to loop then W will eventually overflow FF > 00

User avatar
Steve
Matrix Staff
Posts: 3422
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: VLAB v2.0 Bug?

Post by Steve »

This is so strange. I've just rewritten your program and it works fine on my vPIC here. Can you try it on a different PC and see if the problem is the same?

If you tell me the details of your operating system (OS + 32/64-bit), I'll try to replicat e this issue on a similar PC.

We updated Assembly for PICmicros back in August and this has a new version of the vPIC, and perhaps this one would work better.

econnections
Posts: 35
Joined: Fri Dec 26, 2008 4:02 pm
Contact:

Re: VLAB v2.0 Bug?

Post by econnections »

Hello,
I have been running to software on Windows XP Media Centre Edition Version 2002 SP2. The machine is an Acer Aspire T180, AMD Athlon 64x2 Dual Core Processor 3800+ 2GHz, 768RAM.

This morning I copied the VPIC directory to my w2000 server SP4 and run the same test programs - the problem was still there. I think it must be a bug in VPIC.

I had previously sent an email to Ben. If you wish you can send the update to that address?

econnections
Posts: 35
Joined: Fri Dec 26, 2008 4:02 pm
Contact:

Re: VLAB v2.1 Resolved Bug

Post by econnections »

Ben,

I installed version v2.1 and it allowed me to load the w register with FF. I then went back to v2.0 and it displayed 7E after loading w with FF. Clearly, there is a fault with the older version. It might be useful to setup an area in the forum for know bugs in both hardware and software so people can check for problems. I wasted many hours trying to get my program to work which turned out to be a fault in the software.

Now we only need to determine why INCFSZ and DECFSZ won't work when the 16F84A is set to XT.

Thanks for the update.

Post Reply