How does Cyclic Buffer work?

Chapter 1  Introduction


Fig. 1-1
Cyclic Buffer
 principle of operation

Cyclic Buffer is realised mostly as a microprocessor.
Developer has at his disposal micrcontroller (for example  Atmega) equipped with:
UDR– 1-byte register. It receives the bytes from the outside (from the another microcontroller for example) at any time.
Cyclic Buffer8 byte cyclic register here. It’ s bigger usually–> 16,32 or 64 bytes.
RAM-The consecutive bytes are transmitted from the Cyclic Buffer to the RAM (Random Access Memory)

The transmitted bytes are turned in the Cyclic Buffer  during transmission. It resembles the snake movement with the H-head and T-tail.
The earliest entered byte (the oldest byte) to  the Cyclic Buffer is in the H-head. The latest  entered byte (the last-born byte) is in the T-tail.

The Fig. 1-1 showes the initial Cyclic Buffer state. The H-head and T-tail are placed in common in the byte no. 0. It means that snake doesn’t exist or in other words – the Cyclic Buffer is empty.

Is all sure thing? H’m… Don’t bother yourself but go to the next chapter.

Dodaj komentarz

Twój adres e-mail nie zostanie opublikowany. Wymagane pola są oznaczone *