What is the hardware definition of "buffer"? - Page 1
Forum section: electronics / beginners

author: MarkS
author_rank: Unknown
timestamp: January 16, 2016, 10:51:09 pm
content: This is a follow up to my question about bus transceivers, here:https://www.eevblog.com/forum/beginners/what-is-the-purpose-of-a-bus-transceiver/I'm coming from the software side of things. A buffer, from a software perspective, is simply a block of memory where data is stored before being modified and/or moved. I think that is what was confusing me about the concept of a bus transceiver. They are referred to as "buffers". How so? There is no storage or modification involved; they just move the signal.

author: Simon
author_rank: Unknown
timestamp: January 16, 2016, 10:58:58 pm
content: A buffer may provide a space for data to sit, for example, if you have an SPI bus the data comes in, fills a register but then more data is coming so the byte that was just received is moved to a buffer where it sits so that the CPU can read it while the receive register is being filled with more data, the cycle then repeats.Another exampke is in the AVR where you have 16 bit registers but an 8 bit bus so if you need to read the value in a 6 bit register that might change during the read procedure you take a copy of it into a buffer so that you can read it in two operations while the original register carries on working. Usually buffers are transparent to C programs if they have a very low level use like the two examples I gave.

author: MarkS
author_rank: Unknown
timestamp: January 16, 2016, 11:00:36 pm
content: That makes the term "buffer", when related to a transciever, all that much more confusing. You've just described a software buffer. Transceiver chips don't have registers.

author: helius
author_rank: Super Contributor
timestamp: January 16, 2016, 11:11:20 pm
content: A buffer is also used to describe an amplifier with unity gain. Some prefer to reserve the word "amplifier" for devices with gain, and call anything that reproduces a signal at the same level as its input a buffer. A buffer with -1 gain would be an inverter.The two terms are not really separate, they kind of blend into each other. In computer hardware there are also structures called buffers (in the software sense) that hold data in between where it's produced and where it's consumed, for instance between different clock domains. They would be implemented using rams or f-fs. And a transparent latch is itself a buffer (in the electronics sense) that reproduces its input at the same level. So at a deeper level it's all the same concept.

author: amyk
author_rank: Super Contributor
timestamp: January 16, 2016, 11:15:53 pm
content: It's a term that is used for the general "cushion from the effects of" meaning; a signal buffer reduces the load required by one circuit from another.

author: timb
author_rank: Super Contributor
timestamp: January 17, 2016, 12:00:17 am
content: The OAD defines a buffer as: "A person or thing that prevents incompatible or antagonistic people or things from coming into contact with or harming each other."So, let's put that definition to use in an example: Say you've got a signal coming from your MCU, this signal needs to drive a number of TTL inputs, but the MCU can only source 4 mA per pin. Now, the buffer can source 40 mA per pin. So, to drive these TTL inputs you route your signal through the buffer, since it can drive heavier loads. In this way, the buffer is *sitting between* your MCU and the load.Make sense?These were very common in the days of mixed CMOS and TTL logic, and when computers used mainly discrete chips. You'd have memory, the CPU and peripherals all on the same 8-bit bus, so you had to use buffers to drive all of it.You have a few types of buffers: Inverting, Non-Inverting, Tri-State and Bus Transceivers.Tri-State Buffers would be important in the shared bi-directional computer bus example above; when the CPU wanted to read the bus, all buffers would go into high impedance mode and when it wanted to write, it would go back to the normal push-pull driver mode. Hence, the output can be in one of three states: High, Low or Hi-Z.An Inverting Buffer (Inverter) just logically flips the input (Output=!Input).A Non-Inverting Buffer (Buffer) just passes the input straight through. Some logic families will have a Schmidt Trigger on the input for some hysteresis.Bus Transceivers are also buffers, sometimes with extra features or bi-directional communication.For example, the SN75ALS160/161/162 has standard TTL I/O on one side and I/O capable of driving heavy loads on the other. GPIB uses negative true TTL signaling, so there's no level translation; it just provides drivers capable of sourcing enough current to drive up to 15 receivers over 21ft of cable. Hence, it provides a buffer (or cushion) between the controller and load. It also allows some lines to change from push-pull to open drain and change directionHope this clears it up a bit for you.Edit: Corrected SN74LS161 to SN75ALS160/161/162.

author: MarkS
author_rank: Unknown
timestamp: January 17, 2016, 12:14:57 am
content: Thank you all for the information. It makes much more sense now.Quote from: timb on January 17, 2016, 12:00:17 amAre you sure about that? The '161 is a counter.

author: timb
author_rank: Super Contributor
timestamp: January 17, 2016, 12:57:28 am
content: Quote from: MarkS on January 17, 2016, 12:14:57 amWhoops, I meant the 75ALS161/162 and companion chip 75ALS160. (The 160 handles the 8 data lines and the 161/162 handles the 3 handshake and 5 management lines. The difference between the 162 and 161 is that the former allows passing control of the bus to another controller, whereas the latter can't.)I'm so used to logic being prefixed with 74...

author: Mechatrommer
author_rank: Super Contributor
timestamp: January 17, 2016, 03:12:37 am
content: Quote from: MarkS on January 16, 2016, 11:00:36 pmto be more generalized, buffer does have somekind of "memory" of the input, and is able to reproduce it on the output. but it does not necessarily a "physical memory", it can be a "functional memory", take for example a unity gain opamp, it can reproduce the input on the output, but at a stronger admittance. if you dont take it too literally, relay and transistor are also buffer, if you do then understanding semantics or anything in the world will become much much harder. whats important is the meaning of it, not how it is addressed. ymmv.

author: ade
author_rank: Unknown
timestamp: January 17, 2016, 03:20:40 am
content: The Wikipedia intro is decent:https://en.wikipedia.org/wiki/Buffer_amplifierShorter version: when you connect two circuits (or busses) together, they may interfere which each other, and/or require different voltage, current or impedance levels.So instead of connecting the two circuits directly, we put a "buffer" between them. Often this buffer is an amp with "unity" gain -- which just means that the output signal level simply follows the input level -- or some variants thereof (inverted signal, tri-stated, etc.)Sometimes a buffer is combined with a line driver (https://en.wikipedia.org/wiki/Line_driver)

author: MarkS
author_rank: Unknown
timestamp: January 17, 2016, 05:32:34 am
content: Again, thank you! I've clearly got a lot to learn!

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 17, 2016, 05:33:53 am
content: A memory buffer is just a copy: it does nothing on its own, and serves to separate the source from the destination.A buffered analog  is just a copy: it does nothing on its own, and serves to separate the source from the destination.That's a little narrow, though, and the usefulness generalizes to a bit more.Digital logic buffers copy thestate, while refreshing the voltage level and output current. This is important for driving long traces, or many logic inputs at once: if each buffered output can drive a nominal N number loads, then a single pin, driving N buffers, can drive N^2 loads!Digital logic buffers can also be used to translate between different types of digital. If we're speaking of digital as exclusively an abstraction ('1's and '0's), then it's still a buffer, but the analog signals might be very different (a TTL to ECL converter starts with 0...5V input, and ends with something negative!). You might also get two outputs instead of just one, which still falls within the definition of digital -- there are logic types that require complementary signal pairs, like LVDS.(A reminder that digital is a subset of analog: all digital signals are, by necessity, real, continuous-time, analog, voltages and/or currents. Digital is just a mask we apply on top of that, a matter of definition, to help simplify our work. Of course, bad things happen when we believe in the mask too deeply...)Meanwhile, analog buffers do a similar thing, but the gain and offset might not be ideal. (Strictly speaking: no two analog signals are ever truly equal, because signals are real, noisy variables. So a foggy definition of 'buffer' is a necessity...)The underlying intent is usually to provide isolation between source and load, or to increase output current capacity.Some simple buffering examples include the BJT emitter follower, or the FET source follower. Both have a voltage gain less than 1, and both introduce a fairly modest offset voltage (-/+ 0.7V for an NPN/PNP; up to +6 / -3V for a variety of FETs, though some types can be biased for ~0.0V offset, which is very handy).The ideal op-amp has zero input current, but real op-amps have nonzero input bias current, and that current is usually least when the inputs are balanced; therefore, the op-amp follower has value by having a very high input resistance, and very low output resistance. The offset and gain specs are also quite good, being within a few mV of the actual input, even for jellybean op-amp types.Tim

author: Simon
author_rank: Unknown
timestamp: January 17, 2016, 09:52:07 am
content: The cache memory in your computer processor could be called a buffer, it saves the CPU from going all the way back to the RAM.

author: Bob F.
author_rank: Regular Contributor
timestamp: January 17, 2016, 12:09:31 pm
content: Quote from: MarkS on January 16, 2016, 10:51:09 pmThere are two types of "buffer".One is the hardware equivalent of a software buffer: somewhere to physically hold the data until you can do something with it - possibly because data is coming in faster than you can process it in real-time, or because you need a block of data to run a process on, etc.The other meaning, and this is the type I think you are referring to, is an interface between two circuits which may be required because, for example, the two circuits use different voltage levels, or the output of the first circuit cannot drive the low impedance of the second circuit, or you wish to electrically or physically isolate the two circuits.

author: Galenbo
author_rank: Super Contributor
timestamp: January 17, 2016, 12:40:35 pm
content: Quote from: Bob F. on January 17, 2016, 12:09:31 pmExactly the same definition as where we also use that word "buffer" for.

author: macboy
author_rank: Super Contributor
timestamp: January 17, 2016, 11:05:47 pm
content: I would say a buffer has a voltage gain of unity, high impedance input, and low impedance output.

author: LukeW
author_rank: Frequent Contributor
timestamp: January 18, 2016, 04:23:13 am
content: In the most simplified, ideal sense, a device with no gain (or attenuation), an output impedance of zero and an infinite input impedance.

author: Brumby
author_rank: Unknown
timestamp: January 18, 2016, 05:06:06 am
content: My vote goes to this answer - as it states and defines the TWO different functions:Quote from: Bob F. on January 17, 2016, 12:09:31 pm

author: MarkS
author_rank: Unknown
timestamp: January 18, 2016, 05:23:00 am
content: I'm just following along now. I thought my question was answered about ten posts back! lol! Everyone just keeps on adding more and different information. I've learned more than I expected!

author: Brumby
author_rank: Unknown
timestamp: January 18, 2016, 06:13:57 am
content: Quote from: MarkS on January 18, 2016, 05:23:00 amThat's a common experience.However, sometimes it's the result of unexpected complications - which is often when you're patience will be tested.

author: MarkS
author_rank: Unknown
timestamp: January 18, 2016, 05:00:25 pm
content: Quote from: Brumby on January 18, 2016, 06:13:57 amI'm not being impatient. I'm actually amused! I thought this would be a simple question with a simple answer. Nope! I'm actually happy to see this thread evolve.

author: Galenbo
author_rank: Super Contributor
timestamp: January 18, 2016, 06:18:05 pm
content: Quote from: MarkS on January 18, 2016, 05:00:25 pmSometimes it is, but sometimes local differences or language variations make it different.

author: Howardlong
author_rank: Super Contributor
timestamp: January 18, 2016, 07:34:45 pm
content: Quote from: Brumby on January 18, 2016, 05:06:06 amMy vote too.After all "buffered RAM" and "frame buffer" are an example of the first and are both hardware temporary digital storage concepts. Those of us of a certain age will remember printer buffers.A buffer amplifier on the other hand is commonly used for impedance/voltage/current transformation, and has nothing to do with storage (although to slightly confuse the issue they may well be used inside a hard drive for example to drive the SATA or SAS bus, the heads themselves, or the electromechanical parts).

author: timb
author_rank: Super Contributor
timestamp: January 18, 2016, 09:31:45 pm
content: But we're not talking about general hardware here... We're talking about ICs. The OP was clearly talking about the latter type of buffer, as it was in reference to a Bus Transceiver. The IC equivalent of a software buffer would perhaps be a latch, shift register or a FIFO.A Printer Buffer was just RAM that sat between the printer port and printer. A frame buffer is just some RAM that a MCU or display controller stores the current frame.

author: MarkS
author_rank: Unknown
timestamp: January 18, 2016, 09:33:47 pm
content: There would appear to be more hardware definitions of buffer than I thought. You are correct, but now I'm just interested in all of them.

author: suicidaleggroll
author_rank: Super Contributor
timestamp: January 18, 2016, 09:38:32 pm
content: That's because "buffer" is a generic word, and can be interpreted many different ways depending on the application. It's best to avoid the use of the word "buffer" in general, unless you add a qualifier to specify thetypeof buffer you mean. Eg: FIFO buffer, frame buffer, current buffer, etc.

author: MarkS
author_rank: Unknown
timestamp: January 18, 2016, 10:17:00 pm
content: Quote from: suicidaleggroll on January 18, 2016, 09:38:32 pmThat would be VERY nice!

author: C
author_rank: Super Contributor
timestamp: January 18, 2016, 10:23:01 pm
content: Your other thread asked about a SN74LS245Cromemco S-100 "Blitz Bus" MotherboardA S-100 21 slot motherboardA good S-100 board1. Use a driver when signal went off the board to the motherboard.2. Use one Schmidt input for signals from motherboard to the board.A bus like this has a lot of noise, High power drivers help but terminators are often needed.Active terminator that allowed for such a long S-100 bus!http://www.digibarn.com/collections/systems/s-100-multiprocessor/DSC07244.JPGWhile 21-slots sounds like a lot, there were systems that needed more.http://www.digibarn.com/collections/systems/s-100-multiprocessor/DSC07239.JPGChicago_Mercantile_Exchangehttps://commons.wikimedia.org/wiki/File:Cromemco_Z-2_Systems_at_Chicago_Mercantile_Exchange_(1984).jpg#/media/File:Cromemco_Z-2_Systems_at_Chicago_Mercantile_Exchange_(1984).jpgThe picture is racks of rack mounted computers with the above motherboard.There were systems that had 17 Z80's plugged into one motherboard like this.The above show where a 74LS245's output is driving many inputs via system bus.Some of the processor boards used three buses. A local bus, a system bus & a local bus expansion. The Local bus was faster. The local bus expansion was a little slower due to extra buffers. While the system bus you had the many processors trying to use the bus slowing things more.The three 74LS245's were used as a three way switch.A different use is to drive a longer distance to a single input, A bus extension.So a 74LS245 lets you drive more inputs and it's Schmidt inputs removes some bus noise problems.This comes at a BIG cost, the time delay of the 74LS245. If you look at the system bus you have 4 drivers in the path for a read, each adding a time delay(12ns X 4 = 48ns). This delay is with the drivers already enabled.

author: Howardlong
author_rank: Super Contributor
timestamp: January 19, 2016, 08:39:04 am
content: Quote from: timb on January 18, 2016, 09:31:45 pmNope, as far as I can see, the OP didn't specify that, but I can see how you might have assumed that. In fact, the OP talked about storage buffers in the very same first post that they did bus transceivers, and was trying to understand the nomenclature.Whether a buffer is in an IC, discretely made or otherwise doesn't matter.