Charlieplexing (also known as tristate multiplexing, reduced pin-count LED multiplexing, complementary LED drive and crossplexing) is a technique for accessing a large number of LEDs, switches, micro-capacitors or other I/O entities, using relatively few tri-state logic wires from a microcontroller. These I/O entities can be wired as discrete components, [1] [2] x/y arrays, [3] [4] or woven in a diagonally intersecting pattern to form diagonal arrays. [5]
The simplest way to address a single pixel (or input button) is to run a wire out to it and another wire back to ground, but this requires a lot of wiring. A slight improvement is to have everything return on a common ground, but this still requires one wire (and one pin on the microcontroller) for each pixel or button. For an X by Y array, X*Y pins are required.
With tri-state logic pins (high, low, disconnected), matrix wiring needs only X+Y pins and wires. Each X and each Y take turns being on vs being disconnected; the disadvantage is that each light is only powered at most 1/(X*Y) of the time. If there is enough Fan-out, the Y pins can be left always on, and all checked in parallel. The refresh can then happen every 1/X of the time, but the X wires each need to pass enough current to light up Y lights at once.
Charlieplexing is a further improvement on matrix wiring. Instead of X horizontal wires meeting Y vertical wires, every wire meets every other wire. Assuming diodes are used for the connections (to distinguish between wire 3 meeting wire 5 vs wire 5 meeting wire 3), Charlieplexing needs only about half as many pins as a conventional matrix arrangement, at the cost of more complicated mapping. Alternatively, the same number of pins will support a display nearly four times (doubling in both directions) as large.
This enables these I/O entities (LEDs, switches etc.) to be connected between any two microcontroller I/Os - e.g. with 4 I/Os, each I/O can pair with 3 other I/Os, resulting in 6 unique pairings (1/2, 1/3, 1/4, 2/3, 2/4, 3/4). Only 4 pairings are possible with standard x/y multiplexing (1/3, 1/4, 2/3, 2/4). Also, due to the microcontroller's ability to reverse the polarity of the 6 I/O pairs, the number of LEDS (or diodes) that are uniquely addressable, can be doubled to 12 - adding LEDS 2/1, 3/1, 4/1, 3/2, 4/2 and 4/3.
Although it is more efficient in its use of I/O, a small amount of address manipulation is required when trying to fit Charlieplexing into a standard x/y array.
Other issues that affect standard multiplexing but are exacerbated by Charlieplexing are:
The Charlieplexing technique was introduced [6] by Maxim Integrated in 2001 [7] as a reduced pin-count LED multiplexing scheme in their MAX6951 LED display driver. [7] [6] The name "Charlieplexing", however, first occurred in a 2003 application note. [6] It was named after Charles "Charlie" M. Allen, an applications engineer of MAX232 fame, [8] [9] [10] who had proposed this method internally.[ when? ]
Also in 2001, Don Lancaster illustrated the method as part of his musings about the "N-connectedness" problem, [11] referring to Microchip Technology, [11] who had already discussed it as "complementary LED drive technique" in a 1998 application note [12] and would later include it in a tips & tricks booklet. [13]
While Microchip did not mention the origin of the idea, they might have picked it up in the PICLIST, a mailing list on Microchip PIC microcontrollers, where, also in 1998, Graham Daniel [14] [15] proposed it to the community as a method to drive rows and columns of bidirectional LEDs. Daniel at the time had created simple circuits with PIC 12C508 chips driving 12 LEDs off 5 pins with a mini command set to set various lighting displays in motion. [14] [15]
The method, however, was known and utilized by various parties much earlier in the 1980s, and has been described in detail as early as in 1979 in a patent by Christopher W. Malinowski, Heinz Rinderle and Martin Siegle of the Department of Research and Development, AEG-Telefunken, Heilbronn, Germany for what they called a "three-state signaling system". [16]
Reportedly, similar techniques were already in use as early as 1972 for track signaling applications in model railroading. [17] [ citation needed ]
Display multiplexing is very different from multiplexing used in data transmission, although it has the same basic principles. In display multiplexing, the data lines of the displays are connected in parallel to a common databus on the microcontroller. Then, the displays are turned on and addressed individually. This allows the use of fewer I/O pins than it would normally take to drive the same number of displays directly. Here, each "display" could, for instance, be one calculator digit, not the complete array of digits.
With traditional multiplexing I/O pins can drive a maximum of LEDs, or listen to that many input switches. Charlieplexing can drive LEDs, or listen to buttons even if directionality is not enforced by a diode.
The Charlieplexing configuration may be viewed as a directed graph, where the drive pins are vertices and the LEDs are directed edges; there is an outward-pointing edge connected from each vertex to each other vertex, hence with n drive pins there are (n)(n-1) total edges. This equates to n pins being able to drive n2 − n segments or LEDs.
Pins | LEDs |
---|---|
2 | 2 |
3 | 6 |
4 | 12 |
5 | 20 |
6 | 30 |
7 | 42 |
8 | 56 |
9 | 72 |
10 | 90 |
11 | 110 |
12 | 132 |
13 | 156 |
14 | 182 |
15 | 210 |
16 | 240 |
20 | 380 |
24 | 552 |
32 | 992 |
40 | 1,560 |
48 | 2,256 |
56 | 3,080 |
64 | 4,032 |
n | n2 − n |
If the number of LEDs (L) is known, then the number of pins (n) can be found from the equation: , the result being rounded to the nearest whole number.
Example: If L = 57, then √L = 7.549, and 1 + √L = 8.549; the nearest whole number to this is 9, so 9 pins are needed to drive 57 LEDs (9 pins could drive up to 72 LEDs, but 8 pins could drive only 56 LEDs at most).
If L = 56, then √L = 7.483, and 1 + √L = 8.483; the nearest whole number to this is 8, so 8 pins are needed to drive 56 LEDs.
Unlike in a traditional x/y multiplexed array, where a sub-set of conductive elements crosses a different sub-set of conductive elements, in a "fully Charlieplexed" multiplexed array, each conductive element crosses every other conductive element.
Six (n) conductive elements in a standard x/y multiplexed array forms a maximum of nine ((n / 2)2) unique intersections (see figure on far left).
The other diagrams also show six (n) conductive elements, but here all six elements cross over themselves, forming a multiplexed array of 36 (n2) intersections. LEDs are shown placed at every intersection. However, each conductor also crosses itself at the diagonal. Horizontal conductor 1 crosses vertical conductor 1, horizontal conductor 2 crosses vertical conductor 2, etc. This means that six of these LEDs are short-circuited (e.g. D1 and D5 are short-circuited). The six (n) diagonal LEDs will, therefore, never light up, because no voltage can ever develop across them, so (n) has to be subtracted from the total. There is no point in installing these LEDs (they are simply included here for illustrative purposes).
This leaves 30 LEDs (n2 − n) that can be uniquely addressed and lit up independently.
Conductor "a" crossing conductor "b" is distinguishable from conductor "b" crossing conductor "a" because LED polarity is reversed. For example, when conductor 3 is positive and conductor 2 is negative, current flows through, and lights up LED D8, but when conductor 3 is negative and conductor 2 is positive, current flows through, and lights up LED D9.
These reverse polarity LED pairs are called complementary pairs. This diagram has 15 complementary pairs, allowing 30 LEDs to be lit independently.
The 6 unusable diagonal LEDs can be conveniently replaced by actual bidirectional shortcuts (so that there's no longer need to set up the interconnection lines grouped on the left and bottom of the diagrams, to drive the bottom input of vertical connectors from the matching left input of horizontal connectors).
By adjusting diagonally the form of horizontal and vertical connectors along the short-circuited main diagonal of the original matrix, this can be easily transformed into an array of 5 × 6 or 6 × 5 LEDs arranged on a regular grid.
A similar pattern could be used for a 10 × 11 matrix that could be used to drive up to 110 keys (including a few indicator LEDs) on a modern PC keyboard, where each key switch includes a small serial diode or LED, so that only 11 pins would be needed to individually control all of them (these individual diodes or LEDs inside each key switch would also avoid all common and undesirable "ghosting" effects, that are hard to eliminate completely when an arbitrary number of keys at any position are pressed at the same time).
Charlieplexing can also be used to significantly reduce the number of controlling pins for much larger matrixes, such as modern digital displays with high resolution. E.g. for a 4K RGB display at 3840 × 2160, this requires more than 8 millions individually addressable pixels, each featuring at least 3 colored LEDs or LCD cells, for a total of nearly 25 millions LEDs or LCD cells. Using a conventional x/y multiplexing would require at least (3840 + 2160 × 3) = 10320 controlling pins and many selection chips for controlling rows and columns all around the panel of LEDs or LCD cells. But with Charlieplexing, this can be reduced to only 63 controlling pins for the selection gate of display columns, plus 46 × 3 controlling pins for the selection and power-activation of RGB display rows, by a single transistor for each row or column (possibly with an extra common shielding ground to limit their mutual coupling); these controlling pins can easily fit around the output pins of one or two controller chips, even if we add the few additional pins needed on the controller for power, ground, clocks and I/O buses, surface-mounted with a high density and low cost on a single-layer PCB, and no need of complex routing and interconnection holes between layers; a dual layer is needed only for the basic Charlieplexing matrix mounted on borders of the panel itself.
Positions in the Charlieplexed matrix are not reduced to be just LEDs or diodes, they can be filled as well by two pins of a transistor (including its gate pin) so that its third pin is used as output to further control other devices, such as the horizontal and vertical selection lines of a large flat display panel (in that case, the two Charlieplexed matrices of transistors controlling and activating the rows or columns of the panel will be smartly arranged all along a border of that panel).
Charlieplexing in its simplest form works by using a diode matrix of complementary pairs of LEDs. The simplest possible Charlieplexed matrix would look like this:
By applying a positive voltage to pin X1 and grounding pin X2, LED 1 will light. Since current cannot flow through LEDs in reverse direction at this low voltage, LED2 will remain unlit. If the voltages on pin X1 and pin X2 are reversed, LED 2 will light and LED1 will be unlit.
The Charlieplexing technique does not actually make a larger matrix possible when only using two pins, because two LEDs can be driven by two pins without any matrix connections, and without even using tri-state mode. In this two-LED example, Charlieplexing would save one ground wire, which would be needed in a common 2-pin driver situation.
However, the 2-pin circuit serves as a simple example to show the basic concepts before moving on to larger circuits where Charlieplexing actually shows an advantage.
If the circuit above were to be expanded to accommodate three pins and six LEDs, it would look like this:
This presents a problem, however: In order for this circuit to act like the previous one, one of the pins must be disconnected before applying charge to the remaining two. If, for example, LED 5 was intended to be lit, X1 must be charged and X3 must be grounded. However, if X2 is also charged, LED 3 would illuminate as well. If X2 was instead grounded, LED1 would illuminate, meaning that LED 5 cannot be lit by itself. This can be solved by utilizing the tri-state logic properties of microcontroller pins. Microcontroller pins generally have three states: "high" (5 V), "low" (0 V) and "input". Input mode puts the pin into a high-impedance state, which, electrically speaking, "disconnects" that pin from the circuit, meaning little or no current will flow through it. This allows the circuit to see any number of pins connected at any time, simply by changing the state of the pin. In order to drive the six-LED matrix above, the two pins corresponding to the LED to be lit are connected to 5 V (I/O pin "high" = binary number 1) and 0 V (I/O pin "low" = binary 0), while the third pin is set in its input state.
In doing so, current leakage out of the third pin is prevented, ensuring that the LED wished to be lit is the only one lit. Because the desired LED reduces the voltage available after the resistor, current will not flow across alternate paths (an alternate 2-LED path exists for every pair of pins in the 3-pin diagram, for example), so long as the voltage drop in the desired LED path is less than the total voltage drop across each string of alternative LEDs. However, in the variant with individual resistors this voltage-regulating effect does not affect the alternative paths so all LEDs used will not have to be lit with half the supply voltage applied because this variant does not benefit from the voltage-regulating effect of the desired path LED.
By using tri-state logic, the matrix can theoretically be expanded to any size, as long as pins are available. For n pins, n(n − 1) LEDs can be in the matrix. Any LED can be lit by applying 5 V and 0 V to its corresponding pins and setting all of the other pins connected to the matrix to input mode. Under the same constraints as discussed above up to n − 1 LEDs sharing a common positive or negative path can be lit in parallel.
The 3-wire circuit can be rearranged to this near-equivalent matrix (resistors have been relocated).
This emphasizes the similarities between ordinary grid multiplex and Charlieplex, and demonstrates the pattern that leads to "the n-squared minus n" rule.
In typical usage on a circuit board the resistors would be physically located at the top of the columns and connected to the input pin. The rows would then be connected directly to the input pin bypassing the resistor.
The first setup in the image on the left is suitable only when identical LEDs are used since a single resistor is used for current-limiting through more than one LED (though not at the same time—rather, one resistor limits current through only one LED in a given column at one time). This is contrasted to the second configuration with individual resistors for each LED, as shown in the image on the right. In this second configuration, each LED has a unique resistor paired with it. This makes it possible to mix different kinds of LEDs by providing each with its appropriate resistor value.
In both of these configuration, as shown in both the left and the right image, the relocated resistors make it possible to light multiple LEDs at the same time row-by-row, instead of requiring that they be lit individually. The row current capacity could be boosted by an NPN emitter follower BJT transistor instead of driving the current directly with the typically much weaker I/O pin alone.
Refresh rate is not a problem if Charlieplexed Active matrix addressing is used with a Charlieplexed LED array. [18]
In common with x/y multiplexing, however, there can be refresh rate issues if passive matrix addressing is used.
Because only a single set of LEDs, all having a common anode or cathode, can be lit simultaneously without turning on unintended LEDs, Charlieplexing requires frequent output changes, through a method known as multiplexing. When multiplexing is done, not all LEDs are lit quite simultaneously, but rather one set of LEDs is lit briefly, then another set, and eventually the cycle repeats. If it is done fast enough, they will appear to all be on, all the time, to the human eye because of persistence of vision. In order for a display to not have any noticeable flicker, the refresh rate for each LED must be greater than the Flicker fusion threshold; 50 Hz is often used as an approximation.
As an example, 8 tri-state pins are used to control 56 LEDs through Charlieplexing, which is enough for 8 7-segment displays (without decimal points). Typically, 7-segment displays are made to have a common cathode, sometimes a common anode, but without loss of generality a common cathode is assumed in the following: All LEDs in all 8 7-segment displays cannot be turned on simultaneously in any desired combination using Charlieplexing. It is impossible to get 56 bits of information directly from 8 trits (the term for a base-3 character, as the pins are 3-state) of information, as 8 trits fundamentally comprises 8 log23, or about 12.7 bits of information, which falls far short of the 56 bits required to turn all 56 LEDs on or off in any arbitrary combination. Instead, the human eye must be fooled by use of multiplexing.
Only one 7-segment display, one set of 7 LEDs can be active at any time. The way this would be done is for the 8 common cathodes of the 8 displays to each get assigned to its own unique pin among the 8 I/O ports. At any time, one and only one of the 8 controlling I/O pins will be actively low, and thus only the 7-segment display with its common cathode connected to that actively low pin can have any of its LEDs on. That is the active 7-segment display. The anodes of the 7 LED segments within the active 7-segment display can then be turned on in any combination by having the other 7 I/O ports either high or in high-impedance mode, in any combination. They are connected to the remaining 7 pins, but through resistors (the common cathode connection is connected to the pin itself, not through a resistor, because otherwise the current through each individual segment would depend on the number of total segments turned on, as they would all have to share a single resistor). But to show a desired number using all 8 digits, only one 7-segment display can be shown at a time, so all 8 must be cycled through separately, and in a 50th of a second for the entire period of 8. Thus the display must be refreshed at 400 Hz for the period-8 cycle through all 8 segments to make the LEDs flash no slower than 50 times per second. This requires constant interruption of whatever additional processing the controller performs, 400 times per second.
Due to the decreased duty cycle, the current requirement of a Charlieplexed display increases much faster than it would with a traditionally multiplexed display. As the display gets larger, the average current flowing through the LED must be (roughly) constant in order for it to maintain constant brightness, thus requiring the peak current to increase proportionally. This causes a number of issues that limit the practical size of a Charlieplexed display.
All the outputs used to drive a Charlieplexed display must be tristate. If the current is low enough to drive the displays directly by the I/O pins of the microcontroller, this is not a problem, but if external tristates must be used, then each tristate will generally require two output lines to control, eliminating most of the advantage of a Charlieplexed display. Since the current from microcontroller pins is typically limited to about 20 mA, this severely restricts the practical size of a Charlieplexed display. However, it can be done by enabling one segment at a time. [19]
When using LEDs with different forward voltages, such as when using different color LEDs, some LEDs can light when not desired.
In the diagram above it can be seen that if LED 6 has a 4 V forward voltage, and LEDs 1 and 3 have forward voltages of 2 V or less, they will light when LED 6 is intended to, as their current path is shorter. This issue can easily be avoided by comparing forward voltages of the LEDs used in the matrix and checking for compatibility issues. Or, more simply, using LEDs that all have the same forward voltage. [11] [6]
This is also a problem where the LEDs are using individual resistors instead of shared resistors, if there is a path through two LEDs that has less LED drop than the supply voltage these LEDs may also illuminate at unintended times.
Charlieplexing can also be used to multiplex digital input signals into a microcontroller. The same diode circuits are used, except a switch is placed in series with each diode. To read whether a switch is open or closed, the microcontroller configures one pin as an input with an internal pull-up resistor. The other pin is configured as an output and set to the low logic level. If the input pin reads low, then the switch is closed, and if the input pin reads high, then the switch is open. [20]
One potential application for this is to read a standard (4 × 3) 12-key numeric keypad using only 4 I/O lines. The traditional row-column scan method requires 4 + 3 = 7 I/O lines. Thus Charlieplexing saves 3 I/O lines; however it adds the expense of 12 diodes, (since the diodes are only free when LEDs are used). A variation of the circuit with only 4 diodes is possible, [20] however this reduces the rollover of the keyboard. The microcontroller can always detect when the data is corrupt, but there is no guarantee it can sense the original key presses, unless only one button is pressed at a time. (However, it is probably possible to arrange the circuit so that if at most any two adjacent buttons are pressed, then no data loss will occur.)[ vague ] The input is only lossless in the 4-diode circuit if only one button is pressed at a time, or if certain problematic multiple key presses are avoided. In the 12-diode circuit, this is not an issue, and there is always a one-to-one correspondence between button presses and input data. However, there are so many diodes that are required to use the method (especially for larger arrays) that there is generally no cost savings over the traditional row-column scan method, unless the cost of a diode is only a fraction of the cost of an I/O pin, where that fraction is one over the number of I/O lines.
Projected capacitance touchscreens and keypads.
These do not use diodes but rely on the change in capacitance between crossing conductive tracks to detect the proximity of one or more fingers through non-conducting materials such as plastic overlays, wood, glass, etc. - even double glazing.
These tracks can be made from a wide range of materials, such as printed circuit boards, transparent Indium Tin oxide, insulation coated fine wire, etc.
The technology can range in size from very small, as in "fingerprint detectors", [21] to very large, as in "touch interactive video walls". Usually, a limit is imposed on the maximum width of an x/y wired touchscreen, because the horizontal track resistance gets too great for the product to function properly. However, a diagonally wired touchscreen (as described later in this section) does not have this problem.
There are no LEDs or diodes and, at any one time, only one I/O line is set as an output, the remaining I/O lines being set as high-impedance inputs or "grounded". This means that power requirements are very small.
In 2008, Dhananjay V. Gadre devised Gugaplexing, which is like Charlieplexing with multiple drive voltages. [22] [23]
In 2008, Guillermo Jaquenod's so called Chipiplexing adds emitter followers to boost the strength of the row drive allowing rows wider than a single microcontroller port could drive to be lit simultaneously. [24] [25]
In 2010, the Austrian chip manufacturer austriamicrosystems AG (named ams AG [nb 1] since 2012, and ams-OSRAM AG since 2020) introduced the multiplexing LED driver IC AS1119, [26] [27] followed by the AS1130 in 2011. [28] [29]
Also, the analog & mixed signal (AMS) [nb 1] division (named Lumissil Microsystems since 2020) of Integrated Silicon Solution Inc. (ISSI) introduced the IS31FL3731 in 2012 [30] [31] and the IS31FL3732 in 2015. [32] [33] [34] They all use a technique they call cross-plexing, a variant of Charlieplexing with automatic detection of open or shorted connections and anti-ghosting measures. [35]
In 2019, Micah Elizabeth Scott developed a method to use 3 pins to run 4 LEDs and 4 switches called Tucoplexing. [36]
Charlieplexing can even be used with pulse-width modulation to control the brightness of 12 LEDs with 4 pins. [37]
In the following Arduino code example, the circuit [38] [39] uses ATtiny 8-pin microcontroller which has 5 I/O pins to create a 7-segment display. Since a 7-segment display only requires control of 7 individual LEDs, we use 4 of the ATtiny I/O pins as Charlieplexed outputs (n (n - 1)), i.e. the 4 pins could be used to control up to 12 individual LEDs (here we just use 7 of them). Leaving the fifth I/O pin to be used as digital or analog input or another output.
// ATtiny code.// Reads analog (or digital) input from pin 4 and every time the input goes below a set threshold.// It counts one and displays the increase in count either by activating up one of four LEDs (or transistors)// or one of twelve Charlieplexed LEDs.// SET THESE VALUES:intthreshold=500;intmaxCount=7;////////////////////booleansensorTriggered=false;intcount=0;intsensorValue=0;longlastDebounceTime=0;// The last time the output pin was toggled.longdebounceDelay=50;// The debounce time; increase if the output flickers.////////////////////////////////////////////////////////////////////////////////voidsetup(){// Use pull-down for disabled output pins rather than pull-up to reduce internal consumption.for(intpin=0;pin<4;pin++){pinMode(pin,INPUT),digitalWrite(pin,LOW);}// Internal pull-up for enabled input pin 4.pinMode(4,INPUT),digitalWrite(4,HIGH);}////////////////////////////////////////////////////////////////////////////////voidloop(){testDigits();}voidtestDigits(){charlieLoop();}////////////////////////////////////////////////////////////////////////////////voidreadSensor(){sensorValue=analogRead(2);// pin4!delay(100);if(sensorValue<threshold&&sensorTriggered==false){sensorTriggered=true;count++;if(count>maxCount)count=0;charlieLoop();}if(sensorValue>threshold)sensorTriggered=false;}////////////////////////////////////////////////////////////////////////////////voidcharlieLoop(){count++;for(inti=0;i<1000;i++){for(intc=0;c<count;c++){charliePlexPin(c);}}delay(1000);if(count>maxCount)count=0;}////////////////////////////////////////////////////////////////////////////////voidcharliePlexPin(intmyLed){// Make sure we don't feed random voltages to the LEDs// during the brief time we are changing pin voltages and modes.// Use pull-down for disabled output pins rather than pull-up to reduce internal consumption.for(intpin=0;pin<4;pin++){pinMode(pin,INPUT),digitalWrite(pin,LOW);}// With 4 pins we could lit up to 12 LEDs, we use only 7 here.// Make sure to set pin voltages (by internal pull-up or pull-down)// before changing pin modes to output.#if 1 // Reduced code using a static lookup table.typedefstruct{// Two different pin numbers (between 0 and 3; order is significant),// otherwise no led will be lit.low,high:int:2;}Pins;staticPinspinsLookup[]={{2,0},{2,3},{1,3},{0,1},{1,0},{0,2},{1,2},// Other possible combinations for up to 12 LEDs:// {0, 3}, {2, 1}, {3, 0}, {3, 1}, {3, 2},// Other unusable combinations that don't lit any LED with a significant voltage and current,// unless pull-up or pull-down resistances are very unbalanced:// {0, 0}, {1, 1}, {2, 2}, {3, 3}};if(myLed>=0&&myLed<=sizeof(pinsLookup)/sizeof(Pins)){registerPins&pins=pinsLookup[myLed];// Note that the first digitWrite to LOW is commented out,// as it is already set above for all output pins./* digitalWrite(pins.low, LOW), */pinMode(pins.low,OUTPUT);digitalWrite(pins.high,HIGH),pinMode(pins.high,OUTPUT);}#else // Equivalent code using a long switch.switch(myLed){case0:/* digitalWrite(2, LOW), */pinMode(2,OUTPUT);digitalWrite(0,HIGH),pinMode(0,OUTPUT);break;case1:/* digitalWrite(2, LOW), */pinMode(2,OUTPUT);digitalWrite(3,HIGH),pinMode(3,OUTPUT);break;case2:/* digitalWrite(1, LOW), */pinMode(1,OUTPUT);digitalWrite(3,HIGH),pinMode(3,OUTPUT);break;case3:/* digitalWrite(0, LOW), */pinMode(0,OUTPUT);digitalWrite(1,HIGH),pinMode(1,OUTPUT);break;case4:/* digitalWrite(1, LOW), */pinMode(1,OUTPUT);digitalWrite(0,HIGH),pinMode(0,OUTPUT);break;case5:/* digitalWrite(0, LOW), */pinMode(0,OUTPUT);digitalWrite(2,HIGH),pinMode(2,OUTPUT);break;case6:/* digitalWrite(1, LOW), */pinMode(1,OUTPUT);digitalWrite(2,HIGH),pinMode(2,OUTPUT);break;}#endif}////////////////////////////////////////////////////////////////////////////////voidspwm(intfreq,intpin,intsp){// Call Charlieplexing to set correct pin outs:// on:digitalWrite(pin,HIGH);delayMicroseconds(sp*freq);// off:digitalWrite(pin,LOW);delayMicroseconds(sp*(255-freq));}
Transistor–transistor logic (TTL) is a logic family built from bipolar junction transistors. Its name signifies that transistors perform both the logic function and the amplifying function, as opposed to earlier resistor–transistor logic (RTL) and diode–transistor logic (DTL).
AVR is a family of microcontrollers developed since 1996 by Atmel, acquired by Microchip Technology in 2016. These are modified Harvard architecture 8-bit RISC single-chip microcontrollers. AVR was one of the first microcontroller families to use on-chip flash memory for program storage, as opposed to one-time programmable ROM, EPROM, or EEPROM used by other microcontrollers at the time.
In digital logic, an inverter or NOT gate is a logic gate which implements logical negation. It outputs a bit opposite of the bit that is put into it. The bits are typically implemented as two differing voltage levels.
The MSP430 is a mixed-signal microcontroller family from Texas Instruments, first introduced on 14 February 1992. Built around a 16-bit CPU, the MSP430 was designed for low power consumption, embedded applications and low cost.
In electronics, a linear regulator is a voltage regulator used to maintain a steady voltage. The resistance of the regulator varies in accordance with both the input voltage and the load, resulting in a constant voltage output. The regulating circuit varies its resistance, continuously adjusting a voltage divider network to maintain a constant output voltage and continually dissipating the difference between the input and regulated voltages as waste heat. By contrast, a switching regulator uses an active device that switches on and off to maintain an average value of output. Because the regulated voltage of a linear regulator must always be lower than input voltage, efficiency is limited and the input voltage must be high enough to always allow the active device to reduce the voltage by some amount.
In electronics, a Schmitt trigger is a comparator circuit with hysteresis implemented by applying positive feedback to the noninverting input of a comparator or differential amplifier. It is an active circuit which converts an analog input signal to a digital output signal. The circuit is named a trigger because the output retains its value until the input changes sufficiently to trigger a change. In the non-inverting configuration, when the input is higher than a chosen threshold, the output is high. When the input is below a different (lower) chosen threshold the output is low, and when the input is between the two levels the output retains its value. This dual threshold action is called hysteresis and implies that the Schmitt trigger possesses memory and can act as a bistable multivibrator. There is a close relation between the two kinds of circuits: a Schmitt trigger can be converted into a latch and a latch can be converted into a Schmitt trigger.
Resistor–transistor logic (RTL), sometimes also known as transistor–resistor logic (TRL), is a class of digital circuits built using resistors as the input network and bipolar junction transistors (BJTs) as switching devices. RTL is the earliest class of transistorized digital logic circuit; it was succeeded by diode–transistor logic (DTL) and transistor–transistor logic (TTL).
An opto-isolator is an electronic component that transfers electrical signals between two isolated circuits by using light. Opto-isolators prevent high voltages from affecting the system receiving the signal. Commercially available opto-isolators withstand input-to-output voltages up to 10 kV and voltage transients with speeds up to 25 kV/μs.
The 555 timer IC is an integrated circuit used in a variety of timer, delay, pulse generation, and oscillator applications. It is one of the most popular timing ICs due to its flexibility and price. Derivatives provide two or four timing circuits in one package. The design was first marketed in 1972 by Signetics and used bipolar junction transistors. Since then, numerous companies have made the original timers and later similar low-power CMOS timers. In 2017, it was said that over a billion 555 timers are produced annually by some estimates, and that the design was "probably the most popular integrated circuit ever made".
A general-purpose input/output (GPIO) is an uncommitted digital signal pin on an integrated circuit or electronic circuit board which may be used as an input or output, or both, and is controllable by software.
In digital electronics, a tri-state or three-state buffer is a type of digital buffer that has three stable states: a high output state, a low output state, and a high-impedance state. In the high-impedance state, the output of the buffer is disconnected from the output bus, allowing other devices to drive the bus without interference from the tri-state buffer. This can be useful in situations where multiple devices are connected to the same bus and need to take turns accessing it. Systems implementing three-state logic on their bus are known as a three-state bus or tri-state bus.
This article illustrates some typical operational amplifier applications. A non-ideal operational amplifier's equivalent circuit has a finite input impedance, a non-zero output impedance, and a finite gain. A real op-amp has a number of non-ideal features as shown in the diagram, but here a simplified schematic notation is used, many details such as device selection and power supply connections are not shown. Operational amplifiers are optimised for use with negative feedback, and this article discusses only negative-feedback applications. When positive feedback is required, a comparator is usually more appropriate. See Comparator applications for further information.
An electronic symbol is a pictogram used to represent various electrical and electronic devices or functions, such as wires, batteries, resistors, and transistors, in a schematic diagram of an electrical or electronic circuit. These symbols are largely standardized internationally today, but may vary from country to country, or engineering discipline, based on traditional conventions.
Diode logic constructs AND and OR logic gates with diodes and resistors.
Open collector, open drain, open emitter, and open source refer to integrated circuit (IC) output pin configurations that process the IC's internal function through a transistor with an exposed terminal that is internally unconnected. One of the IC's internal high or low voltage rails typically connects to another terminal of that transistor. When the transistor is off, the output is internally disconnected from any internal power rail, a state called "high-impedance" (Hi-Z). Open outputs configurations thus differ from push–pull outputs, which use a pair of transistors to output a specific voltage or current.
In electronics, an LED circuit or LED driver is an electrical circuit used to power a light-emitting diode (LED). The circuit must provide sufficient current to light the LED at the required brightness, but must limit the current to prevent damaging the LED. The voltage drop across a lit LED is approximately constant over a wide range of operating current; therefore, a small increase in applied voltage greatly increases the current. Datasheets may specify this drop as a "forward voltage" at a particular operating current. Very simple circuits are used for low-power indicator LEDs. More complex, current source circuits are required when driving high-power LEDs for illumination to achieve correct current regulation.
Multiplexed displays are electronic display devices where the entire display is not driven at one time.
The Infineon XC800 family is an 8-bit microcontroller family, first introduced in 2005, with a dual cycle optimized 8051 "E-Warp" core. The XC800 family is divided into two categories, the A-Family for Automotive and the I-Family for Industrial and multi-market applications.
A gate driver is a power amplifier that accepts a low-power input from a controller IC and produces a high-current drive input for the gate of a high-power transistor such as an IGBT or power MOSFET. Gate drivers can be provided either on-chip or as a discrete module. In essence, a gate driver consists of a level shifter in combination with an amplifier. A gate driver IC serves as the interface between control signals and power switches. An integrated gate-driver solution reduces design complexity, development time, bill of materials (BOM), and board space while improving reliability over discretely-implemented gate-drive solutions.
The Arduino Uno is an open-source microcontroller board based on the Microchip ATmega328P microcontroller (MCU) and developed by Arduino.cc and initially released in 2010. The microcontroller board is equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to various expansion boards (shields) and other circuits. The board has 14 digital I/O pins, 6 analog I/O pins, and is programmable with the Arduino IDE, via a type B USB cable. It can be powered by a USB cable or a barrel connector that accepts voltages between 7 and 20 volts, such as a rectangular 9-volt battery. It has the same microcontroller as the Arduino Nano board, and the same headers as the Leonardo board. The hardware reference design is distributed under a Creative Commons Attribution Share-Alike 2.5 license and is available on the Arduino website. Layout and production files for some versions of the hardware are also available.
[…] This unusual multiplex technique is used by the MAX6950, MAX6951, MAX6954, MAX6955, MAX6958, and MAX6959 LED display drivers. […] Charlie Allen originally championed this technique internally at Maxim, and so the shorthand name "Charlieplexing" came into use to distinguish reduced pin count multiplexing from the traditional method. The first Maxim product to use Charlieplexing is the Maxim MAX6951 LED driver, which drives 8 numeric digits with only 9 pins […](4 pages)
[…] The MAX232's success was as much a tribute to the vision of its definer, Charlie Allen, as it was to the ingenuity of its designer, Dave Bingham. […]
[…] The launch of the MAX232 family is particularly insightful. Charlie Allen, a brilliant, customer focused, applications engineer, noticed that our customers were using a product called the ICL7660, which Dave [Bingham] also designed, to provide the negative power supply for RS-232 line drivers and receivers. So, Charlie approached Dave, and asked Dave if he could design an IC that integrated the functionality of the ICL7660 with an RS-232 line driver and receiver. […]
{{cite magazine}}
: Cite uses generic title (help)[…] Only 18 lines are required to drive all 144 LEDs. This is accomplished with austriamicrosystems' multiplexing technique called cross-plexing. This allows reducing the line count on the PCB as well as fewer pins on the connectors, saving space & costs. […] Other features include […] open and shorted LED error detection […](NB. Announcement of the AMS AS1119.)
[…] Only 12 lines are required to drive all 132 LEDs. This is accomplished with austriamicrosystems' multiplexing technique called cross-plexing. It reduces line count on the PCB as well as pins on the connectors, saving space & costs. Other features include […] open and shorted LED error detection […](NB. Announcement of the AMS AS1130.)
[…] Die möglichen Ghosting-Effekte und Probleme mit offenen LEDs haben die Verbreitung der Charlieplexing-Topologie in der Vergangenheit stark gebremst. Eine »Crossplexing« genannte Verbesserung des Verfahrens verspricht nun, die Nachteile des bisherigen Verfahrens zu eliminieren […] Die Kurzschluss- und Defekterkennung des ICs beruht […] auf der Vorwärtsspannung der in der Matrix verwendeten LEDs. Das Bauelement bestimmt eine optimale Spannungsschwelle für Defektsituationen und konfiguriert sie automatisch. Die Kenntnis der Position eines Kurzschlusses oder Defekts eliminiert natürlich noch nicht die Ghosting-Effekte. Wird jedoch eine Unterbrechung festgestellt, kann das System die Koordinaten des Defekts abspeichern. […] Jedes Mal, wenn der Treiber angewiesen wird, diese LED anzusteuern, wird diese Instruktion ignoriert. Diese Maßnahme vermeidet das unbeabsichtigte Aufleuchten von LEDs im Rest des Punktmatrixdisplays. […]