[sdiy] FIFO as memory buffer

Magnus Danielson cfmd at swipnet.se
Sat Mar 8 17:14:32 CET 2003


From: jbv <jbv.silences at club-internet.fr>
Subject: [sdiy] FIFO as memory buffer
Date: Sat, 08 Mar 2003 12:59:49 +0000

> Does anyone have any experience using FIFO RAM
> as memory buffer between 2 microcontrollers ?
> 
> I'm presently brainstorming on a project featuring
> 1 uC as master and several other uCs as slaves.
> The master would pass data to slaves through a
> memory buffer (1 for each slave), and would then
> collect results through the same buffer.
> 
> FIFO Ram looks like a perfect candidate for such
> a function, and I've found several datasheets
> (Cypress for instance).
> 
> But the problem is that FIFO works great when
> communication happens in 1 direction only (for
> instance master -> slave).
> Things get more complex when the same FIFO
> is supposed to be used in both directions...
> In my project, reading & writing times will never
> overlap (neither for master nor slave)...
> 
> Of course, I could probably find a solution by
> adding bi-directional buffers and a few logic gates
> to the FIFO...
> But I was wondering if there were any FIFO chip
> that would reverse i/o with only 1 control pin...
> And in DIL package if possible...
> 
> Am I asking too much ?

FIFOs are unidirectional... so if you want a bidirectional communication you
want two separate FIFOs. You can understand this by viewing them as
uncoordinated readers and writers. The FIFO will disconnect the uncordinated
reader from the writer and store the information until the reader is able to
handle it. Then, if the same process both generates and consumes information,
some uncorrdinated and some coordinated, then they need separate FIFOs.

If you use a single FIFO in time-mux between them, you need to watch out since
the messages may go to the wrong processor. Now, you can avoid that by letting
one bit in each word tell which processor/side it is destined for, but if that
side doesn't consume it, it will block the transport of messages in the other
direction and you are toast again, but in a different way.

So, in short... I think you're asking too much. You want separate FIFOs one
way or another.

Cheers,
Magnus



More information about the Synth-diy mailing list