The link below is about PAL and the main power frequency is 50 Hz.
http://www.rickard.gunee.com/project.../pic/howto.php
The link below is about PAL and the main power frequency is 50 Hz.
http://www.rickard.gunee.com/project.../pic/howto.php
I based my code on the ASM example given in that link. Since both PAL and NTSC use the same signal structure it should work on my TV. I dont have a vertical synch inserted so it just repeats the same thing (synch, pause, gray, white, gray) over and over again.
I followed the Spark Fun MPLAB Stopwatch tutorial and I understand that now but I can not get it to work with my program. I have started a new project and imported the .asm file created by picbasic pro but when I click build it gives me tons of errors. Shouldnt the .asm file be correct?
You have to download the PBP MPLAB plugin
http://www.microengineeringlabs.com/support/mplab.htm
Then you don't need to use the asm file. Start a new project with the wizard, choose PBP as toolsuite, and set your breakpoint directly in your PBP code lines. That's it![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I feel like the biggest noob on the face of the earth.
Gold stars for everyone.
EDIT:
ALMOST! Im so close. Only one thing left. When I hit "Build" I get errors that didn't appear in MicroCode Studio. Most of them are like this:
Error[105] C:\PICBASIC PRO\18F252.INC 19 : Cannot open file (Include File "P18F252.INC" not found)
Error[113] C:\PROGRAM FILES\MECANIQUE\MCS\VIDEO\VIDEO_TEST.ASM 86 : Symbol not previously defined (PORTB)
Error[113] C:\PROGRAM FILES\MECANIQUE\MCS\VIDEO\VIDEO_TEST.ASM 88 : Symbol not previously defined (PORTC)
Error[113] C:\PROGRAM FILES\MECANIQUE\MCS\VIDEO\VIDEO_TEST.ASM 90 : Symbol not previously defined (TRISB)
Error[113] C:\PROGRAM FILES\MECANIQUE\MCS\VIDEO\VIDEO_TEST.ASM 92 : Symbol not previously defined (TRISC)
Last edited by RUBiksCUbe; - 14th November 2005 at 01:09.
Ok I got it to load P18F252.INC but now the errors all look like this:
Error[152] C:\PROGRAM FILES\MECANIQUE\MCS\VIDEO\VIDEO_TEST.ASM 908 : Executable code and data must be defined in an appropriate section
Error[116] C:\PROGRAM FILES\MECANIQUE\MCS\VIDEO\VIDEO_TEST.ASM 156 : Address label duplicated or different in second pass (Z00011)
Error[152] C:\PROGRAM FILES\MECANIQUE\MCS\VIDEO\VIDEO_TEST.ASM 908 : Executable code and data must be defined in an appropriate section
Error[116] C:\PROGRAM FILES\MECANIQUE\MCS\VIDEO\VIDEO_TEST.ASM 160 : Address label duplicated or different in second pass (Z00012)
Error[116] C:\PROGRAM FILES\MECANIQUE\MCS\VIDEO\VIDEO_TEST.ASM 12 : Address label duplicated or different in second pass (_main)
Error[116] C:\PROGRAM FILES\MECANIQUE\MCS\VIDEO\VIDEO_TEST.ASM 165 : Address label duplicated or different in second pass (Z00013)
Error[152] C:\PROGRAM FILES\MECANIQUE\MCS\VIDEO\VIDEO_TEST.ASM 908 : Executable code and data must be defined in an appropriate section
Error[116] C:\PROGRAM FILES\MECANIQUE\MCS\VIDEO\VIDEO_TEST.ASM 169 : Address label duplicated or different in second pass (Z00014)
I got it to compile in MPLAB!!!
I checked out my program on the oscilloscope and I found that whenever the voltage changed, like from 0v to .33v it jumped for about .1us to 2v. I dont know why but instead of outputting a max of 1v my pic is putting out 2 to 3 volts. I guess I need bigger resistors.
EDIT:
Ive been timing everything down to a science and found this site (http://www.maxim-ic.com/appnotes.cfm/appnote_number/734) which has an excellent timing diagram for NTSC signals and I made my program as close as its going to get (one scanline is supposed to be 63.5us. Mine is 63.4)
Last edited by RUBiksCUbe; - 15th November 2005 at 03:33.
Bookmarks