08-14-2008 12:56 AM
Hi
I am new to multisim MCU programming. I am trying a simple example on PIC 16F84 MCU using assembly.
I get the following warning after building the assembly programme.
-----------------------------Building: Project: e1------------------------------
e1.asm
Note: Due to path length limitations in the Microchip MPASM for PIC16, the path E:\MCUexperimentsmultisim\example1\e1\ has been mapped to the drive Z: temporarily for this operation.
Message[302] Z:\E1.ASM 14 : Register in operand not in bank 0. Ensure that bank bits are correct.
Assembler results: 0 - Errors, 1 - Warnings
I have attached the programme. I would appreciate if someone can point out the errors in it.
Many thanks
Mal
08-18-2008 07:08 AM
Hi Mal,
I have looked at your code and a tutorial on doing a similar thing and also wrote that configuration part myself and still get the warning.
I think that it is simply warning you that you are configuring Bank 1 registers rather than Bank 0 as you would want to use for the majority of your functions. If you are getting the desired effects when running your program then I would suggest that you simply carry on as the fact you are using bank 1 is certainly intentional in this case.
Regards,
08-18-2008 04:58 PM
If it is the "Register Not in Bank 0" error message, then I was told by an engineer here in the US that this was normal and could be ignored. They told me that the assembler is just reminding you to check to make sure you have switched banks correctly.
I think this is problematic in the sense that when you are trying to debug your program any errors that pop up needs to be examined. If the assembler is popping up "bogus" error messages then it makes it difficult to track down your actual error. This leads to chasing ghosts in the program. Believe me I have been there and done that.
08-18-2008 06:58 PM
You can remove the "Register in operand not in bank 0. Ensure that bank bits are correct" warning message by inserting the following at the top of your file:
ERRORLEVEL -302
This will remove the message about using the proper bank. But if you do make a mistake, the assembler will not catch it and this type of error can be hard to find and debug. The message is just a warning and does not mean there is any type of error.
Hope this helps.
Howard
08-18-2008 08:25 PM
Thanks for that information Howard. The engineer that I conversed with told me about this when I had questions about it, but I had forgotten about the code segment. I appreciate you re-posting it for me and this user.