--- Jim Tellier wrote: > >Bob Ammerman wrote: > > > What is the state of the IRP bit in STATUS? > i tend to include macro files to take care of page/bank selects ... makes it easier to "see where u are" in the code. Debbie :) ;********************************************************************** ;MACRO SECTION (I) ... 'bank select' MACROS ; ;STATUS for 'bank select' in STATUS REGISTER ; ; b6 b5 ; 0 0 BANK #0 ; 0 1 BANK #1 ; 1 0 BANK #2 ; 1 1 BANK #3 ;********************************************************************** BANK_0 MACRO bcf STATUS,RP0 bcf STATUS,RP1 ENDM BANK_1 MACRO bsf STATUS,RP0 bcf STATUS,RP1 ENDM BANK_2 MACRO bcf STATUS,RP0 bsf STATUS,RP1 ENDM BANK_3 MACRO bsf STATUS,RP0 bsf STATUS,RP1 ENDM ;****************************************************** ;MACRO SECTION (II) ... 'page select' MACROS ; ;STATUS for 'page select' in PCLATH ; ; b4 b3 ; 0 0 page #0 ; 0 1 page #1 ; 1 0 page #2 ; 1 1 page #3 ;****************************************************** PAGE_0 MACRO bcf PCLATH,4 bcf PCLATH,3 ENDM PAGE_1 MACRO bcf PCLATH,4 bsf PCLATH,3 ENDM PAGE_2 MACRO bsf PCLATH,4 bcf PCLATH,3 ENDM PAGE_3 MACRO bsf PCLATH,4 bsf PCLATH,3 ENDM > Upon startup, I always do: > bcf STATUS, RP0 > bcf STATUS, RP1 > I've not touched the IRP bit directly, but I believe it's supposed to > power-up as '0'. > > and > >Nigel Orr wrote > > >> ... > > > incf INDF ; Increment the value at register ((contents of > > > location 0xA0)+0xA0) > ... > > > Where is B1_COUNT initialised? > http://search.yahoo.com.au - Yahoo! Search - Looking for more? Try the new Yahoo! Search -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu