Shop OBEX P1 Docs P2 Docs Learn Events
VGA Demo.spin V1.0 unstable horizontal image — Parallax Forums

VGA Demo.spin V1.0 unstable horizontal image

sstandfastsstandfast Posts: 39
edited 2008-07-31 01:16 in Propeller 1
Hello all,

Before I get to my question, let me introduce myself. My name is Shawn and I am a EE student from Oklahoma. All four years of my microcontroller experience comes from playing around with Microchip PICs. I just receintly decided to step up from my beloved PIC to something a little more powerful and my search ended when I found the Propeller. The concept is quite interesting and I look forward to experimenting heavily with my new Starter Kit.

Moving on, like I said I just purchased the Propeller starter kit and when it arrived on Sat. I would have sworn it was Christmas. Being eager to play with my new "toy" I promptly connected everything to my computer and started playing with the demo programs that came with the software just to check out the hardware and make sure everything arrived in one piece. So far, everything has worked EXCEPT for VGA_Demo.spin (v1.0 according to the documentation). It compiles and loads fine, but when it runs my monitor repeatedly flashes the image briefly and then horizontally scrolls to black almost like a PowerPoint transition. To me this suggests horizontal sync issues, especially since the vertical sync is perfectly fine. The demo board will run all the other provided VGA demo programs just fine so I don't think it is a hardware problem (at least with the Propeller) but since I've only been "Spinning" since Saturday, I don't yet have a firm grasp on the language to debug this program. In fact, I was excited when I got the "Hello World" LED blinking on my own. Thus, I'm coming to the experts. What do you think, is this a problem with the code or is my demo board defective? Since school is currently not in session, I don't have access to an O'scope right now, otherwise I'd tell you if there was jitter on the horizontal sync signal. (In fact, one of the projects I have in mind for the Propeller is to build a Scope for personal use.)

Thanks in advance,

Shawn

Comments

  • jazzedjazzed Posts: 11,803
    edited 2008-07-29 17:35
    Maybe you have a loose connection on the VGA? There are some passive components there.
    It has been said that some LCD monitors may not work properly; can you try a different monitor?
    Good luck.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • sstandfastsstandfast Posts: 39
    edited 2008-07-29 21:46
    It's possible it could be a loose connection, but if that were the case, then this problem would be present on all the VGA demo programs, which it's not.· Also, I should have mentioned, this is an old CRT monitor I am using.· I do not have an LCD monitor to try this on.· I really don't suspect hardware in this particular case.· Mainly, I was looking for recognition that there is/was a bug in the program.· At any rate, troubleshooting this will make an excellent project to get familiar with the Propeller and VGA protocol as well.

    Thanks for the advice,

    Shawn
  • jazzedjazzed Posts: 11,803
    edited 2008-07-29 22:43
    Having seen this work before, it was natural to not blame the code.
    However, I find now that neither the shipping example nor the objex version work.
    Anyone know a fix?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-07-30 22:33
    It is quite possible that the monitor your using (a LCD right?) is not capable of displaying the output. This typically occurs because the manufacturer chose to only support standard refresh rates, and to make the situation worse, some manufacturers have some displays that accept any refresh rate while other models won't. To make it work requires fiddling with the driver, or swapping out the crystal with a value that produces the target refresh rate. (this is determined dividing the desired refresh rate by the measured refresh rate, then multiplying·the presently used crystal frequency (5MHz).

    CRT displays will display whatever you throw at them.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • sstandfastsstandfast Posts: 39
    edited 2008-07-30 23:22
    Hi Paul,

    "CRT displays will display whatever you throw at them."

    That's what I thought at first too except I am using a CRT monitor and it still will not display the demo correctly. In fact, I do not even own a LCD monitor to try it out on. I agree that this is probably something to do with the driver and an inconsistant timing problem because the image will appear on screen for a brief moment (just long enough for you to be able to recognise the image) and then it scrolls off screen to the left in a manner resembling the blurred motion lines behind a racecar in a cartoon. It repeats this same process the entire time you have the Propeller running. Once I get versed in Spin and the Propeller, I will sit down and look at this more closely. It should make for an interesting first project.

    Shawn
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-07-30 23:28
    Do the higher resolution drivers work?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • RaymanRayman Posts: 14,234
    edited 2008-07-30 23:43
    Probably has to do with the 70.2 Hz vertical freq that makes...

    Try this change (down in dat section's vgaparams):

    ······················· long··· 420· '380············ 'vd·



    that drops it to 64 Hz...
  • sstandfastsstandfast Posts: 39
    edited 2008-07-31 00:31
    @ Paul
    Yes, this is the only supplied VGA demo that does not work. The Bitmap demo and both the standard and hi-res text demos work flawlessly. As do the tile driver demos. In a PM, Beau Schwabe recommended changing the #vertical pixels to 352 instead of 384 and change the pixel rate clock to 30MHz instead of 35MHz. Once I get a little practice with the Propeller, I will make these changes and post the results. Right now, I'm still mesmurized by my blinking LED [noparse]:)[/noparse]

    @Rayman
    I made the change and it had no effect on the results.

    Thanks guys!

    Shawn
  • RaymanRayman Posts: 14,234
    edited 2008-07-31 00:47
    Well, I guess this is an older monitor. Actually, I'm surprised this mode works on any monitor... It shows up on mine as 720x400@70.2Hz
  • sstandfastsstandfast Posts: 39
    edited 2008-07-31 01:16
    Yes, this monitor is at least circa 2000 if not older. I have a second CRT monitor from the same time frame and it does the same thing on it.
Sign In or Register to comment.