TURN AN OLD TV INTO A STANDALONE LOGIC ANALYZER


By using a simple PIC16F84


4-input capture, up to 600 kspl/s

RETURN TO HOMEPAGE

This is a good way to reuse an old CRT color TV instead of trashing it (like many people do now), particularly if this TV is quite small and gives the opportunity to get a standalone (PC free) and portable equipment. A PIC 16F84 microcontroller is the main part of the hardware extension to be plugged onto the TV via the SCART socket or even mounted inside the TV
(like in my personnal example).





What does this quite simple hardware extension

The microcontroller handles all the required tasks:
- Signal change detection (trigger)
- 4-way signal capture in single shot mode
- RGB video signal generation (625 lines, commonly nicknamed "PAL") to display a grid with 4 colored signal traces

The trigger can be assigned to one selected channel or to anyone (the first change on any input triggers the capture). The "telltales" visible at the bottom of the screen allow to see what is the current capture rate (yellow telltales: 6 capture speeds possible), what is/are the triggering input(s), and if the analyzer is armed or triggered.

RGB signals are simply obtained with resistor networks connected to microcontroller output ports (see schematic) for being able to control with less software resources as possible the three separate RGB signals plus a soft grey (used for grid display) by controlling simultaneously with one port the three RGB components at a low level.



SCHEMATIC



Circuit overview


On the left side the 4 inputs I1-I4 are directly processed as digital inputs by the mircrocontroller after having been clipped for device robustness (logic level 0-5V, but device withstands up to +/-20V). Pull-down resistors prevent unused inputs from floating and causing wrong triggering while others are used.

The pushbutton "Arm" can be well identified, as well as "TRG SRC" which changes the triggering channel each time that it is pressed. Pushbutton "TIME/DIV" changes the capture rate (6 possible speeds) in the same way. The rocker switch "TRG DELAY" applies a trigger delay equal to one full screen, giving the possibility of exploring in two consecutive steps a logic sequence with a resolution equal to the double of the full sweep resolution, the latter is quite poor. This is not due to a memory lack but related to the execution speed which brings the time duration of a displayed trace dot at more than 1us. Since a video line allows approximately 52us of visible field, the resolution has been limited to 46 samples per capture.

On the right side the resistor network outputs are numbered according to the video SCART plug pining for operating in RGB mode. Only a 5V regulator is required as active component in addition to the microcontroller. The crystal that I've used is exactly 18.425MHz and corresponds to the minimum useable frequency. You can choose up to 20MHz but in that case you will have to edit the constant "CYCLEN" = [4/Frequency], expressed in nanoseconds, in the source code. However, if your crystal frequency does not exceed 19MHz you can use the HEX file as is for programming. CRT TV's are in fact quite tolerant to deviations from the exact video specifications. Anyway it is better to calibrate the capture rates (also depending from the crystal) by using a reference frequency source.




Checking


The circuit has to be used with a supply voltage of 9-15V. There is no particular set up to perform. However, some basic check with an oscilloscope will allow you to ensure that the synchronization signal "SYNC" (SCART 20) looks like a normal video signal before connecting to the TV. Then the rest is quite intuituive when starting using the different features.

Note: As you can see on the photo, traces are not starting at the same place. This does not mean that they are time-shifted but that the bottom ones have their first samples missing. This is the result of a trade-off while dealing with the microcontroller's execution speed...




Would you want to see other stuff like this ?


Return to HOME PAGE



Сайт создан в системе uCoz