frequency counter source
Salam,
It's easy
There are two methods to access (TRISA, TRISB and OPTION) registers.
Example if you want set porta as input
So you must load 0xff to TRISA register.
Movlw 0xff
tris porta
The above is equal to TRISA=0xff
To write the same with switching bank method.
First TRISA at bank 1
So you switch to bank 1
then change TRISA
then return to bank 0
Here is the code
bsf status,rp0 ' go to bank1
movlw 0xff
movwf trisa
bcf status,rp0 ' return to bank 0
the above code is equal to TRISA=0xff too
This is method is the same for option and trisb registers.
If you want i can change the code for you, tell me.
Bye