Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC colour bar generator

Status
Not open for further replies.

CanonMan75

New Member
Nigel Goodwin said:
Very clever project - but really naff colour bars!.

I built one using a PIC years ago, but used an RGB to composite chip to generate the colour signal - I think it came off an Italian website?. The encoder chip was the standard one found in lots of home computers.

I know the one - it used a 16F84 at 10MHz and an MC1377 to encode the RGB to composite.

I built the same circuit recently, and discovered that the horizontal sync that it output was at 16Khz rather than 15.625KHz, making it a bit useless with most of the TV's I tried it with. I don't suppose you have any idea why, do you?
 
CanonMan75 said:
I know the one - it used a 16F84 at 10MHz and an MC1377 to encode the RGB to composite.

I built the same circuit recently, and discovered that the horizontal sync that it output was at 16Khz rather than 15.625KHz, making it a bit useless with most of the TV's I tried it with. I don't suppose you have any idea why, do you?

It's always worked fine on any sets I've tried it on, I've never had occasion to try measuring it's line frequency?. If I can find it, I'll have a look!.
 
Nigel Goodwin said:
It's always worked fine on any sets I've tried it on, I've never had occasion to try measuring it's line frequency?. If I can find it, I'll have a look!.

Cheers, Nigel.

I didn't have any MC1377 encoders to hand, so I built it to output R,G,B and composite sync via a SCART socket instead. Each signal was buffered using a single NPN transistor and associated resistors.

Having tried it on a couple of different TVs, and had a blank screen on one and a horizontally rolling picture on the other, I decided to scope the sync signal. That's when I found it was 16KHz!

Maybe the MC1377 somehow copes with this and ouputs a perfect 15625Hz sync signal? I very much doubt it, but you never know :D
 
The composite sync to the MC1377 is generated via the 16F84, but unfortunately the source code of the said project is not available so it is difficult to tell whether the correct sync timing is being outputted by the 16F84.

But I wonder why this is the case as it is very easy to match the timing of 15.625KHz or close to it via software inside PIC.

Are we referring to the circuit posted on this site?

**broken link removed**
 
Last edited:
eblc1388 said:
The composite sync to the MC1377 is generated via the 16F84, but unfortunately the source code of the said project is not available so it is difficult to tell whether the correct sync timing is being outputted by the 16F84.

But I wonder why this is the case as it is very easy to match the timing of 15.625KHz or close to it via software inside PIC.

Are we referring to the circuit posted on this site?

**broken link removed**

It's not this particular circuit, but it is very similar around the PIC and the MC1377. If I can find the details, I'll post them here later.

I had 'scoped the sync signal, and it didn't look like 64uS pulses to me, more like 62uS. My frequency meter said 16001Hz but as you said, it could well have been counting the vertical pulses as well!

Edit: I've found and attached the file!
 

Attachments

  • videoi.pdf
    498.1 KB · Views: 842
Last edited:
I have a brief look into the pdf you have posted and the source code is right at the end.

The original author did put in comments of 2.6us, 4.8us and 32us along with the source codes, which look very much to me as the PAL timing. My figures on PAL gathered from the internet are 2.35, 4.7 and 32us(H/2) respectively.

Frequency counter is helpless in this case. Calibrate your scope by a live feed. 62 and 64us is but a tiny division on the scope's scale.
 
Last edited:
CanonMan75 said:
I had 'scoped the sync signal, and it didn't look like 64uS pulses to me, more like 62uS. My frequency meter said 16001Hz but as you said, it could well have been counting the vertical pulses as well!

Edit: I've found and attached the file!

Yes, that's the one that I built - a LONG time ago!.
 
eblc1388 said:
I have a brief look into the pdf you have posted and the source code is right at the end.

The original author did put in comments of 2.6us, 4.8us and 32us along with the source codes, which look very much to me as the PAL timing. My figures on PAL gathered from the internet are 2.35, 4.7 and 32us(H/2) respectively.

Frequency counter is helpless in this case. Calibrate your scope by a live feed. 62 and 64us is but a tiny division on the scope's scale.

As stated earlier, I was using just the PIC section, with transistor buffers, to generate and RGB and sync-only SCART output. I didn't bother with the encoder as I didn't have any 1377's in stock.

True, there isn't much difference between 62us and 64us, but with the scope on the correct timebase you can see the difference.

I'll dig the breadboard out and have another look at it :)
 
CanonMan75 said:
I'll dig the breadboard out and have another look at it :)

Yes you do that.

You have got me interested and I loaded the source file in MPLAB to see how it performs.

By setting the breakpoint on the start of horizontal sync tip instruction, the results on the stopwatch indicates that exactly 64us has elapsed between each break. So this cannot be the reason for your present problem and the HSync pulses is indeed occurring every 64us.

@Nigel: Can you break this into another thread? Thanks.
 

Attachments

  • Video_timing.gif
    Video_timing.gif
    18.9 KB · Views: 623
Daft question coming up, but I feel inclined to ask.....

Is the sync signal meant to have negative- or positive-going pulses?

It could be that my transistor driver stage is causing the problem...
 
Nigel Goodwin said:
Sync pulses are negative going, peak white is high, and black level is low (with the sync pulses even lower).

That's in terms of composite video, with the sync pulses lower than black level, isn't it?

I'll confess to being a bit of a noob with video signals... audio and digital sinals are more my cup of tea :D
 
I did remember seeing images on different internet sites which showed the HSync tip as the highest level on the waveform diagram. Perhaps the author is just showing a typical signal from some points inside a TV where the signal is inverted for some reason.

So this might be why the confusion about it happens.
 
CanonMan75 said:
That's in terms of composite video, with the sync pulses lower than black level, isn't it?

Yes, but with RGB the composite video signal is normally used for the sync, if you were trying to use just the sync it might not work on a TV?.
 
eblc1388 said:
I did remember seeing images on different internet sites which showed the HSync tip as the highest level on the waveform diagram. Perhaps the author is just showing a typical signal from some points inside a TV where the signal is inverted for some reason.

So this might be why the confusion about it happens.

Possibly?, it under goes various inversions in the set - and is actually fed to the CRT with black level high, and peak white low (because it feeds the cathodes of the CRT, where low is more beam current).

Also, the old 405 TV system used to use the opposite signal polarity - just to add a little more confusion! :D
 
Nigel Goodwin said:
Yes, but with RGB the composite video signal is normally used for the sync, if you were trying to use just the sync it might not work on a TV?.

Now that could explain a lot. That could be why it worked on a Philips CM8833 monitor quite happily, but not on the two tellies I tried it with!

Anyone got any MC1377's going spare? :D

Just out of interest, I seem to remember from the 1377's datasheet that it's supposed to use a delay line and a coil somewhere, and neither of these two (very similar) circuits bother with them. Does it have much of a negative effect on the picture?
 
HI,

I made my Pattern Generator starting from this:

**broken link removed**

**broken link removed** (in english)

My version is the 2nd (with up-down switch) and encoder is AD725 from Analog Devices but tested also with BH7236AF (ROHM) and CXA1645 (SONY)

I suggest you this generator: easy to build, many patterns, only 2 switch.

Regards.
 
up for this..I'm sorry for reviving this old topic but I really need this..any idea for NTSC version of similar circuit?

TIA
 
Do a google theres a few designs about.
Newer sets are more flexible, I have messed with video text and the 16f628, I found that tv's were tolerant of line frequencies, only my vintage set didnt like it, vertical sync was also an issue for the old sets, video games from the 80's used to have a different vertical synce train which on some valve sets messes up the vertical.
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top