Hi all a few month ago I stumbled across this site
- posted
18 years ago
Hi all a few month ago I stumbled across this site
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
Hmm I will have to try that will take me a while to get the 4MHz crystal thought.
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
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.
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.
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
Here is the circuit
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?
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).
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:
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.
There should be also at least one resistor from /MCLR to Vcc?
Nope I have disabled the MCLR so that it can be used as a normal I/O pin.
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.