Menu
In general usage, a buffer is something that serves as a protective barrier. There are at least two different meanings for the word in electronics vernacular. A buffer in circuit design is an amplifier that provides an interface between mismatched circuit elements. In computer science, the term refers to a memory device used for temporary storage. It could also be an area of general memory that a computer program allocates for holding large amounts of data it's processing.
Buffer Amplifier
A buffer is a unity gain amplifier packaged in an integrated circuit. Its function is to provide sufficient drive capability to pass signals or data bits along to a succeeding stage. Voltage buffers increase available current for low impedance inputs while retaining the voltage level. Current buffers do just the opposite, keeping the current the same while driving high impedance inputs at higher voltage levels. In either case, the buffer protects and the output of the supplying device while providing a sufficiently robust signal to the next stage. Some data buffers are bi-directional, allowing data to pass in either direction. Others are tri-state devices with a disabled state that enablese several device outputs to connect to the same input.
Computer Memory
In computer architecture, a buffer is an element or segment of memory that temporarily holds data until the processor is ready to perform some operation on it. Some buffers are dedicated memory locations or devices built into the machine. Computer programs also dynamically allocate areas of general-purpose memory as buffers. Streaming applications, for example, use buffers to queue up large amounts of data for the streaming of audio or video to ensure a supply of information in case of delays.
References
- The Art of Electronics; Paul Horowitz and Winfield Hill
About the Author
Ptb Circuit After A Buffer Plan
Don Patton began writing after retiring from an engineering career in 2006. He holds a Bachelor of Science in electrical engineering from the University of California at Berkeley and continued with graduate study in software engineering.
More Articles
Posted by4 years ago
Archived
I thought I'd make a buffer circuit to take the output from a oscillator and use it to drive a LED. I'm using a CLC1005IST5X op amp.
The design of my circuit is shown in the diagram below. I didn't include any smoothing or anything - none of the introductory texts mention this. Buffer circuits always seemed very simple to me..
Photo of assembled circuit:
The oscillator goes ~50 MHz, but I've tried it with a signal generator at Hz frequencies and it doesn't work for any of them. With not signal applied it outputs about 3V, when I add the signal it goes crazy (this is not way I could describe the waveform except noise).
So is it because a buffer is actually much more difficult in practice or have a made a simple mistake?
12 comments
A buffer amplifier (sometimes simply called a buffer) is one that provides electrical impedance transformation from one circuit to another, with the aim of preventing the signal source from being affected by whatever currents (or voltages, for a current buffer) that the load may produce. The signal is 'buffered from' load currents. Two main types of buffer exist: the voltage buffer and the current buffer.
Figure 1: Top: Ideal voltage buffer Bottom: Ideal current buffer
- 3Voltage buffer examples
- 3.2Single-transistor circuits
- 4Current buffer examples
Voltage buffer[edit]
A voltage buffer amplifier is used to transfer a voltage from a first circuit, having a high output impedance level, to a second circuit with a low input impedance level. The interposed buffer amplifier prevents the second circuit from loading the first circuit unacceptably and interfering with its desired operation. In the ideal voltage buffer in the diagram, the input resistance is infinite and the output resistance zero (output impedance of an ideal voltage source is zero). Other properties of the ideal buffer are: perfect linearity, regardless of signal amplitudes; and instant output response, regardless of the speed of the input signal.
If the voltage is transferred unchanged (the voltage gainAv is 1), the amplifier is a unity gain buffer; also known as a voltage follower because the output voltage follows or tracks the input voltage. Although the voltage gain of a voltage buffer amplifier may be (approximately) unity, it usually provides considerable current gain and thus power gain. However, it is commonplace to say that it has a gain of 1 (or the equivalent 0 dB), referring to the voltage gain.
As an example, consider a Thévenin source (voltage VA, series resistance RA) driving a resistor load RL. Because of voltage division (also referred to as 'loading') the voltage across the load is only VA RL / ( RL + RA ). However, if the Thévenin source drives a unity gain buffer such as that in Figure 1 (top, with unity gain), the voltage input to the amplifier is VA, and with no voltage division because the amplifier input resistance is infinite. At the output the dependent voltage source delivers voltage Av VA = VA to the load, again without voltage division because the output resistance of the buffer is zero. A Thévenin equivalent circuit of the combined original Thévenin source and the buffer is an ideal voltage source VA with zero Thévenin resistance.
Current buffer[edit]
Typically a current buffer amplifier is used to transfer a current from a first circuit, having a low output impedance level, to a second circuit with a high input impedance level.[1] The interposed buffer amplifier prevents the second circuit from loading the first circuit's current unacceptably and interfering with its desired operation. In the ideal current buffer in the diagram, the output impedance is infinite (an ideal current source) and the input impedance is zero (a short circuit). Again, other properties of the ideal buffer are: perfect linearity, regardless of signal amplitudes; and instant output response, regardless of the speed of the input signal.
For a current buffer, if the current is transferred unchanged (the current gainβi is 1), the amplifier is again a unity gain buffer; this time known as a current follower because the output current follows or tracks the input current.
As an example, consider a Norton source (current IA, parallel resistance RA) driving a resistor load RL. Because of current division (also referred to as 'loading') the current delivered to the load is only IA RA / ( RL + RA ). However, if the Norton source drives a unity gain buffer such as that in Figure 1 (bottom, with unity gain), the current input to the amplifier is IA, with no current division because the amplifier input resistance is zero. At the output the dependent current source delivers current βi IA = IA to the load, again without current division because the output resistance of the buffer is infinite. A Norton equivalent circuit of the combined original Norton source and the buffer is an ideal current source IA with infinite Norton resistance.
Voltage buffer examples[edit]
Op-amp implementation[edit]
Figure 2: A negative feedback amplifier
Figure 3. An op-amp–based unity gain buffer amplifier
A voltage follower boosted by a transistor; also can be seen as the 'ideal transistor' without a base voltage drop on the input signal. This is the basic circuit of linear voltage regulators
A unity gain buffer amplifier may be constructed by applying a full series negative feedback (Fig. 2) to an op-amp simply by connecting its output to its inverting input, and connecting the signal source to the non-inverting input (Fig. 3). Unity gain here implies a voltage gain of one (i.e. 0 dB), but significant current gain is expected. In this configuration, the entire output voltage (β = 1 in Fig. 2) is fed back into the inverting input. The difference between the non-inverting input voltage and the inverting input voltage is amplified by the op-amp. This connection forces the op-amp to adjust its output voltage simply equal to the input voltage (Vout follows Vin so the circuit is named op-amp voltage follower).
The importance of this circuit does not come from any change in voltage, but from the input and output impedances of the op-amp. The input impedance of the op-amp is very high (1 MΩ to 10 TΩ), meaning that the input of the op-amp does not load down the source and draws only minimal current from it. Because the output impedance of the op-amp is very low, it drives the load as if it were a perfect voltage source. Both the connections to and from the buffer are therefore bridging connections, which reduce power consumption in the source, distortion from overloading, crosstalk and other electromagnetic interference.
Single-transistor circuits[edit]
Figure 4: Top: BJT voltage follower Bottom: Small-signal, low-frequency equivalent circuit using hybrid-pi model
Figure 5: Top: MOSFET voltage follower Bottom: Small-signal, low-frequency equivalent circuit using hybrid-pi model
Other unity gain buffer amplifiers include the bipolar junction transistor in common-collector configuration (called an emitter follower because the emitter voltage follows the base voltage, or a voltage follower because the output voltage follows the input voltage); the field effect transistor in common-drain configuration (called a source follower because the source voltage follows the gate voltage or, again, a voltage follower because the output voltage follows the input voltage); or similar configurations using vacuum tubes (cathode follower), or other active devices. All such amplifiers actually have a gain of slightly less than unity, but the difference is usually small and unimportant.
Impedance transformation using the bipolar voltage follower[edit]
Using the small-signal circuit in Figure 4, the impedance seen looking into the circuit is
(The analysis uses the relation gmrπ = (IC /VT) (VT /IB) = β, which follows from the evaluation of these parameters in terms of the bias currents.) Assuming the usual case where rO >> RL, the impedance looking into the buffer is larger than the load RL without the buffer by a factor of (β + 1), which is substantial because β is large. The impedance is increased even more by the added rπ, but often rπ << (β + 1) RL, so the addition does not make much difference
Impedance transformation using the MOSFET voltage follower[edit]
Using the small-signal circuit in Figure 5, the impedance seen looking into the circuit is no longer RL but instead is infinite (at low frequencies) because the MOSFET draws no current.
As frequency is increased, the parasitic capacitances of the transistors come into play and the transformed input impedance drops with frequency.
Chart of single-transistor amplifiers[edit]
Some configurations of single-transistor amplifier can be used as a buffer to isolate the driver from the load. For most digital applications, an NMOS voltage follower (common drain) is the preferred configuration.[dubious] These amplifiers have high input impedance, which means that the digital system will not need to supply a large current.
Amplifier type | MOSFET (NMOS) | BJT (npn) | Notes |
---|---|---|---|
Common gate/base | Typically used for current buffering | ||
Common drain/collector | Voltage gain is close to unity, used for voltage buffering, highly dependent on the beta of a transistor. |
Logic buffer amplifiers[edit]
A non-linear buffer amplifier is sometimes used in digital circuits where a high current is required, perhaps for driving more gates than the normal fan-out of the logic family used, or for driving displays, or long wires, or other difficult loads. It is common for a single package to contain several discrete buffer amplifiers. For example, a hex buffer is a single package containing 6 discrete buffer amplifiers[dubious], and an octal buffer is a single package containing 8 discrete buffer amplifiers. The terms inverting buffer and non-inverting buffer effectively correspond with high-current capability single-input NOR or OR gates respectively.
Speaker array amplifiers[edit]
The majority of amplifiers used to drive large speaker arrays, such as those used for rock concerts, are amplifiers with 26-36dB voltage gain capable of high amounts of current into low impedance speaker arrays where the speakers are wired in parallel.
Current buffer examples[edit]
Simple unity gain buffer amplifiers include the bipolar junction transistor in common-base configuration, or the MOSFET in common-gate configuration (called a current follower because the output current follows the input current). The current gain of a current buffer amplifier is (approximately) unity.
Single-transistor circuits[edit]
Figure 6: Bipolar current follower biased by current source IE and with active load IC
Figure 6 shows a bipolar current buffer biased with a current source (designated IE for DC emitter current) and driving another DC current source as active load (designated IC for DC collector current). The AC input signal current iin is applied to the emitter node of the transistor by an AC Norton current source with Norton resistance RS. The AC output current iout is delivered by the buffer via a large coupling capacitor to load RL. This coupling capacitor is large enough to be a short-circuit at frequencies of interest.
Because the transistor output resistance connects input and output sides of the circuit, there is a (very small) backward voltage feedback from the output to the input so this circuit is not unilateral. In addition, for the same reason, the input resistance depends (slightly) upon the output load resistance, and the output resistance depends significantly on the input driver resistance. For more detail see the article on common base amplifier.
See also[edit]
References[edit]
- ^'Lecture 20 - Transistor Amplifiers (II) - Other Amplifier Stages'(PDF).
A current buffer takes the input current which may have a relatively small Norton resistance and replicates the current at the output port, which has a high output resistance .. Input resistance is low .. Output resistance is high .. transform a current source with medium source resistance to an equal current with high source resistance
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Buffer_amplifier&oldid=891001387'
One prominent application is this:
Some circuits have an output impedance very high. If thesecircuits are coupled with another circuit of low input impedance,the desired functionality of the latter circuit will be drasticallyaffected. Because the first circuit tries to deliver large voltageto the second and the second invariably requires small inputvoltage.
To avoid the circuit disfunctionality, a buffer circuit (acircuit with high i/p impedance and a low o/p impedance) isused.
Another application is in the delay matching. This is anadvanced topic though. The technology is still new.
In delay matching, the latter circuit requires a delay of say'n' seconds after the first circuit's output. A buffer circuit isused in such cases also. The circuit design is totally differentthan the impedance matching case.
Application of a common - collector amplifier circuit?
Common collector amplifier can be used as a voltage buffer and in impedance matching
Definition of buffer in digital electronics?
A buffer is a means of isolating a signal source circuit from the loading circuit. They are generally needed when the signal source does not have sufficient capacity to deliver the current demanded by the load circuit. If buffers are not used, a problem called input loading results and this may cause the circuit to malfunction or to become damaged. In digital circuits, the buffers reproduce the sequence of 1's and 0's received from one… Read More
What do you mean by voltage buffer?
A voltage buffer is a circuit that will buffer a source from an output.
Application of mathematics in electronics?
Design and implementation of a buffer circuit using operational amplifier?
design and implementation of a buffer circuit using operational amplifier
What is the Definition of applied electronics?
Applied Electronics Means 'Application of Electronics'
What is a buffer in electronics?
when your youtube lags and the video stops and you rage
What is buffer circuit?
How can one employ an electronics circuit specialist?
Someone can employ a electronics circuit specialist through a number of means such as either hiring an electronics circuit specialist as an employee or hiring a contractor that specializes in electronic circuits.
What is buffer action in digital electronics?
How relays work for electronics circuit?
A: Relays are nothing but an inductance load to electronics circuit but they do provide isolation to the outside world
When was the Circuit City electronics company founded?
Circuit City electronics stores or Circuit City Stores, Inc. was founded in 1949. In 1970, they pioneered the electronics superstore format. At the time of their liquidation, they had 567 store nationwide.
Discuss the branches and sub-branches of electronics?
fuzzy electronics, digital electronics, integrated circuit, analogue electronics, microelectronics, semiconductor, semiconductor devices, microelectronics, circuit design,VLSI design, embedded system
What is the function of a buffer amplifier in electronics?
A buffer amplifier can be used to transform high input impedence to low output impedence, or vice-versa.
What is a small circuit?
a simple circuit is made with basic electronics elements
What is the lifetime of printed circuit board?
Depends on the material it's constructed from, the application for which it's being used and the atmospherics to which it's exposed. I have printed circuit boards from the very first model of an RCA transistor radio made in 1957 and the circuit board as well as the electronics still work.
What is the application of electronics in computer engineering?
application of electronics in computer engineering is so relevant because the material use is mostly semiconductor which is related to electonics
What is MCB In power electronics?
Miniature Circuit Breaker. It helps to break electric circuit when there is short circuit in it.
Is electronics a branch of science or technology?
The behavior of the electric charges in the electronics is a branch of scientific study. The application of the electronics is technology.
Application of electrical circuit analogies in magnetic circuit?
The main application of the 'electrical circuit analogy' for a magnetic circuit, is to teach peoplewho are already familiar with electrical circuits, the behaviour of a magnetic circuit.
What is meant by basic electronics?
What is the Difference between electronics and power electronics?
No difference only magnitude. but there is application that are quite different
When was the American electronics corporation Circuit City founded?
Circuit City, the American Electronics corporation was founded in 1949. Circuit City went bankrupt in 2009 and liquidated all of it's Retail Stores in America.
Where can one get a replacement video circuit for an electronics kit?
One can get a replacement video circuit for an electronics kit from the these stores: Element 14, Maplin, Snap Circuits, Makey Makey, Circuit Medic, Electronic Kits, Solder.
What is the application area of RC oscillator?
What is the applications opamp buffer circuit?
An opamp buffer circuit is one where the input signal is connected to the plus input, and the output is connected to the minus input. Within the performance limitations of the opamp, the output will track the input. The advantage of the buffer circuit is that is presents very little load impedance to the input signal, while providing a low impedance from the output to drive whatever circuitry is connected there.
Why you need ground in electronics circuits?
I dont know but it is to get a circuit common and to give a negative input to the circuit
Why is a buffer needed in gel electrophoresis?
The buffer is the medium through which the current flows. In the electrophoresis chamber, the anode and cathode are separated and the gel is placed between them. In order to close the circuit and generate the voltage which causes the migration, the entire chamber is filled with a conductive buffer. It is actually possible to perform electrophoresis without a buffer; however this requires a specially made electrophoresis chamber. In these chambers the electrodes actually contact… Read More
Definition for latch on digital electronics?
Where is soldering used in industry?
Application of maths in electronics and communication?
What are applications of half subtractor circuit?
The optical signal processing is one of the application of the half subtractor circuit. Binary numbers is another application.
Can you give the circuit diagram of buffer circuit which gives composite OUT?
if u really wanna no the answer, u should go to the dictionary or www.dictionary.com stupid
What is the best course to study after completing BSc electronics?
the best option after bsc electronics is to do MCA (master of computer application)
Where is a circuit board for 2005 Dodge Ram truck?
Almost every piece of electronics in the truck will have a circuit board in it.
Why is it important that homes have circuit breakers?
Homes should have circuit breakers so that you can slow down voltage in electronics.
Which electronics circuit gives unidirectional current or wave form?
A rectifier circuit produces a unidirectional wave form.
How do you clean honey out of electronics?
Where to get a wireless router?
Best Buy Fry's Electronics Target Wal-Mart Circuit City and other fine electronics dealers..
What is Vss in electronics?
Vss refers to negative supply voltage in electronics. They are mostly used in FETS and MOSFETs in common circuit configurations.
What does peripheral mean in electronics?
Malayalam meaning of electronics?
The meaning of 'electronics' is study and application of electrons. So its malayalam meaning would be ' electronukalae sambandhikkunna shaasthram '.
Why does circuit breaker trip?
Many times, a circuit breaker may trip when the circuit is overloaded. Before plugging in electronics and appliances, you should check to ensure that the circuit can handle the load.Ê
What is ASIC?
Why do you use buffer between micro controller and gate driver circuit?
Can hobby electronics be purchased from circuit city?
No, hobby electronics are more in RadioShack's department. Furthermore, many Circuit City establishments have gone out of business. Circuit City used to sell MP3 players, computers, consoles, TVs, games, and other electronic entertainment devices.
What is the advantages of buffer circuits in digital electronics?
buffer circuits helpful in overcoming the impedance matching problem.for example if we want to send a signal from one devise to other ,if there is no impedance matching between this two then signal is not transfered.now if we use buffer in between these two devises then the buffer without changing the signal shape or value it simply transffers the signal
In the hierarchy of electronics a what is a module?
In the hierarchy of electronics, a module is a component of a larger system. A module can be a circuit component that forms a large piece of equipment.
Will turning on and off a circuit breaker damage electronics?
nope it should'nt but you should have a surge protector in line with any electronics of any value
Why is electrophoresis carried out in buffer?
Electrophoresis refers to the movement of charged particles in a fluid or gel under the influence of an electric field. It is carried out in buffer in order to complete the electron circuit flow.
Downloading Psychtoolbox
Q: How do I get Psychtoolbox?
A: Follow the instructions provided on the website.
Backwards Compatibility
Q: Is PTB-3 backwards compatible with PTB-2 (Mac or Win)?
A: Not really. In developing PTB-3, it unfortunately turned out that theimaging model of PTB-2 too tied in with Apple's QuickDraw to make it workwith OpenGL.
For example, in OpenGL a fundamental concept is buffer switching. The contentsof a 'front' buffer are displayed while you issue commands to affect thecontents of a 'back' buffer. A single command then flips the role of the two,allowing for quick updating of the entire display. This concept was not partof the PTB-2 imaging model. A consequence of this change is that if you don'tinsert the flip command
Screen('Flip', ..)
after your drawing operations, youwon't see the result. This change can take a little while to get used to, ifyou've been programming in PTB-2.However, if you must use old code written for PTB-2, you can switchPTB-3 into a kind of compatibility mode by adding the followingcommand at the very top of your script:
This will emulate the drawing model of PTB-2
- All drawing commands will be directed to the visible screenimmediately, without need for the
Screen('Flip', ..)
command. - The
Screen('WaitBlanking', ..)
command gets re-enabled to allowsynchronization of Matlab to the vertical retrace.
This allows to run many old PTB-2 scripts without further modifications.However, there may be subtle differences between drawing commandson PTB-2 and PTB-3, so this approach does not guarantee backwardscompatibility.
Although PTB-3 is not backwards compatible, there are many similaritiesbetween it and earlier versions. It is not too hard to convert oldprograms, and the ever-growing set of new demos provides examples.
Some of the comments and help text in PTB-3 explain differences between it andolder versions, but at this point we are trying to streamline these in theinterests of clarity.
Psychtoolbox 64-Bit support
Q: Does Psychtoolbox work with 64-Bit versions of Matlab or Octave?
A: Yes.
In fact, 32-bit support is no longer available in current Psychtoolbox releases,except for 32-Bit Octave for Linux on Debian/Ubuntu systems, but only in thereleases provided by the NeuroDebian project and by upstream Linux distributions.Also for 32-Bit Octave on the RaspberryPi microcomputer under Raspbian.
Psychtoolbox R2015b support
Q: Does Psychtoolbox work with Matlab R2015b?
A: Yes, for Psychtoolbox versions 3.0.13 and later.
On older versions of Psychtoolbox, if you needed advanced OpenGL functionality through the mogl wrapper (calling OpenGL glXXX() functions directly), code failed on R2015b due to Matlab bugs. PTB 3.0.13 and later work around those Matlab bugs, so advanced OpenGL functionality works again.
Another limitation is that 'matlab -nojvm' mode, ie. running with Java JVM and desktoop GUI disabled, may make Psychtoolbox unusable due to another set of Matlab bugs, which prevent OpenGL from working.
One way to side-step many of these issues caused by Matlab bugs is to use the free GNU/Octave as a free and open-source Matlab replacement instead.
Virus?
Q: Why does my virus checker complain about the PTB-3 distribution on Windows?
I'm getting complaints about
A: If you see this then you use an outdated version of Psychtoolbox andshould upgrade to the latest beta release.
We used to ship the
netcat
tool (a normal utility that some scanners wereallergic to) to submit registration data with the PsychtoolboxRegistration
function. This feature that helps us in finding funding is now implementedusing pnet.mex
.Textures, Windows, Screens
Q: What's the difference between a texture, a window, and a screen?
See the article FAQ: Textures, Windows, Screens
Explanation of Screen('Flip')
timestamps
Q: What timing information does Screen('Flip') return?
See the article FAQ: Explanation of Flip Timestamps
Close stalled full-screen windows
Q: If my script aborts with an error, I'm left with a dead Psychtoolboxwindow that prevents me from accessing the Matlab command window. How can Iclose the window in case of an error?
See the article FAQ: Exit a Crashed Screen
Verbosity and Debug Level
Q: How do I control the debugging checks when Screen starts up?
See the article FAQ: Control Verbosity and Debugging
Blue or blank screen
Q: When I call
Screen('OpenWindow')
my screen turns blue or white andnothing happens anymore. What's wrong?A: A blue screen used to be the normal behaviour, nowadays it means you usean outdated copy of PTB. Nowadays you should get a graphical splash screen, ora black screen if visual debugging was disabled.
After the splash, the screen switches to your selected background color (asspecified in the
Screen('OpenWindow')
call) immediately, and your scripttakes control.Until your first call to
Screen('Flip', ..)
command to change it the screenstays blank. If it stays blank, your program may be stuck, waiting forsomething, or it might have terminated normally or abnormally (error).See FAQ: Exit a Crashed Screen for how to get out of a stalled Screen.
You can disable the startup screen, i.e., replace it by a black display untilcalibration is finished, by issuing the command
Screen('Preference', 'VisualDebuglevel', 3);
at the beginning of your script.See also the previous FAQ on verbosity and debugging.
A visual catalog of mods released on Custom Maid 3D 2's public uploaders. Cm3d2 custom character where to find. Oct 25, 2016 Hello everybody, I'm going to show you where and how to download and find mods for the amazing game called custom maid 3d 2 for pc using hongfire and a list to find great mods Called International.
Black PTB Window
Q: How do I make the initial screen black instead of white?
A: When PTB is first loading (running it's various checks, etc.) it fillsthe screen with a welcome screen. This can be a problem for experiments thatinvolve dark adaptation, or eye tracking.
To make this initial screen black instead of white, add this call at thebeginning of your main experiment code:
Screen captures of stimuli
Q: How do I take a screen shot of my stimuli?
See the article FAQ: Screenshots or Recordings
Image Transparency
Q: How to display images with transparent backgrounds?
A: It is possible in PTB to display PNG images with transparentbackgrounds. It requires your image to have an alpha channel.
- Save your image with a transparent background in PNG format and load it in Matlab.
image
is the usual[m x n x 3]
RGB image matrixalpha
is an[m x n x 1]
matrix with the transparency (alpha) channel- Stack the alpha layer on top of
image
as a 4th layerimagename(:,:,4) = alpha;
- You need to enable alpha blending, so the tranparency layer gets used,
Frozen Matlab Figure Windows
Q: How can I update Matlab figures during the experiment?
A: Use the
drawnow
Matlab command whenever you want Matlab to updateit’s figure windows. This forces Matlab to redraw the handle graphics.It is NOT recommended to use
drawnow
inside time critical loops (e.g., wherestimulus presentation is performed).Keyboard (and mouse) input functions
Q: Which function should I use for collecting keyboard (and mouse) input?
A: PTB offers quite a zoo of keyboard input functions, but which one to use best depends on the application scenario.
See the article FAQ: Processing keyboard input
Duplicate Offscreen Window
Q: How do you create a duplicate of an offscreen window?
A: You would first create an empty offscreen window of thesame size and color depth as your original offscreen window,then copy the original windows content into the new window:
Let
origWin
be the offscreen window you want to duplicate, thenMultiple Offscreen Buffers
Q: Can offscreen windows (created with
OpenOffScreenWindow
) havemultiple buffers?A: No. It wouldn't make sense to have multiple buffers, as this conceptrefers to what is currently being shown on the display. Offscreen windows arenot shown on the display but rather hold data that may be moved to a buffer ofa display window.
Global Setting of TextSize
Q: Is there any simple way to set
TextSize
(or other such parameters) forall windows/screens?A: No. You have to set it for each window via the
Screen('TextSize', win, ..)
command. But that's not much work, given that most people have at mosttwo windows.Performance and Timing tips
Q: How can I improve the drawing performance and timing of my PTB-3 code?
See the article FAQ: Performance Tuning
10-bit DACs
Q: Is it possible to get 10-bit DAC resolution with PTB-3?
See the article FAQ: 10-bit DACs
10-bit framebuffers
Q: What is the status of 10-bit frame buffer support?
See the article FAQ: 10-bit framebuffers
High Performance Video Playback
Q: How can I play back high-resolution high-speed video?
See the article FAQ: HD Video Playback
How to resolve GStreamer
problems:
Q: When trying to play movies with GStreamer, Matlab crashes or gives Buserrors! What can I do?
Star wars rebellion ship stats. Like at the start of every combat round you roll a die and if you roll a crit or lightsaber symbol you draw a space tactics card.
A: Some video codecs can cause bad interactions between Matlab’s JavaVMand GStreamer on Microsoft Windows. This is currently not a solvable problem,but various workarounds are possible:
- Try a different operating system. Linux is strongly recommended.
- Use GNU/Octave instead of Matlab on Windows.
- Run Matlab
-nojvm
mode, ie. with thematlab.exe -nojvm
command lineswitch.
TTL triggers
Q: How to send TTL triggers?
A: For a long time, the parallel port was used for sending triggers and it is possibly still the best option regarding timing. However, parallel port solutions are very platform-dependent and might not be available anymore anyway. So the next best is to use one of the numerous USB digital I/O interfaces (see below).
If only one or two trigger lines are needed, one can get away with a serial port and toggling the control lines using
If only one or two trigger lines are needed, one can get away with a serial port and toggling the control lines using
IOPort
. However, the electrical levels of a native serial port are not TTL-compatible, which normally is also true for USB-to-serial converters.- USB interface: FAQ: TTL Triggers via USB.
- Parallel port (Linux): method 1 (incl. Octave support) - Recommended in most cases or method 2 or method 3.
- Parallel port (Win 2k/XP/Vista/7): FAQ: TTL Triggers in Windows.
Issues with Windows
Q: Are there known issues with Windows Vista / 7 and how to resolve them?
See the article FAQ: Vista and Windows 7
Clock and Timer problems with Windows
Q: Psychtoolbox and
GetSecsTest
tell me my clock and timers are broken,What gives?See the article FAQ: GetSecs Test Fails
Mac 10.10 VBL Sync Issues?
Problem:
WARNING: Couldn't compute a reliable estimate of monitor refresh interval! Trouble with VBL syncing?!?! PTB - ERROR: SYNCHRONIZATION FAILURE ! ----
Try the following hack:
Switch resolutions within System Preferences --> Display Panel (Scaled). Select a different resolution then reselect the required/native resolution. Repeat this hack with each system restart.
Similar (and worse) errors are present in Mac OS 10.11, 10.12. On 10.10/10.11 almost all NVidia cards are unfixably broken wrt. reliable visual stimulation timing. On 10.12, additionally to the broken NVidia cards, many modern AMD cards are also broken. On 10.13, many (all?) Intel chips are broken as well, so that 10.13 'High Sierra' is essentially unusable for visual stimulation with trustworthy timing.
Use of Apple macOS is therefore strongly discouraged for actual research data collection if you value the quality and reproducibility of your scientific studies.
Add to the FAQ
Q: How do I add a FAQ & answer to this list?
A: It's pretty easy. Just follow the steps below.
- First you need to create a free GitHub account and log in to edit
- Secondly, this is a place to give answers, not to ask questions. Use theForumfor that. A FAQ is a place to list commonly requested answers, so they do notneed to be repeated time and time again.
- Next, go to the FAQ page (you are already here probably) and click theEdit button
- You can type short entries that keep coming up directly here on the FAQ page.Our format looks like this
- Longer explanations and example scripts should go on a new page and getlinked from the Cookbook
- You can choose your preferred markup syntax, but Markdown is preferred.