From: <bra...@ca...> - 2003-07-19 04:33:13
|
On the PIC16F877, there are 2 bank select bits (STATUS,5 and STATUS,6. When I set TRISA, it appears that the compiler only sets RB0. How do I know that RP1(STATUS,6) will be 0 (TRISA only appears in Bank 1 while TRISB is in both Bank 1 and Bank 3)? void set_tris_a(unsigned char value) { TRISA = value; } ;*** ; pBlock Stats: dbName = C ;*** ;entry: _set_tris_a ;Function start ; 2 exit points ;has an exit ;; Starting pCode block _set_tris_a ;Function start ; 2 exit points BSF STATUS,5 ;#CSRC c:/sdcc/pic/ccs_functions.c 84 ; void set_tris_a(unsigned char value) MOVWF _TRISA BCF STATUS,5 ;#CSRC c:/sdcc/pic/ccs_functions.c 86 ; TRISA = value; RETURN ; exit point of _set_tris_a |