title: Difference between PORT and LATCH on PIC 18F
body: <p>I already read the datasheet and google but I still don't understand something.</p>
  
  <p>In my case, I set PIN RC6 of a PIC18F26K20 in INPUT mode:</p>
  
  <blockquote>
    <p>TRISCbits.TRISC6 = 1;</p>
  </blockquote>
  
  <p>Then I read the value with PORT and LATCH and I have different value!</p>
  
  <blockquote>
    <p>v1 = LATCbits.LATC6;</p>
    
    <p>v2 = PORTCbits.RC6;</p>
  </blockquote>
  
  <p>v1 gives me 0 where v2 gives 1.</p>
  
  <p>Is it normal? In which case we have to use PORT and in which case LATCH?</p>