2
\$\begingroup\$

I have a few questions regarding the PIC16F690's USART when doing asynchronous receives, and the user guide is sending me mixed signals. It has a two character FIFO buffer, and I'd like to know:

  • What happens to the data in the FIFO buffer when I turn the receive block off and on again (this is necessary to deal with overruns)?
  • When exactly is the receive flag set (RCIF)? When the receive buffer is full (page 40)? When there is an character in the buffer (paga 153)? Or when there is an character in the buffer AND the receive block is on, that is, SPEN and CREN are set (page 153 again)?
  • The datasheet tells me "the data recovery block is actually a high-speed shifter operating at 16 times the baud rate". This sounds wrong: does this mean that the data recovery block can multiply clocks by 16?
\$\endgroup\$
1
\$\begingroup\$
  1. When the receive block is turned off the data stays in the buffer. If an overrun condition occurs the receiver will stop receiving. To get the receive block to start receiving again turn it off and turn it back on.
  2. The RCIF flag is set when there is at least one byte sitting in the buffer.
  3. The block does not multiply the clock by 16, instead it run at 16 times faster than the baud rate. This is to synchronize the incoming data because it is asynchronous.
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.