Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
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.
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.
When vladimir from oshonsoft declares int's and long's he uses R0L , R0H, R1L, R1H.. This way when you watch the variable you can select them from the drop down box in the watch window.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.