Shop OBEX P1 Docs P2 Docs Learn Events
ntsc video — Parallax Forums

ntsc video

DGREDGRE Posts: 8
edited 2006-05-31 04:58 in General Discussion
has anyone written code in sx/b for a video generator? Im ok with hor.line timing but Im having trouble with interlacing-Im trying to make a black and white bar generator. I can get an ok 3 step grey scale-black grey and white but my monitor goes out of sync when i try to add interlacing -thanks

Comments

  • BeanBean Posts: 8,129
    edited 2005-12-04 18:47
    I have made several NTSC products and I don't use interlacing on any of them.
    Is there a reason you NEED interlacing ?
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    Those that would give up freedom for security will have neither.
    ·
  • PJMontyPJMonty Posts: 983
    edited 2005-12-05 20:16
    Bean,

    How can you not be using interlacing when the NTSC is based on an interlacing scheme? When the picture is scanned out, it's done every other scanline (a field) followed by all the missing scanlines (the other field). This is interlacing and it's the only way NTSC works. Even if you send the same data on each field you're still interlacing, you're just cutting your vertical resolution in half.
      Thanks, PeterM
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-12-05 20:19
    That is exactly what is done, the vertical resolution is halved.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • BeanBean Posts: 8,129
    edited 2005-12-05 20:27
    Peter,
    I guess it depends on what you call interlaced.

    A "normal" interlaced video signal will do one frame then send a "half-line" at the beginning of the 2nd frame, and that gets the vertical position in between the 1st frames scan lines. Non-interlaced video just sends the same frame 60 times a second. And if you look closely you will see a tiny black horizontal lines between each scan line. This is because it doesn't include the "half-line" of video to get the lines in between.

    Many older video games (Atari 2600) generate non-interlaced video. In other words the same frame 60 times a second.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    Those that would give up freedom for security will have neither.
    ·
  • cbmeekscbmeeks Posts: 634
    edited 2005-12-06 20:07
    I'm also not using interlacing directly. The same frame is just sent twice. This is all you really need unless you are doing something specific.

    On my NTSC system, I support 160 colors, 256x192 pixels and full screen scrolling at 60fps. All you have to worry about is the scanline.

    I've done B/W bars with a PIC at 20Mhz (in assembly) and I know it can be done in as low as 4Mhz.

    What kind of generator are you trying to do? Maybe we can help.

    -cbmeeks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://metroidclassic.com

    =========
    DMCA Sucks
    RIAA Sucks
  • Benjamin_bakerBenjamin_baker Posts: 18
    edited 2006-05-18 03:14
    Kinda off this topic, but yeah, I'd like to get the most color detail possible out of an SX28.

    The color carrier on NTSC uses two signals to describe color.· I Q modulation of _two_ signals with variable amplitude but constant phase and frequency can be described as _one_ signal with variable phase and amplitude, etc.etc.etc.etc.

    Basically, the highest multiple of the color carrier frequency within the abilities of the SX28 is 20 * 3.579545 MHz or 71.59090 Mhz.

    My problem is that I don't know much about crystals or such things, and I can't seem to find a way to generate a 71590900 hertz clock.· I've checked google and wikipedia, and everything seems very expensive or very large or very both.



    The application is a procedurally generated birthday card that just plugs into·a TV set for a friend.· Any ideas?
  • BeanBean Posts: 8,129
    edited 2006-05-18 12:52
    Doing color video with the SX is possible, but it's a cycle-counting nightmare.
    I'd suggest looking at the new Propeller chip. It has color video generation hardware built-in.
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap 4-digit LED display with driver IC·www.hc4led.com


    COMING SOON "SD DATA LOGGER" www.sddatalogger.com

    "I reject your reality, and substitute my own." Mythbusters
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-18 14:20
    I have seen a few forum members post their color video pictures, so we know there are some doing it.· Of course there are some details available at the x-gamestation site, since the XGS does this.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • cbmeekscbmeeks Posts: 634
    edited 2006-05-18 14:56
    I've done it in both software and hardware. Hardware being the best. You don't need such an odd crystal to get color with an SX. All you really need are some extra buffers.

    Here are some pics of my homebrew GPU.

    galaxy.signaldev.com/hardware/gpu/

    I managed to get over 160 colors in NTSC and even hardware scrolling.

    Go over to xgamestation.com and get Andre's book. That will teach you everything you need to know about NTSC and video using the SX.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Metroid Classic:
    http://metroidclassic.com

    Metroid Forums:
    http://eblarg.com/bbs/mc

    =========
    DMCA Sucks
    RIAA Sucks
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-18 15:00
    Thanks for posting your pictures...I'm not even going to ask why you have a DB-25 type housing connected to the SX-Key.· =)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-05-18 16:08
    As reference there are items called programmable oscillators, the programmers typically cost around $100, but some companies such as digikey will program one for you if you call and request it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1+1=10
  • ForrestForrest Posts: 1,341
    edited 2006-05-18 17:05
    Here's more info on generating a color NTSC signal with the SX28. When you place an order for a programmable oscillator from Digikey, they'll program it for you at no charge - just tell them the frequency in the comment section. I think I paid around $8 for a programmed oscillator running at 42.954540 MHz
  • cbmeekscbmeeks Posts: 634
    edited 2006-05-22 12:55
    Chris Savage (Parallax) said...
    Thanks for posting your pictures...I'm not even going to ask why you have a DB-25 type housing connected to the SX-Key. =)

    Hehehe.

    Let's just say I know something you don't....a top secret feature of the SX-Key....

    Nah, I'm just joking with you. The reason I did that was because my workbench is on a table opposite of my computer so I had to string a cable up and over the ceiling to my bench. The reason I used a DB-25 was because that was literally all I had and I had no money to buy a DB-9. I could have waited until next payday and bought some but I just couldn't wait.

    So, I wired the needed pins into a DB-25 and it works perfectly.

    smile.gif

    cbmeeks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Metroid Classic:
    http://metroidclassic.com

    Metroid Forums:
    http://eblarg.com/bbs/mc

    =========
    DMCA Sucks
    RIAA Sucks
  • MayfieldMayfield Posts: 5
    edited 2006-05-23 15:41
    I once built a Full Field Color-Bar Generator using a Pic with its Clock running with a standard 3.579545 MHz Color Crystal.
    The same crystal signal was passed through an Op-Amp that drove a home made delay line with·6 adjustable taps. Each tap fed another Op-Amp that that I could control from the PIC to Pass the 3.58 Color signal for that particular color.
    Only One 'Color Bar' Amp was on at any one time.
    The output DC level of the Op-Amps was also adjustable, just how I'm not remembering, this was many moons ago. I think I chose using Op-Amps over Analog Switches for this reason.
    Finally the Color information was added to the PIC Video generated stuff.

    Clear as Mud.

    In other words·for example, when generating the Red Color Bar the Red Op-Amp would be turned on and the total delay from the·Crystal through the delay line and Op-Amps was such to produce·the Red Signal. I should note,·there was an additional Op-Amp used for the Burst Reference.
    Sounds complicated but turned out fairly simple overall and adjusting the various delays to within 2 degrees was quick and easy using a Vectorscope.
    The Delay Line resembled one·of those straight adjustable Power Resistors, except with very fine wire.

    Using the same crystal for the PIC Clock and color signal greatly simplified the timing in the PIC Coding.
    If I remember, the Burst was the most critical, I think I used 8 cycles, which is the lower limit.

    I did use interlacing, I find that most video devices are very tolerant but some are not.
    I can't remember that the code was all that more complicated for interlacing.
    I do remember that the code was heavy with 'straight-line' coding (not a lot of subroutine calling), most calls were to delay routines and padded with nop's.

    Tom M.



    ·
  • cbmeekscbmeeks Posts: 634
    edited 2006-05-23 15:51
    That's simular to the way I generated color (using Andre's method). I basically would activate a pin that would take advantage of a propagation delay that allowed me to move through the color wheel in hardware. That's how I got so many colors. Proved to be very difficult getting the exact color I wanted though.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Metroid Classic:
    http://metroidclassic.com

    Metroid Forums:
    http://eblarg.com/bbs/mc

    =========
    DMCA Sucks
    RIAA Sucks
  • Benjamin_bakerBenjamin_baker Posts: 18
    edited 2006-05-31 04:58
    I'mma go with forrest's option. I'm glueing and poking all sorts of trash hardware on and into a squishy stuffed puppy. I replaced one of his eyes with a big bead of lead free solder, looped a coil of wire through his left forleg, melted some desoldering braid into a mowhawk on him, etc etc etc. then I cut a USB cable open to get 5VDC at lease 100mA, and stuck it in through his ear, and an RCA cable comes out his back. basically, the idea is to shove a PCB with a couple resistors, a crystal resonator, and an sx28 on it into the guts of the stuffed animal, and have it output a low res full color picture of the two of us, and then a caption that says an inside joke we share.

    Seriously. She's awesome.
Sign In or Register to comment.