HP35: A Bit-Serial Wonder - 3. LED Magic

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 display that has 15 digits?

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!

[Status: TBD]

(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.


A typical SPICE model of diodes, image provided by NI

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:

On the right is a simpler model of LED. Assuming a voltage drop of 2V across the LED, we will get 20mA on the LED, which is quite common.

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.

An Infineon solution that allows you to drive a string of LEDs with an up to 600V input. The chip compensates to generate a very stable current in the series of LEDs.

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:

Diagram
The test setup. Be aware! Many low-end logic analyzers can't accept such a voltage.
The one shown in the picture is taken from an HP45 - a later model. They're basically identical (except for the pin arrangement, which is a pain in the ass because they later redesigned one of the driver chips).

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 understand the operation of each chip that handles display.

Inside of -hp- 1820-0854 Kathode Driver

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..

Anode Driver - Functional Diagram

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).

Anode Driver - Waveform Diagram
(There're many typos in this pic they've provided 😉

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
captured waveform). 

Qx are internal timing signals. Them, together with the combination logic in the middle, give a lot of 'gating' signals (illustrated as grey regions on the Sx lines).

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.


Leave a Reply

Your email address will not be published. Required fields are marked *