Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
BSF STATUS,RP0 ;go to TRISA bank
banksel TRISA
banksel 1
folarinv said:To change from Bank 0 to bank 1, nigel's tutorial suggests that I do
bsf STATUS, RP0
but another tutorial suggest that i do
BSF 03h,5
so, which one is more appropriate.
I agree. It is better to learn to crawl before you learn to walk, ie. the finer points can be learnt later.Nigel Goodwin said:As already suggested, you should use the labels from the MicroChip include files, this tells you (at least vaguely!) what the line is doing. 'STATUS' is far more informative than '03h', as Jay has suggested, you can also use the inbuilt macros which will generate the lines for you with a 'banksel' instruction - but for tutorial purposes I thought this might be more confusing?.
adamthole said:It hasn't been said explicitly yet, but just so their is no confusion, both segments of code you gave will do precisely the same thing.
When you use MPLAB it will replace "STATUS" with 03h and "RP0" with 5 when it assembles, making the code identical.