title: Whilst having my INT0 initialized as digital Input, it still gives out 2.8V which makes the Button don't really making a change
body: <p>My Problem is that I have a digital Input initialized on PORTB.0. On that Pin I have a button and a 100k Pull-down Resistor. When I run my Pic with literally nothing ( void main() {while(1){}} ) the Voltage level on this pin works as I want it to (0 to 3.3V). But after I test my programm and initialize as shown in the Code below, it's range goes from 2.8 to 3.3V.</p>
  
  <p>I am using a PIC18LF2520 for my graduation work. I am Programming in MPlab V5.10 with the XC8 1.45 Compiler. I just want an Interrupt for my Button which lies on the RB0 Pin of the uP. The initialisations I made will be shown on the Code down below. I already worked a lot with this particular PIC, but I have never had such an Error before.</p>
  
  <pre><code>void main() {
  
      init();
  
      while(1) {    
          /*
          if(isEXT0Set()) {   //If the Button gets pushed
              EXT0Int();      //Interrupt Function call
          }
          */
      }    
  }
  
  void init() {
  
     //PORT Definitions
  
      TRISA = 0x00;
      TRISB = 0xC3;
      TRISC = 0x00;
  
      //Oscillator Settings
  
      OSCCON = 0x7F;  //8Mhz; Internal Oscillator; INTOSC stable
  
      //Interrupt Settings
  
      INTCON = 0xF0;  //Global Enable; Peripherals Enable; TMR0 Enable; INT0 Enable
      INTCON2 = 0x64; //INT0 rising Edge; INT1 rising Edge; TMR0 High Priority
      INTCON3 = 0x08; //INT1 Enable
      ADCON1 = 0x0F; //set all Inputs to Digital ones.
  
      //Timer Settings
  
      T0CON = 0x86;   //16-Bit; LtoH; 1/128
      T1CON = 0x31;   //2 8-Bit; FOSC/4; 1/8
      T2CON = 0x07;   //Postscaler 1/1; Prescaler 1/16;
  
      TMR0H = 0xE1;   //Setting TMR0 to 1 Second
      TMR0L = 0x7B;  
  
      TMR1IE = 1;
      TMR2IE = 0;
  }
  </code></pre>
  
  <p>I expect that when I push the button that INt0IF will be set, but that doesn't happen. I testes it on the Hardware, the result is decribed up above. I hope someone sees what I missed. Thanks in advance. :D</p>