view most significant bit

ibwev

Member
How do I view the most significant byte of a 2 byte variable? I have attached a section of code that I am using. The variable "RPM" under View:Watch of MPLAB is only1 byte long.
 

Attachments

would that be under "view" then "watch" ? i'm curiouse also, i've been just movfw then movwf of say portc????
 
Thanks for the response.

When I declared the 2 byte variable, I set it up this way:

variable res 2

To be able to view the variable, should I set it up this way:

variableLOW res 1
variableHIGH res 1
 
View variables under View:Watch of MPLAB then "Add SFR" (Special Function Register) and/or "add GPR" (General Purpose Register). Apparently, only 1 byte of a variable can be viewed.
 
With MPLAB (using assembler) you can view and modify from a single bit to 4byte floating point numbers. Add the variable to Watch, right click it, popup allow you to select format.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…