What is a FIFO?

FAQs

A FIFO (First In First Out) is a type of buffer, where the first byte to arrive is the first to leave.

Brainboxes Serial Devices all have Hardware FIFOs. FIFOs reduce the chances of data loss by ‘buffering’ the data. This way the device driver can then read all of the data from the FIFO in one go, whilst communication is still continuing.

If you imagine someone asking you to load apples on to a lorry. If they hand you one at a time they are likely to be ready with the next apple before you have got back from the lorry. If you ask them to fill a box, however, whilst you take a box they can be filling the next box. This is how a FIFO works. You use what is called a trigger level to determine at what point (how full) the buffer should be when emptied by the driver; or in the analogy how full do you let the box get before taking it to the lorry.

Some Brainboxes cards have the standard 16 byte FIFO on it, but some have a 64 byte FIFO and Photon cards have a 128 byte FIFO. In an application where it may not be possible to implement flow control a very large buffer with a modest receive trigger level can significantly reduce data loss.

RS232/422/485 Adaptors >>

FAQs