You are on page 1of 10

Dreiske and Benjamin: Using One-Chip Microprocessor for TV Tuning and Remote Control

47

USING A ONE-CHIP MICROPROCESSOR FOR TV TUNING AND REMOTE CONTROL


Erwin J. Dreiske Curtis Mathes Mfg. Co. Athens, Texas 75751 Robert P. Benjamin Roben and Associates Dallas, Texas 75234

INTRODUCTION
While many types of electronic tuning systems have been suggested and tried and several are being produced and sold, all have been custom designs; dedicated I.C.'s having long design cycles and costly tooling. By the time the TV manufacturer receives the first sample custom I.C.'s he may discover that the features originally proposed are no longer popular. The long-term investment, however, forces him to go into production with an obsolete design. The solution to these problems is the use of a microprocessor. Until recently microprocessors have been too expensive for use in television receivers. Prices have been steadily decreasing and with the introduction of the new single-chip microprocessors the application is now economically attractive.

CHOOSING A MICROPROCESSOR
There are many microprocessors now available and the proper choice for a TV tuning system depends on A typical 4-bit microwave oven several factors. controller may not come close to having the power or features required for a TV controller. On the other hand a high powered 16-bit multi-chip micro computer would not be cost effective for our application.

Other factors which will determine the choice of a microprocessor are cost, second sourcing, availability of software development support, power consumption and number and voltage of supplies required. The processor should have a sufficient number of input and output lines to effectively interface with keyboard or touch panel, remote input, channel number indicator, outboard RAM, tuning voltage converter, volume control, fine tuning inputs, customer programming switch, AFT defeat, power onoff relay and factory setup functions. For our TV controller we chose the single-chip 8-bit NMOS microprocessor shown in Figures 1 and 2. It has an on-chip clock which can be used with It also an external 3.58 MHz. TV chroma crystal. has a built-in interval timer. This is very important for remote control decoding and for slowing down the output functions to interface with human response times. Typical examples of these are volume control stepping speed, fine tuning, channel number setup and sequential channel selection. DEFINING THE TASKS
Designing with a microprocessor can become a never-ending project unless the tasks to be performed are well defined at the outset. Unless they are kept in check, programs tend to expand to fill the available memory space. The freedom and flexibility afforded by using a microprocessor continually spark the imagination and new tasks are discovered every day. This is sometimes referred to as the "what if" (What if we programed it to start the syndrome. morning coffee? Etc. Etc.)
In our case the following functions and tasks were required: Generate and store varactor tuning voltages for twenty channels. Access each of the 20 channels with a single touch from the front panel or from the remote control transmitter.

Fig. 1.

Chip layout for a typical microprocessor integrated circuit.

Reevd January 4,1978

0098-3063/78/0200-0047$00.75 1978 IEEE

48

IEEE Transactions on Consumer Electronics, Vol. CE-24, No. 1, February 1978

Fig. 2.

Block diagram of the microprocessor of Figure 1.

an easy method of fine tuning and a precision automatic step fine tuning. Provide a precision step volume control and single-touch volume muting.

ranges.) Provide the system sequential Provide

Display true channel numbers at the set and have the numbers easily changed by the customer. Channel access to be-both random and sequential via either remote or local control. (This feature would allow a variety of models and price
a means for the customer to program to skip undesired channels when using

rate that allows a scanning or polling of input signals. It performs the necessary logical operations to control the TV tuning functions.

access.

We may therefore view the microprocessor or microcontroller as a black box that has a number of input signals that are sensed and in turn produce a number of output control signals after suitable processing. The computations performed are largely logical The proand not so much computational in nature. grammers task is then more akin to logic design than might be expected. The firmware really refers to a series of logical instructions contained in a ROM (read only memory) that controls the sensing of input lines by input instructions and produces output signals appropriately. The discipline of generating the ROM program is clearly related to the task of designing custom logic circuitry, but it is also basically a computer programming task.

A block diagram of the on-set portion of the system is shown in Figure 3.

FIRMWARE DEVELOPMENT
The single integrated circuit microprocessor as used in this TV controller application is basically an economical replacement for a custom logic system.

It would have taken about 75 to 100 digital integrated circuits to implement the same functions performed by the microprocessor. The microprocessor is particularly suited in this application since the speed requirements need only be comparable to the human operators ability to issue commands and his requirement for timely response. By what we refer to here as firmware control the logic functions are performed sequentially but at a

task, we arrange are presented to and arrange that or be connected

Rather than designing custom circuits for the first that the signals to be sensed input lines to the microprocessor output lines from the microprocessto the circuits to be controlled.

After this important task, we must then generate the code for the ROM's that produce the desired transfer functions.
Practically, the logic designer using this apIn general he is beproach needs some new tools. coming a computer programmer at least at the logic

Dreiske and Benjamin: Using One-Chip Microprocessor for TV Tuning and Remote Control

49

40 C,J
I-

30

Ie

Fig. 3.

Logic diagram showing simple circuitry used to interface a microprocessor with a television receiver.

so

IEEE Transactions on Consumer Electronics, Vol. CE-24, No. 1, February 1978

level. Some form of language is required. An emulator is required for testing. Also some practical aids are required for quickly generating changes to the ROM coding.
The ROM coding which is a sequence of data input, data output, Boolean, and arithmetic instructions Also critical timing must be generated and tested. functions must be included to produce the desired temporal response to the user.
The designer first familiarizes himself with the basic instruction set of the microprocessor chosen. This can be done to a certain extent by studying the manufacturers literature. The real expertise in refinement comes in the implementation process.
It is generally accepted that the instruction coding cannot practically be generated on paper to be committed to mask programming. Some form of test bed is needed. In our case, a breadboard system was implemented that allowed the ROM programs to be loaded into RAM (random access memory) to allow experimentation. The designer then needs an emulator which simuA means is lates the single chip microprocessor. A needed to load the trial firmware into memory. means is also required to modify this memory content and to debug the program.

and outputting of signals. The microprocessor programmer then uses a text editor on some higher level processor to generate what is called source code. In our case we use a floppy disk based microcomputer The designer enters with a keyboard/CRT terminal. such statements as "INS 0" to input the 8 signal lines on I/O port zero to a central accumulator regThere is a binary code that corresponds to ister. this statement, but he need not concern himself with this at present. He continues with other statements that are Boolean or arithmetic in nature as well as programmed conditional branch instructions. Also included are output instructions which produce the de-

sired control.

This source code is simply a somewhat English language notation of the processes to be performed.
The source code is then processed through an assembler in the software development system. This produces what is referred to as a listing, and produces a file referred to as object code. The object code which consists of the actual machine instructions is loaded into the emulator RAM for testing and later becomes the actual firmware used for mask

IDLE LOOP

TO REMOTE

SUBROUTINE

TO LOCAL SUBROUTINE

Fig. 4.

Microprocessor emulator board uses ultra-violet eraseable ROM.

TO FINE TUNE SUBROUTINE

The emuTator with its attendant capability is the first tool required. Another tool which is practically required is a software development system. It is the requirement for, and understanding of these tools that causes a step function in the changeover from logic design to microprocessor implementation. This is a step that is not always practical to take Outside services are often at a smaller company. employed at this phase to take advantage of both the capital equipment and experience that someone else has gained in the application of a particular microprocessor. To appreciate the process involved we review the basic steps in the so-called firmware development.

First, flow charts or some other logical notation is generated to define the inputting, processing,

Fig. 5.

Partial flow chart shows operation of the processor when no inputs are active.

Dreiske and Benjamin: Using One-Chip Microprocessor for TV Tuning and Remote Control
0378 O1B3 29 00 CO SCANP JmP SCAN * THERE IS A NEW CHARACTER FROM REMOTE 0379 * CALL FOR MATCHING CODE WITHIN 200 MSEC. 0380 0381 01B6 28 05 56 REMOTE PI GETREM JUMPS SCAN IF FAIL * CONVERT THE CODE THROUGH TABLE 0382 PROCES LISL 0383 OIB9 6E 6 0384 OIBA 71 LIS I 0385 O1BB SC LR SPA REMOTE BEING PROCESSED 0386 OIBC 6B LISL 3 NEW REMOTE C(ODE 0387 OIBD 4C LR A,S REMOTE CODE 0388 OIBE 2A 03 52 DCI REMTBL 0389 OICI 8E LOC ADC 0390 OIC2 16 LM GET RAM-DAC CODE + SPECIALS * IS IT CHANNEL CODE ? 0391 0392 * IF NOT P CHECK FOR OTHER FUNCTIONS 0393 OIC3 55 LR 5. A SAVE FOR GETI MEM 0394 O1C4 25 13 CI H'13' *** 14 FOR VI OLUME TEST *** 0395 O1C6 91 06 BM SPECL 0396 O0C8 28 03 12 P1 CHNL CHANGE CHANNIEL 0397 OCB 90 E7 BR SCANP 0398 OICD 66 SPECL LISU 6 0399 OICE 69 LISL 1 POINT TO VOLIUME FOR LATER 0400 OICF 25 15 CI H ' 15' 0401 OlDI 84 29 BZ VOLUP 0402 01D3 25 16 CI H'16' 0403 OID5 84 28 BZ VOLDWN 0404 OlD7 25 18 CI H'18' 0405 01D9 84 3F BZ PWRON 0406 O1DB 25 19 CI H'19' 0407 OIDD 84 4E BZ PWROFF 0408 OIDF 25 17 CI H'17' 0409 OIEl 94 55 BNZ TSTLNK * 0410 IF VOLUME NOT ZERO, SET TO ZERO 0411 IF ZERO, USE LAST VOLUME * 0412 OIE3 A4 MUTE INS 4 GET CURRENT NVOL UME 0413 O1E4 21 3E NI H'3E' VOL. BITS 0414 O1E6 84 10 BZ GETVOL 0415 O1E8 70 CLR FOR LOW VOLUF M E 0416 O1E9 50 LR O,A 0417 OIEA A4 TOGVOL INS 4 0418 OIEB 21 C1 NI H'CI' SAVE OTHER BJ ITS 0419 OIED CO AS 0 0420 OIEE 23 00 XI 0 FOR INVERSIOF N 0421 OlFO B4 OUTS 4 0 422 OIFI 20 FF LI H'FF' REPEAT DELAY 0423 O1F3 50 LR O,A 0424 O1F4 29 00 89 JmP TSCAN 0425 OIF7 4C GETVOL LR A.S ISAR AT 61 0426 OIF8 50 LR O,A 0427 OlF9 90 FO BR TOGVOL 0428 OIFB 72 VOLUP LIS 2 0429 O1FC 90 03 BR CHANGE 0430 OIFE 20 FE VOLDWN LI H'FE' 0431 0200 5A CHANGE LR 10,A CHANGE FOR VCOLUME 0432 0201 4C LR A,S ISAR IS 61 0433 0202 CA AS 10 MODIFY VOLUMEE WORD 0434 0203 91 I AF BM SCANP 0435 0205 25 3E CI H '3E FULL VOLUME 0436 0207 81 03 BP VOLOK ONLY 0-iF VALL I D 0437 0209 90 A9 BR SCANP NO VOL CHANGEE 0438 * SAVE THE NEW VOLUME 0 439 020B SC VOLOK LR SPA 0440 * OUTPUT THE NEW VOLUME * 0441 020C A4 INS 4 0442 020D 21 Cl NI PE RESERVE OTHER BITS H'CI '

51

Fig. 6.

Typical

program

listing. This is

one

of 18 pages required for the TV controller program.

52

IEEE Transactions on Consumer Electronics, Vol. CE-24, No. 1, February 1978

programming of the microprocessor device. The listing is a composite of the designer's source statements including explanatory comments and includes the corresponding object code. The listing is used for a reference by the designer in trouble shooting the firmware. It also serves as a final documentation of the program.
MEMORY REQUIREMENTS

volts and guaranteed data retention down to 2 volts. At this rate a small lithium cell will power most TV sets during the probable total time that the power plug is removed from the mains during the lifetime of the set.
TUNING VOLTAGE GENERATION A twelve bit number is stored for each of 20 channels. This allows 4096 possible voltages for each channel insuring a smooth and precise fine tuning on all channels. In addition 3 bits are stored for bandswitching. The bandswitch bits are dedicated so now the customer is freed from the task of setting up the bands.

One-chip microprocessors generally have two types of memory or storage. The functions or tasks to be performed are permanently stored in the program storage register. This register is a mask-programmable read only memory (ROM). Several microcontrollers presently on the market have 1024 byte ROM on the chip. This would probably be adequate for a non-remote TV controller but for remote control, 20 channel random-access, variable speed fine tuning and expandable off-chip RAM, a 2048 x 8 ROM is required.
The scratchpad register is just what its name implies. It is a read/write, or random access, memory (RAM), which is used as a temporary storage place for variables manipulated in the course of executing commands from remote control, etc. The scratchpad RAM is usually 64 bytes. This is more than adequate for our design. If all the RAM is available for program execution, a 32-byte RAM would be sufficient.

Fine tuning is variable speed in the program mode, starting slow and gradually increasing speed. Upon releasing the fine tuning control the speed returns to the slow position. In the operate mode the fine tuning steps at 2 steps per second. This feature is available for AFT to effect very precise tuning when use in conjunction with the standard AFT circuits. (Double-precision AFT). A third tuning provision is available for factory set-up of fine tuning to match the individual tuners. In this mode the entire 30 volt range is traversed in 5 seconds. Using an automatic set-up station each tuner can be set-up in less than 2 minutes.

Some provision must be made for non-volatile storage of tuning voltages for each of the channels while the TV set is in transit or storage and in the case of a power outage. In our design, this memory is provided by a standard 1024 x 1 CMOS RAM having a battery backup. This RAM is specified to have less than 1 microampere current consumption at 3

Although the 12-bit tuning voltage output could be converted, internally to an analog output by the microprocessor, it was found that this would be more than a low cost one chip device could handle. There are many timing functions already going on in the device for timing remote pulses, volume control speed, etc., that something would have to be sacrificed in order to handle the digital-to-analog conversion on-chip.

D/A CONVERTER

Fig. 7.

The digital-to-analog converter integrated circuit outputs a precise average DC level corresponding to the 12-bit binary number from the microprocessor. DC outputs are also provided for bandswitching and auxiliary functions.

Dreiske and Benjamin: Using One-Chip Microprocessor for TV Tuning and Remote Control

53
REMOTE TRANSMITTER
+9V

A 12-bit number is processed and shifted out into an outboard D/A convertor. Many types of D/A conAn R/2R vertors are available for various prices. ladder has the fastest slew rate but is too costly for TV use. A duty-cycle type convertor is low in cost but has a low frequency output. Filtering becomes expensive, and the resulting slew rate is very A bit-rate multiplier has a high frequency slow. which is easy to filter but switching time can become a significant portion of the square pulse duration which gives rise to poor temperature stability.
A combination of duty-cycle and rate multiplier was eventually found to offer the advantages of both while minimizing the disadvantages. Of the 12 bits for tuning voltage, 3 are used for the rate multiplier and the remaining 9 are used for the dutycycle part.

.n I''

TIMING DIAGRAM DUTY CYCLE/RATE MULTIPLIER DAC

Fig. 10.

3n
7n
I
9

2n

nr

Block diagram of the infra-red remote transmitter. Low cost CMOS integrated circuits are used.

2048 2049

Fig. 8.

Rate multiplier portion of D/A converter provides higher ripple frequency which is easier to filter.

Fig. 11.

Infra-red transmitter board and receiver preamp/detector.

Previous experience with the limitations of ultrasonic remote control systems and the recent availability and demonstrated performance advantages inherent in infra-red components led us to the decision to use infra-red. Fig. 9.
Breadboard version of D/A converter. Final circuit will be a single chip. In order to transmit high power for overall system sensitivity and to keep the battery drain to a minimum, pulse code modulation of a 28 KHz carrier at a low duty cycle was chosen. Off-the-shelf CMOS parts are used in the remote transmitter along with a 3.58 MHz crystal for a precision, low cost, noadjustment circuit. The transmitter block diagram is shown in Figure 10.
Pulse code modulation is also desirable from the software viewpoint for ease in decoding. It is simpler to locate and sample the center of a one-millisecond pulse than to measure the frequency of a 20 to 40 KHz carrier wave.

REMOTE CONTROL

Of all the reasons to use a microprocessor for TV tuning probably the most striking advantage is its capability to perform all the remote control decoding functions thereby eliminating the need for extra hardware to accomplish these functions. This is a significant economic advantage.

54

IEEE Transactions on Consumer Electronics, Vol. CE-24, No. 1, February 1978


sion step attenuator. The attenuation is inserted in equal steps for a total of 16 or 32 steps. A 16step control is shown in Figure 14. Attenuators consisting of operational amplifiers which have switchable resistors in their feedback loops are connected in cascade with the amount of attenuation progressing in binary fashion from stage to stage. Each stage is controlled by one bit of the microprocessor volume control lines.

VOLUME CONTROL

All the attempts observed so far to effect stepped volume control have suffered from non-linearities which can be very objectionable in some cases. An approach tried in a previous design was so successful that it was a natural choice when a microprocessor was considered. This approach is a preciAUDIO

up

DIA

FILTER

VOLTAGE CONTROLLED

IN s-OUT
u

AUDIO ATTEN
OUT

~~~~ATTEN

SOUND -20 LEVEL

IN
dB

-40
-60
I
0
I I
t
I

SOUND L EVEL IN dB

IDEAL

CONTROL APPLICATION

100
Fig. 13.

% CONTROL APPLICATION

100

Fig. 12.

Commonly used voltage controlled attenuator has poor linearity.

Step attenuator is inherently close to ideal characteristic.

16-STEP VOLUME CONTROL

CONTROL LINES
Fig. 14.
A quad op-amp and a quad CMOS analog switch make a 16-step audio attenuator.

Dreiske and Benjamin: Using One-Chip Microprocessor for TV Tuning and Remote Control

55

PRODUCTION TESTING AND SETUP


As mentioned previously a fast tuning function has been programmed in to facilitate automatic production line testing and setup of tuning voltages for each channel to match the individual tuner voltage/frequency characteristic. Signal generators are currently on the market which have direct logic inputs for programming the output frequency.
A microprocessor with a simple program can step the signal generator through each of the TV channels and adjust the tuning voltage while sensing the output of a frequency discriminator connected to the TV receiver.

CONCLUSION

A new generation of tuning and remote control systems will be designed around these low cost miDesigners now have the freedom to crocontrollers. make changes in seconds, at a teletype keyboard, that formerly took hours or days changing wiring and breadboard circuits.

Many self-test features could also be programmed into the tuning system. Carried far enough this may ultimately lead to the self-repairing TV set.

Fig. 15.

Completed microprocessor board as used in the television receiver.

56

IEEE Transactions on Consumer Electronics, Vol. CE-24, No. 1, February

1978

BIOGRAPHIES

ERWIN J. DREISKE
Mr. Dreiske has 24 years electronics experience in the fields of EMI, electroacoustics, and televiHe studied electrical engineering at Northsion. western University, University of Notre Dame and received a B.S.E.E. degree from Illinois Institute of Technology. He has done advanced development work at ElectroVoice, Inc., Zenith Radio Corporation, Warwick Electronics, Inc., and Curtis Mathes Mfg. Company. He has been awarded two U.S. patents, has one patent pending and has published three papers on color T.V. He is currently in charge of new product development at Curtis Mathes.

ROBERT P. BENJAMIN
Mr. Benjamin has had 25 years experience in electronic systems and equipment design in the fields of radar, telemetry and communications. His education includes mathematics and electrical engineering studies at George Washington University, Maryland University and the University of Michigan. He has held senior engineering positions at ESystems, Inc., Defense Electronics, Inc., John Hopkins Applied Physics Laboratories and Emerson Radio and Phonograph Corporation. He is a senior member of the IEEE and holds a patent in color television receiving equipment. He currently serves as an independent consultant specializing in microprocessor applications.

R.

P. Benjamin

You might also like