3
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. IM-25, NO. 3, SEPTEMBER 1976 211 A New Versatile Digital Circle Generator for Television MARIO PASTA AND PAOLO SOARDO Abstract—A new digital variable radius circle generator has been developed which allows high precision TV sets adjustment. The problems which involve the use of complex, digital squarers are avoided through an original computing program; square functions are performed by means of successive sums of subsequent odd in- tegers in an accumulator circuit. This unusual digital technique offers higher flexibility than commercial generators at low price. I. INTRODUCTION T HE CIRCLE generators for television (TV) images employed to date make normal use of analog circuits [1] which assure a sufficient versatility. Some authors [2]-[4] employ digital generators, but the position of the points of the circle on any television line in this case is stored in a digital memory. One can only obtain some cir- cles that are well defined in diameter and position on the screen. The circle generator described in this paper makes use of a very simple digital circuit without squarers, which, through an original computing program, carries out a continuous real-time calculation of the points of the cir- cumference for any circle diameter and position on the screen. II. THE GENERATING METHOD The circle is defined with reference to a rectangular coordinate system having its origin in the screen's center. Since the vertical coordinate y is discrete, the horizontal will also be assumed discrete with steps equal to the vertical ones; each step here (e.g., the distance between two consecutive lines on the vertical axis) will be considered as the unit of length on both scales. The screen coordinates (Fig. 1) then go horizontally from — M on the left to +XM on the right and vertically from +yM down to JM- The TV lines here are assumed horizontal; each line contains 585 X 4/3 = 780 discrete points (x M = 390). 1 In this coordinate system a circle of radius R with its center coincident with the origin is obviously defined by the equation jc 2 + y 2 - 2 = 0. (1) On each line, the y value is known. The raster itself ac- tually begins on top with y M = 292 in the even images and with y M = 293 in the odd ones; it goes on downwards de- Manuscript received April 27,1976. The patent for the devise described in this paper is pending. The authors are with the Istituto Elettrotecnico Nazionale Galileo Ferraris, Turin, Italy. 1 Throughout this paper reference is made to television system G [5]· y P(o,y M) Fig. 1. The x-y coordinates on the screen. creasing along the ordinate line by —2 steps; the y coordi- nate can thus be obtained through a simple counter set to yM by the field pulse. As for , its value on each line can be given by a counter whose input clock has a frequency 2 of 15 MHz and whose setting at the beginning of the line is -390. An obvious method for generating the circle could be to check in each point (1) with the present coordinates during the actual sweep of the electronic spot, however, this real-time calculation would be very difficult owing to the short time available between two following points (about 67 ns). Fig. 1 suggests a possible alternative method. The cal- culation (described later) of the coordinate of the point on each line where the circle first cuts the line can begin just after the horizontal pulse and the result can then be stored in a memory. If this calculation is carried out before the electronic spot arrives at the calculated point, the correct coordinate is reached when the counter equals the stored calculated value. For the second cut of the circle on the same line the counter is compared with the op- posite of the stored value. This calculation could be carried out by checking (1) for each line with the coordinates starting from the center of the line towards the left side (x = 0,-1,-2, · · ·) until the correct value is reached through these sequential steps. 2 This frequency may be calculated as follows: f=aN/(H-a) where a aspect ratio, 4/3; Ν number of the effective image lines, 585; H line period, 64 ; a line blanking period, 12 .

A new versatile digital circle generator for television

  • Upload
    paolo

  • View
    215

  • Download
    3

Embed Size (px)

Citation preview

Page 1: A new versatile digital circle generator for television

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. IM-25, NO. 3, SEPTEMBER 1976 211

A New Versatile Digital Circle Generator for Television

M A R I O P A S T A A N D P A O L O S O A R D O

Abstract—A new digital variable radius circle generator has been developed which allows high precision TV sets adjustment. The problems which involve the use of complex, digital squarers are avoided through an original computing program; square functions are performed by means of successive sums of subsequent odd in-tegers in an accumulator circuit. This unusual digital technique offers higher flexibility than commercial generators at low price.

I. I N T R O D U C T I O N

TH E C I R C L E genera tors for television (TV) images employed to da t e m a k e normal use of analog circuits

[1] which assure a sufficient versati l i ty. Some au tho r s [2]-[4] employ digital generators , b u t t h e posi t ion of t h e points of t he circle on any television line in th is case is s tored in a digital memory . One can only obta in some cir-cles t h a t are well defined in d iamete r a n d posi t ion on t h e screen.

T h e circle generator descr ibed in th is paper makes use of a very simple digital circuit wi thou t squarers , which, through an original comput ing program, carries ou t a cont inuous real- t ime calculat ion of t h e poin ts of t h e cir-cumference for any circle d iamete r a n d posi t ion on t h e screen.

II . T H E G E N E R A T I N G M E T H O D

T h e circle is defined wi th reference to a rec tangular coordinate system having its origin in t h e screen's center . Since t he vertical coordinate y is discrete , t h e hor izonta l χ will also be assumed discrete wi th s teps equal t o t h e vertical ones; each s tep here (e.g., the distance between two consecutive lines on t h e vert ical axis) will be considered as the uni t of length on both scales. T h e screen coordinates (Fig. 1) t hen go horizontal ly from — χ M on t h e left t o +XM on the r ight and vertically from + y M down to —JM-

T h e T V lines here are assumed horizontal ; each line contains 585 X 4/3 = 780 discrete po in ts (xM = 390) . 1

In th is coordinate sys tem a circle of rad ius R wi th i ts center coincident wi th t h e origin is obviously defined by the equat ion

jc 2 + y 2 - ß 2 = 0. (1)

On each line, t he y value is known. T h e ras te r itself ac-

tually begins on top with y M = 292 in t he even images and

with y M = 293 in t he odd ones; i t goes on downwards de-

Manuscript received April 27,1976. The patent for the devise described

in this paper is pending. The authors are with the Istituto Elettrotecnico Nazionale Galileo

Ferraris, Turin, Italy. 1 Throughout this paper reference is made to television system G

[5]·

y P(o ,y M )

Fig. 1. The x-y coordinates on the screen.

creasing along t h e ord ina te line by —2 steps; t he y coordi-na te can thus be obtained through a simple counter set to y M by t he field pulse. As for χ, its value on each line can be given by a counter whose inpu t clock has a f requency 2 of 15 M H z a n d whose se t t ing a t t he beginning of the line is - 3 9 0 .

An obvious me thod for generating t he circle could be to check in each point (1) with the present coordinates during t h e actual sweep of t h e electronic spot , however, th is real - t ime calculation would be very difficult owing to t he shor t t ime available be tween two following points (about 67 ns) .

Fig. 1 suggests a possible a l te rnat ive me thod . T h e cal-culat ion (described later) of t h e χ coordinate of t he poin t on each line where t h e circle first cuts t he line can begin jus t after t h e horizontal pulse and t h e resul t can then be stored in a memory. If this calculation is carried out before t h e electronic spot arrives a t t he calculated point , t he correct coordinate is reached when t h e χ counter equals the stored calculated value. For the second cut of the circle on t he same line t h e χ counter is compared with t he op-posi te of t he s tored value.

Th is calculation could be carried out by checking (1) for each line with t h e χ coordinates s ta r t ing from the center of the line towards the left side (x = 0 , - 1 , - 2 , · · ·) unti l the correct value is reached th rough these sequent ia l s teps .

2 This frequency may be calculated as follows:

f=aN/(H-a)

where a aspect ratio, 4/3; Ν number of the effective image lines, 585; H line period, 64 μβ; a line blanking period, 12 μβ.

Page 2: A new versatile digital circle generator for television

212 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, SEPTEMBER 1976

O S C I L L A T O R COUNTER

C,

INITIAL S E T T I N G S (RADIUS, POSIT ION)

COMPARATOR

Ρ

OSCILLATOR

X 2

G A T E

G

ACCUMULATOR

A

C O U N T E R

c 2

FIELD P U L S E

C O U N T E R

Ca

M I X E R

V

SYNC. P U L S E S

I N V E R T E R

I

Fig. 2. Block diagram of the instrument.

Anyway, it will be shown t h a t on each line, except for t he first one, which cuts t he circle, t he calculation can s t a r t from the circle coordinate reached on the previous line.

In other words, if Sk (xk>k) on line k(y = k) is the highest circumference point on the screen (Fig. 1), t he comput ing circuit first checks χ = 0 (corresponding to point P& on the intersection with the vertical axis) and then calculates the value of k2 — R2. If R is discrete with t h e same s teps as χ and y, th is value is 0 (and Xk = 0 is a po in t of the circum-ference) in one field and negative in t h e following one. If k2 — R2 is negative, we are still inside t he circle and t h e circuit checks then χ = —1, -2 , · · · · · · u p to Xk, when

x k

2 + k2-R2>0. (2)

This means t ha t our calculation has found the coordinate of the point we are looking for on the circumference or jus t outside it, and Xk is the coordinate of the point to be lighted on the screen.

In order to unde r s t and how these comput ing s teps are carried out, let us examine the upper left quadran t and say t h a t in the i t h check we had

Xi2 + k2-R2<0. (3)

T h e next necessary s tep leads to t he calculation of

(Xi + l ) 2 + k 2 - R2 = (xi2 + k 2 - R2) + 2xi + 1. (4)

This means tha t no squarer is necessary, since the (i + l ) t h value of the first member of (1) can be obta ined from t h e iih one by simply adding the t e rm (2jct + 1). Th i s is of course qui te clear if one r emembers t h a t a square is t h e sum of subsequent odd integers. Fig. 2 shows a block di-agram of the ins t rument ; t he value of t he first m e m b e r of (1) can be obta ined th rough repea ted adding in t h e accu-mulator A, where k2-R2 has already been stored, of 1 plus the double of the n u m b e r of the comput ing s teps a l ready performed, obtained through a counter ( C 2 in Fig. 2). Th is process stops th rough gate G when the condit ion given in (2) is reached. With reference to (4), this condition can be wri t ten as

(xk -τ 1 )2 + 2{xk - 1) + 1 + k2 - R2 > 0. (5)

In C 2 , one then has Xk — 1 (see Sect ion III) . In the meant ime the electronic spot is traveling from left

to right, and its posi t ion is known from the counter Ci ,

Fig. 3. The counting sequence of C2.

which is suppl ied by t h e 15-MHz clock genera ted by Χχ. When Ci equals C2 in the comparator P , the electronic spot is on t he circumference and mixer V supplies t he video o u t p u t wi th a pulse whose length is equal t o one per iod of t he 15-MHz clock.

In the next (k — 2) line, it is not necessary to s ta r t again from χ = 0, b u t t h e search of Xk-2 can cont inue in t he se-quent ia l p rocedure a l ready indicated s tar t ing from Xk — 1. At first yk 2 = k 2 accumula ted in A is changed in yk-22

= (k — 2 ) 2 by add ing in A t h e value (—4k + 4) ob ta ined from t h e counter C3 which is dr iven by t h e hor izontal pulses; t he reason is t he same as described in (3) for jc&, however, owing to t h e inter lacing y k - 2 = yk — 2. T h e n , e i ther (2) is still verified a n d t h u s Xk-2 = *k> or, if th i s is not the case, the process continues by adding 2xk + 1 in A and so on unt i l t he condi t ion indicated in (2) is reached ( I 1 ^ \*k\ in t h e q u a d r a n t we are considering (Fig. 3)).

Th i s process is r epea ted on each line down to t he y = 0 axis. In t h e lower left q u a d r a n t t h e comput ing m e t h o d is t he same, b u t one now s ta r t s from the outside of t he circle (Fig. 3) a n d m u s t look for t h e po in t where t h e line en ters t h e circle for t h e first t ime , th is is done by subsequen t add ing of t e r m s like (—2x[ + 1) u p to

x k

2 + k2-R2<0. (6)

T h e r ight p a r t of t h e circumference is obta ined by com-par ing the position of the electronic spot, counter Ci, with t he opposi te of t h e o u t p u t of counter C2 (see Section III) .

T h e calculation described here is of course useless when \y I > R since th is i n s t r u m e n t was actual ly bui l t to work only when \y\ < R. Then , since R is made discrete with the same s teps as χ a n d y, a t t he beginning of t h e calculation ei ther R = k and (k2 — R2) = 0, and one m u s t only reset to 0 t h e m e m o r y of t h e accumula tor A wi th t h e field pulse; or R = k + 1, and one m u s t set t he memory to (—2R + 1); also in th is case the re is no need of a squarer , b u t only of a set or reset circuit in t h e even a n d odd fields.

T h e center of the circle can be easily displaced a t will by only changing the init ial se t t ings of counter C\ a n d C2, respectively, a t t h e line a n d field pulses. For a correct working of t h e circuit , t h e choice of R m u s t be res t r ic ted to t h e cases where all t h e circle is con ta ined in t he televi-sion screen.

Page 3: A new versatile digital circle generator for television

PASTA AND SOARDO: DIGITAL CIRCLE GENERATOR FOR TV 213

Fig. 4. Photograph of the screen.

III . C I R C U I T D E S C R I P T I O N

Counter C2 m u s t be in s top condi t ion when t h e elec-tronic spot reaches t he circumference; its clock frequency m u s t be calculated in t h e wors t case, which, if we only consider circles cen te red in t h e screen center , is given by the max imum circle inscribed, which has a radius R = 292. I t is easy to see t h a t t h e m a x i m u m n u m b e r of t h e com-put ing s teps descr ibed by (2) is 34 a t t h e line y = R — 2. These s teps m u s t be carr ied ou t dur ing 292 — 34 = 258 periods of t h e 15-MHz clock of counte r C\\ i t follows a m i n i m u m frequency of C2 clock of a b o u t 1.7 M H z , which is qu i te low and is ob ta ined by t h e oscillator X2 of Fig. 2.

In Section II, a description of the block diagram has been a l ready given wi th par t icu la r reference to t h e left u p p e r quad ran t . I t is of course useless t o give t h e comple te elec-tronic diagram of t he realized circuit, b u t some points seem to deserve a more comple te descr ipt ion, in order t o show t h e simplicity of th i s circuit .

T h e circuit has been realized with normal D T L and T T L logic and works with a pure binary code; it is then very easy to obta in t h e t e r m s (2xk + 1) a n d (4k + 4).

In the left upper quadran t the ou tpu t of counter C\ (Fig. 2), which for t h e left side of t h e circle is negat ive, is com-pared in Ρ wi th t h e inver ted o u t p u t of counte r C2, t h a t is the contrary of In this way the point alighted on the T V screen is t h e one ju s t outs ide t h e circle as i t was a l ready said in connect ion wi th equa t ion (2). In t h e r ight u p p e r q u a d r a n t t h e circumference crossing wi th t h e k l ine is obta ined invert ing all t h e count ing stages of C2 when t h e electronic spot is on t h e vertical axis χ = 0 ( the inversion is carried ou t by J of Fig. 2). T h u s now t h e compar ison is made wi th (xk — 1). At t h e nex t line pulse a second inver-sion restore C2 to its original s ta te .

In t h e lower q u a d r a n t s t h e t e r m s (—2xi + 1) m u s t be added into A b u t for t he first s tep when only -2xi m u s t be

added, as it should be easy to verify. This is easily made by cancelling t h e men t ioned second inversion. T h e C2 t h e n counts in t h e reverse direct ion u p to when (6) is verified. Immediately after C2 stops, a first inversion is made, before comparison occurs with C\. T h e second inversion is made when the spot is on t h e vertical axis as a l ready de-scribed.

Comparisons with Ci now take place as described for the uppe r q u a d r a n t s . If a comple te con t inu i ty of t h e circum-ference is needed, a delay of one per iod of t h e 15-MHz clock m u s t be in t roduced in bo th r ight quad ran t s .

IV. C O N C L U S I O N

T h e circle genera t ing circuit here described is very s imple and , owing to t h e r a the r long t ime allowed for t h e calculations, needs no special care: normal D T L and T T L logic was employed, b u t i ts in tegra t ion could be very easy.

Fig. 4 show a photograph of t he screen with a circle with R = 250. W e should like to po in t ou t t h a t mul t ip le circle p ic tures (e.g., four circles in t h e corners) could be easily ob ta ined wi th a single circuit by only changing the init ial se t t ings of counters C\ and C2 dur ing t h e p ic ture t ime.

A C K N O W L E D G M E N T

T h e au tho r s acknowledge with t h a n k s t h e useful dis-cussion wi th Prof. C. Egidi .

B I B L I O G R A P H Y

[1] Nord Mende Electronics, Bedienung sanleitung für Farb—Service —Generator FSG 395.

[2] Philips, Ν. V., "Black/white pattern generator PM 5540," Operating Manual.

[3] P. Lappalainen, "A method of generating high quality circle test pattern for television," Radio Electron. Eng., vol. 43, June 1973.

[4] P. Lappalainen, "Digital circle—Pattern generator for TV," IEEE Trans Broadcasting, vol. BC-19, Sept. 1973.

[5] C.C.I.R., XII E Assemblée Plénière—New Delhi, 1970, vol. V, Partie 2.