MTM Scientific, Inc... Explanation of 27 bit Tuner Data Mode
The Panasonic CATV Tuner sold by MTM Scientific is programmed for reception frequency and operating mode via a serial bit stream. In the most general and useful case this consists of a series of 27 bits. This document describes the meaning of each of the 27 bits and how the tuner expects the data to be formatted. Since we already provide a free computer program for controlling the tuner, this additional information is intended as a resource for advanced experiments and applications.
A bit is defined as a digital one or zero. In practice the one bit (1) bit is referred to as 'high' and equals 5.0 volts DC. The zero bit (0) is referred to as 'low' and equals 0.0 volts DC. Therefore a 27 bit stream consists of a 27 digit string that are either ones or zeroes.
For example, here is the 27 bit string that tunes 611 MHZ:
Although this might seem confusing at first, the specifics of the bit string can be more easily understood by breaking it into 4 parts, as shown here:
0000 101000110001000 1 0001010
band frequency sp function
The first four band bits set the frequency range, the fifteen frequency bits set the operating frequency, the single space bit is a place holder and the seven function bits set the tuner operating mode.
The four band bits work as follows:
Frequency Range 400 to 860 MHZ use 0000.
Frequency Range 180 to 400 MHZ use 0010.
Frequency Range below 180 MHZ use 0100.
The 15 frequency bits set the operating frequency. The 15 bits are actually a 15 bit number. In the example for tuning 611 MHZ, binary 101000110001000 equals 20872. To understand why this tunes 611 MHZ we need to understand how the tuner actually works.
The CATV Tuner output is referred to as an IF output. The term IF means 'intermediate frequency'. The audio output of the tuner is at IF frequency 41.25 MHZ, and the video output of the tuner is at 45.75 MHZ. The method of converting an incoming frequency to a standard output frequency simplifies the design of subsequent RF amplifiers. (Usually connected to the output of the tuner, as in a television.)
Because the tuner output has an IF frequency shift, it is necessary to program the tuner with a reception frequency that includes the shift. For example, if we want to tune the audio output to 611 MHZ, we must actually program it for a reception frequency of 652.25 MHZ (611 + 41.25 = 652.25). Therefore, we want to send a command for tuning 652.25 MHZ.
The tuner counts in frequency steps up to the programmed frequency. The step size is 1/32 of a MHZ, which works out to 31.25 KHZ per step. The number of steps required is calculated by dividing the program frequency by the step size. In our example it is 652.25 MHZ divided by 31.25 KHZ, which is 20872 steps. (652,250,000 / 31,250 = 20872)
Therefore we want the tuner to count 20872 steps. However the tuner expects to receive this number in binary, not decimal. We must convert the decimal number 20872 to the binary equivalent. This is most easily done using a calculator which converts decimal numbers into binary. Fortunately, the free calculator provided as an accessory in Windows is capable. Open the Windows calculator, and select the 'Scientific' mode. Next, enter the number 20872 and select 'Bin' format on the display. The binary number equivalent of 101000110001000 will be displayed. Note that this is the number we gave in our example of 27 bit programming above.
Different frequencies are programmed the same way. Note that the offsets for the audio and video are slightly different, so choose the offset depending on your application (video or audio). Also, if you do the binary conversion for lower frequencies and the number is less than 15 bits, simply add leading zeroes to total fifteen bits.
After the fifteen frequency bits there is a single spacer bit. In practice this bit can be a 1 or 0, the tuner ignores the bit, but this space keeper must be present in the 27 bit code.
The final 7 bits in the code are used to set specific functions and features on the tuner. This is a very powerful string that can significantly modify the tuner's function. The 7 bit sequence controls an engineering mode, where you have substantial control over the internal workings of the tuner. Unfortunately, the published documentation only gives sparse information about this mode and how to use it, but here is what is known:
The first of the seven bits sets the charge pump. A value of 0 sets the pump to 60 uA of current.
The second, third and fourth bits set the operating mode. A value of 001 set the tuner for normal mode.
The fifth and sixth bits set the tuning step size. A value of 01 sets N=1024 and a step size of 31.25 KHZ.
The seventh bit sets the tuning voltage ON or OFF. A value of 0 has the tuning voltage ON, and a value of 1 turns the tuning voltage OFF. It is important for the tuning voltage to be turned on for the tuner to work properly! This means the last bit should be 0. Mistakenly, our computer code was written to send a 1, and it was only by a fortunate quirk of the signal timing that the tuner interprets the last bit as a 0 and works correctly. We discovered this error when we built the DIP switch programmer for the tuner and could not get the tuner to work when sending a 1 as the last bit!
There is more information about using the 7 function bits in the tuner data sheets. Also, if you happen to know more about the specifics of this tuner, please forward the information and it will be added here for other experimenters.
Click Here to View other Products from MTM Scientific, Inc.