UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > Specific Vintage Equipment > Television Standards Converters, Modulators etc

Notices

Television Standards Converters, Modulators etc Standards converters, modulators anything else for providing signals to vintage televisions.

Closed Thread
 
Thread Tools
Old 3rd Sep 2010, 1:14 pm   #1
Kat Manton
Retired Dormant Member
 
Kat Manton's Avatar
 
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,700
Default Mixed sync (and blanking) from separate H/V sync

Hi,

In this thread, I wrote:
Quote:
Originally Posted by Kat Manton View Post
The MythTV/Linux system produces RGB, though I've still to sort out something which will generate proper mixed sync from the H/V sync. Given the number of standards I've got the system to do, I think that's going to end up with a microprocessor in it.
It's been on my 'To Do' list for a while (where 'while' tends towards 'several years'.) It's possible to crudely combine the H and V sync emerging from the video card to produce something most TV sets recognise as 'sync' and lock to.

But now, I seem to have a little more incentive to 'do it properly'. The SECAM encoder needs mixed sync and mixed blanking as well as RGB video if I'm going to watch anything other than colour bars on a SECAM set. Got RGB, not got proper sync or blanking...

One idea I've had recently is inspired by the R. T. Russell test card generator.

Store sync and blanking data in ROM. Lock clock signal to sync from video card. Read out data from ROM, add to video signal or send to separate outputs as required. Doesn't need a DAC as it isn't producing video.

It keeps it simple, it can be configured for different standards (by generating the data with a C program on a PC then shoving it in an EPROM, perhaps), it doesn't require a microprocessor, it sounds like it could be cheap...

This is purely an idea at present, I haven't thought about it very much. "The Devil's in the details"; there's bound to be something interesting waiting to trip me up if I pursue this idea...

Regards, Kat
Kat Manton is offline  
Old 3rd Sep 2010, 3:22 pm   #2
Guest
Guest
 
Posts: n/a
Default Re: Linux/MythTV Sync Generator

I would have thought to just generate syncs a PIC or the like would be cheaper than an EEPROM, you won't need a seperate counter for a start and you could put switches on it to slect which sync, although that could be done with an eeprom too. Somewhere I have seen a colourbar generator using an AVR chip (the fast PIC) alone.
 
Old 5th Sep 2010, 12:18 pm   #3
neon indicator
Retired Dormant Member
 
Join Date: Jun 2010
Location: Co. Limerick, Ireland.
Posts: 1,183
Default Re: Linux/MythTV Sync Generator

Years ago I wrote DOS SW to edit timing on an ISA Trident VGA card. I used a transistor + 2 resistors to combine the +V going H & V to have a basic composite sync on a "spare" VGA pin.
Then I wired a VGA to SCART RGB plug.

AFAIR you can edit the registers in the old VGA cards to almost any resolution.


To do it "proper" forget MythTV and Linux. Use either an 18F2550 programmed in JAL (very simple for beginner and control via USB or easily add GCLD 128 x64 display and keypad using standard libraries) or program off the shelf Spartan 3E starter kit FPGA. The FPGA can do most of the work for a Modulator too up to nearly 200MHz directly. Learning time for FPGA vs JAL on PIC about x100!

Last edited by neon indicator; 5th Sep 2010 at 12:24 pm.
neon indicator is offline  
Old 5th Sep 2010, 3:57 pm   #4
Kat Manton
Retired Dormant Member
 
Kat Manton's Avatar
 
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,700
Default Re: Linux/MythTV Sync Generator

Hi,

Quote:
Originally Posted by neon indicator View Post
To do it "proper" forget MythTV and Linux.
You're about four years too late; I demonstrated it playing back off-air FreeView recordings on a 405-line TV and monitor at the NVCF in 2006...

It has since proven capable of producing correct video timing for every TV standard I've attempted to configure it for so far.

In case you missed it, a little background...It's probably reasonable to assume I'm not going to abandon it.

What I'd like to do is produce sync signals which are a little closer to broadcast standard than I get from the simple two-transistor circuit I've been using for the last four years.

Regards, Kat
Kat Manton is offline  
Old 6th Sep 2010, 2:12 pm   #5
Kat Manton
Retired Dormant Member
 
Kat Manton's Avatar
 
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,700
Default Re: Linux/MythTV Sync Generator

Hi,

OK, for the purposes of this discussion, it is possible to say "forget Linux/MythTV"; what the signals are emerging from is irrelevant.

I have a 'black box', what's inside doesn't matter. It produces the following signals:
  • RGB video, 0.7V p-p.
  • H sync pulses, TTL.
  • V sync pulses, TTL.
Timings are already correct for whatever television standard the 'black box' has been set to, so no standards conversion is needed.

The 'black box' allows some adjustments:
  • H and V sync pulses can be set to either polarity.
  • H sync can be set to start anywhere after the active part of the line.
  • H sync can be set to end anywhere before the active part of the line.
  • V sync can be set to start anywhere after the active part of the field.
  • V sync can be set to end anywhere before the active part of the field.
The RGB video doesn't require any processing, it's easy enough to sum the signals to get monochrome (if required.)

What is required is that the generated mixed sync (and mixed blanking) signals have no timing 'jitter' relative to the incoming sync and video. (This would manifest as jagged and 'jiggly' verticals.)

This last point is why I'm leaning towards generating a clock signal at some higher frequency than the H sync, from which 'proper' mixed sync can be generated, then phase-lock that to H sync.

Cheers, Kat
Kat Manton is offline  
Old 6th Sep 2010, 2:49 pm   #6
ppppenguin
Retired Dormant Member
 
ppppenguin's Avatar
 
Join Date: Dec 2003
Location: North London, UK.
Posts: 6,168
Default Re: Mixed sync (and blanking) from separate H/V sync

Because the raw HV pulse timings are adjustable it is possible to generate proper sync and blanking using only +ve delays. This means (and I'll wash my mouth out with soap for saying it) you can do it with just gates and monostables.

Otherwise, the decent way of doing it is to lock a suitable clock to the H pulses. A HC(T)4046 (preferably Philips brand) is good enough for the job and I would suggest 5MHz as a compromise between absolute accuracy and ease of use. The rest is just divider chains, gates and flipflops. Most easily done in a PLD but CMOS/TTL will both work. Software folk might use a PIC but that's not my sort of thing.

PS: There are some tricks to getting the best out of a 4046 PLL. Will publish them if you wish. Many other frequencies are possible. Just look at the timings needed (2.35us, 4.7us and 12us) and see if there's a better frequency for the oscillator. At 5MHz 4.7us would become 4.8us which doesn't matter at all for this application.
ppppenguin is offline  
Old 6th Sep 2010, 10:24 pm   #7
dominicbeesley
Octode
 
dominicbeesley's Avatar
 
Join Date: Nov 2004
Location: Hebden Bridge, West Yorkshire, UK.
Posts: 1,885
Default Re: Mixed sync (and blanking) from separate H/V sync

Jeffrey's 4046 sounds good - unless a high clock rate PIC is used or it does nothing else it's likely to go a bit raggedy too...

Quote:
Originally Posted by ppppenguin View Post
PS: There are some tricks to getting the best out of a 4046 PLL....
Please do (separate thread?) I spent a fruitless evening last night trying to get a 4046 phase detector II to lock to a 15kc/s colourburst signal still no idea why it refuses to play along...

Dom
dominicbeesley is offline  
Old 6th Sep 2010, 11:14 pm   #8
Kat Manton
Retired Dormant Member
 
Kat Manton's Avatar
 
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,700
Default Re: Mixed sync (and blanking) from separate H/V sync

4046, I've got. However, they're RCA CD4046BE from 1993, so I may have to obtain some more.

Jeffrey, I'm also interested in anything you can impart about the care and feeding of the 4046. I'm interested in using the device for this project as, the last time I played around with PLLs was about twenty-odd years ago and I couldn't get the blasted thing to behave...

Given what I've spent most of my life doing, I think I fall into the category of "software folk". Perversely, that means I'm leaning more towards a 'pure hardware' solution.

That said, meeting half-way could offer more flexibility. One thing I've been involved in often enough is having analogue and/or digital hardware which operates mostly autonomously - once a microprocessor has shoved a few numbers into latches and registers to "make it go".

So there'd be no problem with timing jitter if sync/blanking are generated by circuitry which is controlled by a microprocessor, rather than generated by the microprocessor. That'd still need the PLL.

Another possibility might be to use the PLL circuit to generate the microprocessor's clock. But I'm put off that idea, IIRC there was an Amiga genlock which did exactly that (possibly badly); the computer would crash if the external video signal vanished. (However, that's given me the idea of looking at Amiga genlock circuits for inspiration.)

It looks like whatever direction this may take, there's a PLL in it.

Kat
Kat Manton is offline  
Old 6th Sep 2010, 11:34 pm   #9
cmjones01
Nonode
 
Join Date: Oct 2008
Location: Warsaw, Poland and Cambridge, UK
Posts: 2,669
Default Re: Mixed sync (and blanking) from separate H/V sync

A PLL is clearly the Right Way to do this, but will take some tweaking to get right. A cheap-and-cheerful approach could be one step sideways from the monostable-and-gate design proposed (with caveats ;-) ) by Jeffrey. A free-running clock oscillator disabled by the line sync pulses, so that it starts up in a known phase relationship with the trailing edge of the pulse, would probably be stable enough to be not *too* jittery for blanking and equalising pulses...and you could vary the timing of everything with just one pot...

No, forget I said it, it's a horrible idea!
cmjones01 is offline  
Old 6th Sep 2010, 11:52 pm   #10
Kat Manton
Retired Dormant Member
 
Kat Manton's Avatar
 
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,700
Default Re: Mixed sync (and blanking) from separate H/V sync

Horrible ideas are welcome too

I still haven't quite abandoned the idea of using an EPROM (UV-erasable flavour.) If the outputs of that are connected to gates and monostables, I can't help thinking it wouldn't need to be clocked all that fast. Is that horrible enough?

There's still some fun involved - resetting the address counter cleanly and consistently at the start of a frame could get interesting...

Regarding PLL frequency, for possible future 'encoding other colour standards' purposes, would 4.433MHz be a sane choice? (Or would that need to be 8.866MHz? I vaguely recall reading somewhere that PAL colour sync generators start with the colour subcarrier and derive everything from that.)

Then there's NTSC... and 405-line NTSC... and didn't Henri de France start developing SECAM for 819..? I'll stop there before I get too carried away

Kat
Kat Manton is offline  
Old 7th Sep 2010, 8:18 am   #11
ppppenguin
Retired Dormant Member
 
ppppenguin's Avatar
 
Join Date: Dec 2003
Location: North London, UK.
Posts: 6,168
Default Re: Mixed sync (and blanking) from separate H/V sync

Kat, forget about using an ordinary 4046. Must be a HC or HCT type.

I doubt you'll get much sense out of a 4046 locking to a colour burst. You need a very narrow loop bandwidth which is difficult on the 4046 if you want it to lock at all. You can't use the PSD2 for a burstlock, it just won't work as it needs a continuous reference which a burst isn't.

For Kat's application the PSD2 (sequential comparator) is the one to use. Its main problem is that it jitters when locked due to deadband effects. There are several possible cures. The simplest is a resistor from the PSD output to 0V which forces the PSD to operate slightly away from the central deadband. Another method I've used is a pair of PSDs (2x HC4046) with the feedbacks offset by 1 or 2 clock cycles. Connect the PSD outputs together so that one will track ahead and the other behind when locked. Again this avoids the deadband.

I'm sure I've got the circuits from when I used this method at 27MHz. The osc was at 27MHz, the PSDs were at 15625Hz. 27MHz was right on the outer limits of a HC4046 so only a Philips device worked. Philips HCMOS was always faster than all the others. Their HC221 monostable (consider mouth washed out again) was the only HC monostable that could be trusted at all to give consistent results. Unlike the LS221 which was usually pretty good regardless of make.

When I do SPG stuff professionally I start at 27MHz or 54MHz and derive everything from that. 27MHz to subcarrier is done with a DTO (adder and register). This is strictly speaking an approximation unless you use a more complex arrangment. I won't go into details of what I do, it's commerically sensitive. The simple method used on commerically available PAL coder chips is to reset the DTO to zero once every 8 fields. Actually the error caused by not resetting is miniscule in a stand-alone coder. It only matters in studio systems where everything has to be mutually synchronous and the relative phases of SC and H are important.

Last edited by ppppenguin; 7th Sep 2010 at 8:23 am.
ppppenguin is offline  
Old 7th Sep 2010, 1:39 pm   #12
tubesrule
Hexode
 
tubesrule's Avatar
 
Join Date: Jul 2004
Location: Michigan USA
Posts: 325
Default Re: Mixed sync (and blanking) from separate H/V sync

Hi Kat,
You might also want to consider the MK1575-01 pll from IDT. It's a bit more expensive than the 4046 but is designed to generate several different pixel clocks from the H sync. No external counters are required if you use one the the programmed frequencies, but of course you can use an external counter chain just like with the 4046.

Darryl
tubesrule is offline  
Old 7th Sep 2010, 2:30 pm   #13
dominicbeesley
Octode
 
dominicbeesley's Avatar
 
Join Date: Nov 2004
Location: Hebden Bridge, West Yorkshire, UK.
Posts: 1,885
Default Re: Mixed sync (and blanking) from separate H/V sync

Thanks Jeffrey, I'd read elsewhere that PDII was the one to use for Colourburst but can't find where now. Anyway it works with PDI fine for both burst and continuous. PDII works for neither so I suppose I'm picking up noise somewhere....
[BTW the colour burst for NBTV is 15.000kHz every 80ms with 1:80 duty and the VCO is not the 4046's but a crystal running at 6.000MHz divided down I just wanted a phase detector out of the box....I'll make my own!]

Kat, I've been thinking about bits of this today I don't know enough about Myth (yet - just putting together a machine for this). Could the frame / eq pulses be "created" from one of the RGB channels for X lines after a VGA frame sync by having extra lines at the top of the picture, a counter and a switch+inverter?

Dom
dominicbeesley is offline  
Old 7th Sep 2010, 2:40 pm   #14
ppppenguin
Retired Dormant Member
 
ppppenguin's Avatar
 
Join Date: Dec 2003
Location: North London, UK.
Posts: 6,168
Default Re: Mixed sync (and blanking) from separate H/V sync

Didn't know you were using a rock for the oscillator. PSD1 in a 4046 is just an XOR gate. It's the digital version of an analogue multiplier such as the 1496. pull-in range is limited. PSD2 is a clever sequential device with infinite pull-in range but both signals that feed it must be continuous and have no missing edges.
ppppenguin is offline  
Old 7th Sep 2010, 3:02 pm   #15
dominicbeesley
Octode
 
dominicbeesley's Avatar
 
Join Date: Nov 2004
Location: Hebden Bridge, West Yorkshire, UK.
Posts: 1,885
Default Re: Mixed sync (and blanking) from separate H/V sync

Ho hum, I'll make my own from a few diodes then!

Cheers

Dom
dominicbeesley is offline  
Old 7th Sep 2010, 3:45 pm   #16
Kat Manton
Retired Dormant Member
 
Kat Manton's Avatar
 
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,700
Default Re: Mixed sync (and blanking) from separate H/V sync

Quote:
Originally Posted by dominicbeesley View Post
Could the frame / eq pulses be "created" from one of the RGB channels for X lines after a VGA frame sync by having extra lines at the top of the picture, a counter and a switch+inverter?
Not without some programming. All software and the OS are unmodified and the source for the nVidia graphics driver is unavailable anyway (which is where something like that would have to be done, I think.)
Kat Manton is offline  
Old 7th Sep 2010, 4:31 pm   #17
dominicbeesley
Octode
 
dominicbeesley's Avatar
 
Join Date: Nov 2004
Location: Hebden Bridge, West Yorkshire, UK.
Posts: 1,885
Default Re: Mixed sync (and blanking) from separate H/V sync

I'm not sure how the video player software is started but I was more thinking a user-mode program that took over the first 50 or so lines of the screen to draw pulses then the video player gets the rest of the screen - shouldn't be impossible in X windows...Not sure how you change it field to field but then again I'm unsure how you do interlacing in Myth!

Anyway got to go now it's thundering and my UPS is having a fit!

Dom
dominicbeesley is offline  
Old 7th Sep 2010, 5:02 pm   #18
Kat Manton
Retired Dormant Member
 
Kat Manton's Avatar
 
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,700
Default Re: Mixed sync (and blanking) from separate H/V sync

Quote:
Originally Posted by dominicbeesley View Post
I'm not sure how the video player software is started but I was more thinking a user-mode program that took over the first 50 or so lines of the screen to draw pulses then the video player gets the rest of the screen - shouldn't be impossible in X windows...
You'd only be able to draw pulses on the active part of the line, not during the sync period.

Quote:
Originally Posted by dominicbeesley View Post
I'm unsure how you do interlacing in Myth!
I have no idea if X applications do anything special if X has been configured for an interlaced display. I just add "interlace" to the end of the modeline in /etc/X11/xorg.conf and it works...

Here's my 405-line modeline:
Code:
Modeline "405i50" 8.10  664 680 752 800  377 378 385 405 -hsync -vsync interlace
Quick explanation:

"405i50" is just a name for the modeline.

"8.10" sets the pixel clock to 8.10 MHz

"664 680 752 800" configures horizontal timing and breaks down as follows:
664 - number of active pixels (i.e., the horizontal resolution)
680 - sync start
752 - sync end
800 - total line length.
(8.10 MHz / 800 is 10.125 kHz. Which is spot-on.)

"377 378 385 405" configures vertical timing and breaks down as follows:
377 - number of active lines (i.e., the vertical resolution)
378 - sync start line
385 - sync end line
405 - total number of lines
"-hsync -vsync interlace" are fairly self-explanatory
Kat Manton is offline  
Old 8th Sep 2010, 1:04 am   #19
dominicbeesley
Octode
 
dominicbeesley's Avatar
 
Join Date: Nov 2004
Location: Hebden Bridge, West Yorkshire, UK.
Posts: 1,885
Default Re: Mixed sync (and blanking) from separate H/V sync

My thinking was along the lines of fooling Linux into making a very short blanking period and using that for your own nefarious purposes...I used to write "demos" in the '80s on acorns and you could fool the video chips into all sorts of naughtiness then you get a load of extra lines at the top / bottom to play with...but then you'd need to try and fool all the kosher software into not writing on them. Probably more bother than it's worth!

So for 405 something like:

Modeline "405i50" 8.10 664 680 752 800 402 403 404 405 -hsync -vsync interlace

and use the extra "active" lines to do your own thing. Then write your own pulses into the extra lines at the top/bottom of the screen but use a couple of gates to shift them down to sync pulse levels...The other idea I've got is to make teletext..once I've got a teletext TV that works...I'm only up to 1976 so far!

When it says -interlace I'm interested as to how it lays it out in memory. Is it one field after another or does lay it out linear and scan odd lines each time. [Possibly I got my fields and frames mixed up again!]

Anyway, on my travels this year I bought a modern SECAM TV (€99!) in France after taking a portable satellite system with me and an old TV without a SCART plug. DOH! So at some point a project on the books is to make a SECAM modulator just for the jollies. As a starter I've added a SECAM mode to my NBTV software to get my head round the ideas....

Dom
dominicbeesley is offline  
Old 5th Dec 2010, 4:08 pm   #20
Station X
Moderator
 
Station X's Avatar
 
Join Date: Jan 2003
Location: Ipswich, Suffolk, IP4, UK.
Posts: 21,192
Default Re: Mixed sync (and blanking) from separate H/V sync

One OT post moved to a new thread here:-

https://www.vintage-radio.net/forum/...ad.php?t=62610
__________________
Graham. Forum Moderator

Reach for your meter before you reach for your soldering iron.
Station X is offline  
Closed Thread

Thread Tools



All times are GMT +1. The time now is 10:42 pm.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.