title: Enable port RA0 as input and retrieve value LDR from led
body: <p>I'm using the picdem 18F4550 with microchip v8.63 with the C18 compiler.</p>
  
  <p>I will enable PortA to set as input, I will connect a LDR on port RA0.
  Which is as following (I think)</p>
  
  <pre><code>TRISAbits.TRISA0 = 1; &lt;= set RA0 as input
  </code></pre>
  
  <p>Now I want the value of the LDR (voltage/value if a led is on), can I say:</p>
  
  <pre><code>int colorLed = PortAbits.RA0;
  </code></pre>
  
  <p>And now in the variable of type int there is the value/voltage of my Led.</p>
  
  <p>Correct me if i'm wrong.</p>