Is a secondary bi-directional port, which is exactly the same way as Ra0 to Ra4 except the declaration of TRISA that it must be TRISB and it has 8 pins
Example
Bsf STATUS, RPO
Movlw 55h
Movwf TRISB
Bcf STATUS, RPO
Where 55h is an hexa number that arrange into
Rb7 Rb6 Rb5 Rb4 Rb3 Rb2 Rb1 Rb0
0 1 0 1 0 1 0 1
The 55h is equal 01010101 in binary
And the direction of current in Rb0 to Rb7 will be like this
Figure. 4
No comments:
Post a Comment