Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need some help for a FIFO Buffer in C code

Status
Not open for further replies.

NIALA

Junior Member level 1
Joined
Jun 9, 2010
Messages
19
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Location
Minneapolis
Activity points
1,408
Hi

looking for some hint(concept) to wrote a FIFO Buffer code . to be used in a code controlling a PIC16F877A with ISR and USART communication.

thanks
 

Maintain two pointers namely write pointer and read pointer. Initially both the write pointer and read pointer will point to the first location of FIFO (called front). Once you add something to FIFO buffer increment the write pointer to the next location. After reading of each element of the FIFO you have to increment the read pointer to the next location *** provided your FIFO is not empty. If your FIFO is empty you should give UNDERFLOW message. Similarly for the writing also.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top