Part3. LED Magic
LED numeric display is the icon of HP classics. With just a single 5-bit register inserted, how could they design such a full-featured, flicker-free and properly PWM'd
Sorry for such a long quiescence. Originally I was planning to actually make a board that drives the LED display before writing anything. Unfortunately, since quarter a year ago, I'm completely occupied by all sorts of things, and the plan is delayed forever. I'll try if I'm free at some point in the future.
This is the first article written in the new "Gutenberg" WordPress editor. Noice!
(The top image is a part of an advertisement of HP calculators. Cropped to fit in.)
Section 1: Driving LEDs - The Hard Way
Let's begin with the most basic topic: how would you drive an LED?
LEDs are basically diodes that pop photon when you pump energy into their p-n junction. Without digging too much into semiconductor physics, we can depict its property with a simple model.
The right part is referred to as "the DC path", usually (unless you're using some special diodes such as the tunnel diode) we consider it to be directional (when reverse biased, there won't be any current through it). Solve the Vj - Ij relation yields the diode equation.
The left part is the AC path. Cj, which means Junction Capacitance, varies with the input voltage. This effect allows diodes to be used as voltage-controlled capacitors, which is usually utilized by variable frequency oscillators.
LEDs have very similar characteristics. Normally we consider the voltage drop of a forward-biased silicon diode to be 0.7V. LEDs usually have 1.2~4.0V drops.
Well, how to drive an LED? Ask a middle school pupil and you can get such an answer:
The LED works great, but there's an issue: If we do the math, the LED consumes 40mW, meanwhile, the 150Ω resistor consumes 60mW! What a bummer, normally when we're talking about plug-powered electronics, this is good enough. However, thinking about throwing away 60% of the energy in a handheld: This is unacceptable.
How about PWMing?
(For those who haven't heard about it, PWM(Pulse Width Modulation) means switching a voltage at high frequency (usually higher than 1kHz). By varying how much percent in a cycle the positive voltage is switched on (a term for this percentage is "DC" - Duty Cycle), in average the output can be seen as DC(in percent)*V. For example, if you drive a lamp with 100V at 50% DC, the brightness of the lamp, in theory, equals driving it with 50V constant voltage. )
I've seen many people PWM the diode with none or just a very small resistor. This method indeed solves the energy wasting issue. Although the LED won't die of heat damage, the periodic over driving is in all bad for the diode. It won't last long, so just don't do it this way. (Unless you have a super-tight price margin and still want to have fancy PWM dimming.)
Add a damper can average the PWM'd voltage out, giving a smooth output. This prevents destroying the LED by striking it with overcurrent over and over again.
(Click on the picture for a magnified view)
As we can see, now, when stabled the LED is driven by a 2.2V voltage. Its current wobbles but never exceeds 40mA. Since in theory, capacitors and inductors consume zero (real) power, the circuit is much more efficient.
This is actually the principle of DC-DC converters. If you introduce a feedback loop into the circuit, the rising time and stability can be further improved. There're many commercial available LED driver chips out there that follow the very same theory of operation. If you have some money to burn, or you're working on some serious business such as designing an LED driver for a vehicle. Check them out.
Section 2: Elegance - Simple Yet Comprehensive
Now let's see how HP approaches the problem of driving the display of its handhelds, an array of LEDs.
First thing first, the power distribution in an HP calculator is more complicated than modern products and is worth an additional article to elaborate. The fact that they had mixed more than three technologies in a single product means there are more than 5 voltages that may present!
Vbsw :Battery Voltage, ≈4V Vss :PMOS Positive Supply, 6.0V Vgg :PMOS Negative Supply, -12.0V Vcc :Kathode Driver Supply, +8.2V Gnd: 0V
The processor chips are PMOS logic. (Here I'm not going to talk about that in detail.) One thing to notice is that: in order to run these chips fast enough and can output enough energy, they had decided to drive it with 18V - a very high voltage (from Vgg(-12V) to Vss(+6V)), which seems crazy by today's standard but quite conventional in the early days.
The GND pin on these chips serves as a voltage clamping reference. In this way, they can generate a signal at the output of these PMOS chips that can be accepted by the bipolars. Internally the PMOS logic has nothing to do with this pin.
Now, let's focus on the display section:
The display drivers are bipolar integrated circuits that contain:
- hp 1820-0853 Anode Driver / Clock Oscillator /
Clock Divider ( 2-phase clock generator ) / Voltage Reference and Comparator. It runs between Gnd and Vbsw.
- hp 1820-0854 Kathode Driver. It runs between Vbsw and Vcc. This chip is floating.
- hp 1820-0855 Clock Amplifier /
Voltage Shifter (from TTL 0 ~ +4V to PMOS -12V ~ +6V)
We'll look into the chips later. Now take a look at the display matrix.
The design utilizes inductors as a current limit. At first, the Anode is switched on, current flows through L, accumulating magnetic energy in the inductor. Since this path is a low resistance path, only little energy is wasted, and there is no enough voltage to turn-on the LED. After the charging is done, the Anode is turned off. A flyback voltage across the inductor is generated and the current remains the same. Thence the LED turns on and shines for a brief 6us.
This design is very interesting, but not the best part. The true innovation lies in the process of how the register data is transferred and displayed. We begin by
Let's begin with the simplest one: The Kathode Driver. Complex as it may seem, it's basically just a shift register with an asynchronous reset signal 'START'. All outputs are in open-collector configuration. So an output of '1' means 'Turned off' while '0' means 'Turned on' & 'Current flows'.
At the negedge of CLOCK after the START signal, O15 is switched from 1 to 0. at the next CLOCK negedge, O15 returns 1 and O1 is switched from 1 to 0, and so on, and so on..
It looks more complicated, hold my beer.
The left most part contains a voltage reference and a voltage comparator. It compares the battery voltage with a 3.65V reference. When the battery drops below that voltage, the comparator outputs '0', and SDP is forced active. As a result all decimal points will light up as a low-battery indication.
The left-bottom-most part is an oscillator, which, when connected to the external LC or crystal circuits, forms an 800kHz clock generator. The clock is further divided into two phases as the system clock. (The PMOS dynamic logic utilizes a 2-phase clock).
ABCDE are data lines coming from the ARC. As is labeled. They transmit segment information of the digit that is being shown in a "multiplexed" fashion. (Not exactly, later I'll explain it in depth with a
The output lines Sx are active when the corresponding segment information appears on the ABCDE lines in the grey sections.
[ To be done... ]
Since the LED driver stores no information and is driven at the same speed as the digital system. The refresh rate of this display is very high (3.16kHz). No flicker can be seen, even under the worst operation conditions (such as high vibration, on-board environments.) No wonder why later HP models made their way to space without having any modification on the display.