Transformer Corner part 2

In Transformer Corner part 1, I introduced one of the key parts of the Oscilloclock – the HV transformer, and tried to illustrate some of the concepts and history behind it.

Next, let’s explore the Prototype’s power supply configuration. This will tell us a lot more about the transformer I had to wind!

Power supply design

My greedy little Oscilloclock wanted lots of different voltages…

Continue reading

Do chips have bugs?

There are probably many people who think that microcontrollers are bug-free. After all, they are glorified integrated circuits; a hard-wired jumble of infinitesimal transistor logic gates. There should be no unexpected behavior, as long as you operate the device within the rated voltage and temperature parameters….

Wrong!

What we tend to forget from our CPU architecture classes is that a CPU actually has a program inside. Known as microcode, its primary function is to interpret each instruction into the right electrical signals to drive the various parts of the CPU. For example, an addlw 0x7F instruction might involve directing the ALU’s input to the next word in program memory (0x7F), and then telling the ALU to add it to WREG, with output set back in WREG. The microcode for addwf MyVar would be different again; it needs to get a value in RAM, and set the result back there too.

Well, where there is a program, there will definitely be bugs.

My first experience with a microcontroller bug cost me several weekends of frustration, fretting, and frantic but fruitless rework. Here’s how it happened:

Oscilloclock Gone Wild

It was the early days of the Prototype, And things were looking great! My dream was coming to fruition! Except… every once in a while, the clock would go absolutely berserk. Seemingly at random, it would start displaying crazy, meaningless images, and controls would cease to function. Sometimes it would recover; other times, it would exhibit brain death – requiring a hard reset.

April Fool's? No - it's a PIC bug!

April Fool’s? No – it’s a PIC bug!

No amount of testing or experimentation could tell me what the problem was. I rewrote huge blocks of code. I removed massive chunks to simplify the code. I drank more and more coffee. Sleepless nights and grumpy days ensued, wasting my precious youth!

Continue reading

Circle Graphics – Lissajous figures

By the time you read this post, you must have seen the term “Circle Graphics” in a thousand places across the site.

In fact, “Circle Graphics” is not an official term – I just use it to describe how shapes are drawn on these clocks:

Everything you see on this screen is made up of CIRCLES! Blank out part of a circle and you get an arc. Squish an arc and you get a line. This clock simply draws circles, lines, and arcs of different sizes at various points around the screen. It does it quickly. And it does it very, very well!

The effect of using circles is beautiful – shapes are smooth and precise, with no jagged edges or pixelation.

Beautiful circles with no jagged edges

Making “perfect” circles

I carry on as if it were some incredible new concept or discovery, like the Higgs boson. But in fact, the analog technique of constructing perfect circles, ovals, and lines on a CRT is very, very old. These figures are really part of a class of shapes called Lissajous Figures.

Continue reading

Transformer Corner

The atmosphere at Oscilloclock.com has been charged lately. Mails have been pouring in from folks who want to generate high voltage for their CRT projects, but have instead ended up with high tension from frustrated attempts. The primary culprit? Lack of a decent HV transformer.

HV Transformer basics

CRTs require high voltage, to coax electrons out of the electron gun and then accelerate them towards their fiery demise at the screen. This voltage can range from hundreds of volts for small tubes, to tens of kilovolts for large tubes! In the case of the Prototype and Model 1 CRTs, around 3kV was needed.

My Oscilloclock needed 3kV to draw this!

Continue reading