title: PIC18F locking up if sending data to quickly
body: <p>I'm working with a PIC18F and am trying to send data via hyperterminal. When I send data at a slow rate by pressing one key every half secondish it recieves the data and echos it correctly but when I start pressing the keys at a faster rate the MCU locks up. Not sure what causes this.</p>
  
  <pre><code>while(index&lt;length){
      while(PIR1bits.RCIF==0); // Wait till char recieved
      sendData(str2,9); // confirm reception
  
      Delay1KTCYx(5); //delay because without it, it messes up.
      rxData[index]= RCREG; //char array
      index++;
  }
  </code></pre>
  
  <p>baudrate is 2400 On both PIC and hyperterminal.</p>
  
  <p>This is our receive loop. sendData is just debug code that we send saying "recieved". It's how we know when it has frozen.</p>
  
  <p>It does not freeze at the same amount of loops everytime, it is solely on how fast we input data.</p>