Teletext In-Vision Decoder with STV5348

PCB!


Here we have a teletext decoder built with and Arduino, STV5348 IC and a few other bits and pieces.

First of all, why the STV5348? Well, it's cheap, easily available, doesn't require any RAM or other complimentary chips and requires only a few external components.

Note that it outputs an RGB signal, so if you plan on using it with an old TV or something that doesn't support RGB you'll need to use/build a converter. I built this circuit a few years ago for another project and used it again to convert the RGB signal to Composite video.

The PCB

I just used the 'Application Diagram' in the Datasheet. I used 2 56pf caps for the Crystal, but I've no way of testing the frequency and get some strange issues so you might want to adjust this. More about this below.

I made a lot of mistakes on this PCB! The mounting holes aren't grounded properly, the resistors are too small and the keyboard socket is upside down! However, it works. More or less.

I purposely have two video inputs on the PCB so that I have the choice of a BNC or RCA connector. Or both. Next, I could have put a micro controller IC on the board, but I decided to just use an Arduino Nano for a variety of reasons, namely cost, time, ease of programming, space, availablity... need I say more? I could have used surface mount componets on this board, but there seemed little point as STV5348s in surface mount form are, as far as I can tell, rarer and dearer. Also through-hole is WAY easier to work with.

I should really have left the option to change some of the option pins, but as it is they are permanently set now!

The RGB output pots are very useful for adjusting colour. It often has to be adjusted for different devices, so it's very handy to have them on the main PCB. Incidentally, the PCB is designed to connect to a seperate RGB to PAL converter, stay tuned to see how it works out!

Software

It took me a while to work out the software, but I've implemented a page calling function. The current software sets the IC up as a master, outputting sync on pin 5 for the RGB converter. It always calls P100 on startup. It is technically possible to have it read the 'initial page' from packet 8/30, but I haven't written this yet. Mainly because I can't be bothered, but also because I don't think there were many services that didn't use P100 as their initial page anyway. You can also toggle line 24 on/off for In Vision decoding, as well as the cursor, should it be required.

My board is set up to be controlled by a PS/2 keyboard. Technically it would be possible to use a USB keyboard but they require much more circuitry. One of my main goals was to imitate the old MRG systems decoder the BBC used for Pages from Ceefax. Unfortunately I know next to nothing about it, but here's how mine works: Page numbers are entered via the numeric keypad. Each number appears as typed in red in the top left-hand corner. But, unlike a domestic receiver, my decoder will not initiate a page search until the 'Enter' button is pressed. If the page number is valid, it turns green and the search begins. Other keyboard funtions include toggling line 24 on/off, magnifying the top/bottom half of the page and fastext links. All 6 of them.

Issues

I'm getting some rather strange behaviour from the circuit from time to time, it often acts as if it's not getting a great signal and messes up the pages. I can think of a few reasons why this may be.
Bad Teletext Signal. It's perfectly possible that it's not getting a good signal, whether because of my inserter equipment or dodgy video leads. This seems unlikely to me however, as everything else that needs to decode it does so without a problem.
Bad Oscillator Frequency. Maybe the clock frequency is incorrect, whether because of a bad crystal or incorrect load capacitance. Very possible, but very hard to diagnose as my oscilloscope doesn't go up to 13 MHz so I can't really check it.
Interference. Perhaps there's interference getting into the IC and messing something up that way. Again possible but I think unlikely.

Alternate Uses

This PCB could be used as a 'video card' for an arduino, or anything that can control I2C. For example, I think it could make a very cool text editor. The keyboard is already there and everything! How about a status display for an embedded system? A few I2C commands aren't heavy on system resources! The only limitation is that you can't overwrite the 7th character on the first line, which is unfortunate.

Coming Up

I'll eventually be building a 'finished product' in a nice rackmount case. When that finally happens I'll document it here!

Download the Arduino library and example sketch here