PIC16F628A blank composite video test

Hi all a few month ago I stumbled across this site

formatting link
and was compeled to get into microcontrollers and do something similar. Anyway so I bough a PIC16F628A and JDM programmer. Now I am starting of simple so I made this blank composite video test
formatting link
All it dose is create a the syncs and leave the screen blank so that the TV can lock onto the signal. Unfortunantly it dose not do this for some reason the TV dose not detect the signal, when I run the program through a simulator with an osciloscope eveything looks OK. Anyone go any ideas of what the problem might be?

Reply to
bmd_1985
Loading thread data ...

You are using the internal RC oscillator, which may not be accurate enough for your TV set. Try a 4 MHz quartz, change oscillator config accordingly. Have not looked through the code, though.

HTH Wolfgang

--
From-address is Spam trap
Use: wolfgang (dot) mahringer (at) sbg (dot) at
Reply to
Wolfgang Mahringer

Hmm I will have to try that will take me a while to get the 4MHz crystal thought.

Reply to
bmd_1985

BTW: How did you know your TV set did not detect the signal? You are feeding it an all-black picture, don't you?

Wondering, Wolfgang

--
From-address is Spam trap
Use: wolfgang (dot) mahringer (at) sbg (dot) at
Reply to
Wolfgang Mahringer

Can you post some scope photos of the video signal you're generating?

Don't post them to this group as it does not permit binary attachments.

Reply to
Jim Stewart

I would know if the signal is being recieved because the screen stays blue when no signal is detected. Also the simulator that I use dose not show the oscilloscope properly you would only be able to see a small part of the signal (around 30 frames). its not like a proper CROW that shows the whole signal. Apart from that their is no scale so you can not tell for how the timming or anything from what it shows. All you can see is weather the signal is high or low.

Reply to
bmd_1985

Ah, OK, I see.

Well, in that case, it would be easiest to find somebody with a suitable oscilloscope and check your output signal there. I found that TV sets are quite tolerant on the scart/cinch inputs.

Which is of not much use here :-( There must be a major problem in the signal generation. Can you show the ciruit where you mix the BAS Signal together?

BTW: In your code you are using a 4MHz clock, which gives you a 1 microsecond instruction time on PIC16. Then you select a

1:4 prescaler on timer 0, which gives you 4 microsecond steps on timer 0. The comments in your source seems to assume 1 microsecond steps. So your signal is 4 times strechted, no wonder your TV doen't recognize it. I recommend using a 16MHz crystal on your PICs clock inputs.

regards, Wolfgang

--
From-address is Spam trap
Use: wolfgang (dot) mahringer (at) sbg (dot) at
Reply to
Wolfgang Mahringer

Here is the circuit

formatting link
Well around were I live I can only get 20MHz, 10MHz, 8MHz and 4 MHz. For som reason I assumed that if I was running the PIC @ 4MHz that it was executing 1 instruction per cycle thus 4 million instructions per cycle so if I got a quater of that it would give me 1 instruction per mS?

Anyway would I be correct to assume then from what you have said above that if I turrned off the prescaler that the timmer would be then giving me one beat per mS since I can not get hold of a 16MHz crystal?

Reply to
bmd_1985

Damn I don't know how to edit my post so I am gona have to double post. When I said mS i actually ment uS (microseconds).

Reply to
bmd_1985

Normally just move the cursor with rodent or arrows, then play with the backspace and delete keys.

Please learn to include context. Quick instructions below, more at the URL indicated.

--
"If you want to post a followup via groups.google.com, don't use
  the broken "Reply" link at the bottom of the article.  Click on
  "show options" at the top of the article, then click on the
  "Reply" at the bottom of the article headers." - Keith Thompson
More details at:
Reply to
Chuck F.

A PIC running at 4MHz will execute 1 single-cycle instruction per microsecond (uS). The 4MHz clock (Fosc) is internally divided by 4 to create the main clock signal.

You really need to read the datasheet. You should also find an LED blinky program to verify that your PIC is indeed running. BTW, most people want PWRTE turned on. TMR0 does not increment for 2 tick times after modifying the value of it.

BTW, SUBLW subtracts W from the Literal, not the other way around.

formatting link

Reply to
Anthony Fremont

There should be also at least one resistor from /MCLR to Vcc?

Reply to
Ruediger Klenner

Nope I have disabled the MCLR so that it can be used as a normal I/O pin.

Reply to
bmd_1985

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.