Connecting VGA with jumper wires


Luís Marques

Recommended Posts

I think I'm going insane. I have a Papilio Pro + LogicStart MegaWing. I'm displaying a VGA image by using both (108 MHz, 1280 * 1024 * 60 Hz). So far so good. OK, now I disconnect the LogicStart MegaWing and I manually connect the pins relevant for VGA between the Papilio and the wing by using jumper wires . My VGA display says no signal. I've checked the wiring more times than I can remember. WTF? As a sanity check I tried connecting the relevant wires for a 7-segment display segment (1 segment + 1 anode + GND) and it worked. No luck so far with VGA though...

Can anyone reproduce this issue? Which pins did you connect?

Link to comment
Share on other sites

Yup, I did connect those. I tried multiple (equivalent) pin positions even -- just in case; also at multiple places too, just in case (e.g. multiple GNDs pins connected at the same time). Although looking at the schematic I think +3.3V and +5V are not used for the VGA. The only voltage source (with respect to GND) comes directly from the FGPA pins to the color components and [v|h]sync pins, I think.

Link to comment
Share on other sites

So you are connecting the digital pins r0-r3, g0-g3, b0-b3, and hsync, vsync with jumper wires? Seems like that should work... You should start with troubleshooting the hsync and vsync lines. If those are the only things you connect and they are working correctly then the monitor should say that there is a picture but it will not show anything. But you will get a sync and it will think something is connected. So focus on those first and use a logic analyzer or an oscope to see what you are getting on those lines... Maybe you just have the wrong pin positions or something or maybe the jumpers are disrupting the waveform just enough to change the frequency or something. If you have an oscope just look at the signal and make sure it has the right freq and voltage.

Jack.

Link to comment
Share on other sites

Jack, thanks for the feedback. I tried a lot of things, here are some highlights (not in chronological order, for clarity):

1) When I use Papilio + LogicStart, and manually connect vsync and hsync between the LogicStart VGA plug and a VGA cord by using jumper wires it works (even without connecting any GND!).

2) On the other hand, when I manually connected (using jumper wires) the same pins between the Papilio and the LogicStart it never worked (with or without GNDs). This persisted even when I used a lower resolution / clock rate and/or increased the drive strength of the vsync / hsync FPGA pins or used different slew rate, etc.

3) One of the first things I had tried, thinking I might just have loose connections on my jumper wires (despite doing continuity checks with my multimeter), was to use header pins. So I soldered resistors to a 16-pin header on row B (the one used by the LogicStart for VGA), at first just vsync/hsync and GND. Fail. Maybe my monitor needs to detect something on the color pins? So I solder some resistors for the color pins. Fail. OK, maybe try a different monitor? Fail. Wait, let me check that the header pins are 100.0000% in. I got an image on my TV. That was the only time something other than 1) worked.

4) Given the eventual success on point 3), at that time I had assumed that my previous failures were probably due to improper electrical contacts, although that was a bit strange given that the LogicStart seems to work very well even when it is far from well plugged in. So in a perfboard I soldered 3 rows of 16 pin headers + 6 rows of 4 pin headers, to fully match the 2 Papilio wings / 3 rows and power pins. This provided a very good mechanical connection, similar to connecting the LogicStart, and with continuity testing I verified every pin. Then I soldered the appropriate resistors to replicate the VGA voltage dividers of the LogicStart and checked the connections and total resistance (because I had to use multiple resistors to match some of the values). Then I soldered a VGA connector. Fail. Despite testing for the appropriate continuity and resistance multiple times and in different ways, so far my perfboard has been a failure.

5) Which brings me to my last point. I did all of this without an oscilloscope, which would have helped a lot. For instance, I went back to soldering just two resistors for the 2 sync pins but cutting the resistor pins and connecting wires as short as I could, in an attempt to try to reduce any interference. But that failed too (on my standard monitor, did not try it on the TV where I had the success). Without really seeing the waveform I'm flying blind, my cheap multimeter only helps so much. So today I gave up on this for now and ordered an oscilloscope. I had been delaying this purchase for several reasons, but one of them was that I wanted something that allowed me to reasonably see the waveform for the SDRAM pins, which precludes choosing some of the cheaper scopes. I went for a Siglent SDS1202X (200MHz 2ch 1 GSa/s), which might just cut it for the SDRAM (one tradeoff for the higher bandwidth is that I had to go with a 2ch scope, otherwise the prices skyrocketed...).

So now I'm waiting for the scope before wasting any more time on this. More news next week....

 

Link to comment
Share on other sites

If it helps: there is no need for resistors. You can plug male-female jumper wires into the FPGA board on one side and a 15 pin VGA cable on the other (the diameter of the pin matches).

I'm using this as a standard debug tool in 640x480 just HSYNC, VSYNC, GREEN (on/off) and GND. The voltage is slightly out-of-spec but the monitors I've tried with didn't object.

I think you won't regret buying a scope.

Another immensely useful and free tool is an "activity detector" where you trigger a counter using an unused input and put e.g. every 5th bit on a different LED. Then plug a wire into the input and probe as needed.

You could try to fit a SUMP logic analyzer core into the design (disclaimer, never tried this myself. For me it works as advertised on a 2nd board).

Edit and pay attention to your programming LED. It is possible that the FPGA resets for whatever reason (e.g. random short circuit on 3.3 V when you move the boards a certain way).

Link to comment
Share on other sites

OK, I told you I felt like was going insane, right? I now know why...

So today my oscilloscope arrived. I unpacked it, connected the power, calibrated the probes and explored the menus. Then I started examining the VGA sync signals of the Papilio + LogicStart, so that I knew what kind of signals I should expect to see when I used my homemade perfboard megawing. I explored all kinds of triggers, statistics, etc. Ahh, it's good to not be blind anymore and have a 'scope. Once I was confident I knew how to use this scope and understood the VGA signals I though "OK, time to connect my homemade megawing".

In my homemade perfboard megawing I decided not to match the LogicStart pinout because the layout would not be very convenient for the perfboard I was using. So the first step was to change the .UCF file contents to the one I had written to match my homemade megawing. And as I was doing this I looked again at the contents and suddenly I had a chill: "wait, I have a few pins I'm not using... including the the 7 segment displays I haven't soldered yet... and also... oh my god... I have a reset pin assigned to the LogicStart joystick click... and now this pin is not connected to anything... so it's floating... oh god, don't tell me that...".

So I changed my top level verilog file to ignore the reset port, and re-synthesized. I double-clicked the shortcut I had created to upload the bit file to the FPGA and... I got a 100% perfect image. Not only did I get a good sync, but the colors matched perfectly. So my perfboard circuit had been perfect all along, including the color components. No wonder I thought I was going insane. No matter how much I tried to diagnose the electrical part (without looking at the signals, i.e. just the DC components) I was never going to find any fault. Duh. I feel silly, but also relieved. I mean, my confidence was plummeting. I'm not an EE by training by I though a simple circuit like this wasn't going to be a challenge. So when it did prove a challenge it was time for a bit of soul searching. But now I've come back from hell, having slayed the beast, holding its head by its hair. Muhahaha. Bow before me, silly VGA monitor.

Anyway, that's what happens when you make a silly mistake and 1) assume too much about where the fault generally should lie, and 2) don't have the adequate equipment to quickly diagnose it. Not that I ended up needing the scope to diagnose this...

Thanks for all the feedback, guys.

Link to comment
Share on other sites

Congratulations on finally breaking this one loose. :) The scenario like you describe has happened to me several time too. It's so easy to get the blinders on with this type of work. You think you know what the problem is so you just go further and further down the rabbit hole trying to fix it and it turns out to be something simple somewhere else. 

Good job and I'm sure you will not regret the Oscope.

Jack.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.