Shop OBEX P1 Docs P2 Docs Learn Events
10 Years Behind The Times (RE: VGA) — Parallax Forums

10 Years Behind The Times (RE: VGA)

I'm a bit of a JonnyMac-come-lately when it comes to VGA output from the Propeller. Until last weekend, I never cared. Then a customer said he wanted a simple scoring system for his laser-tag game, and he didn't want to have to use a computer to run it. As a programming exercise I knocked up a little demo using a Propeller BOE. The taggers use XBee to send a system message description who just "eliminated" them. This message is used by the taggers to keep track of team scores, and the scoring system to keep track of team and individual statistics. In the end, the team with the most victories wins. If two or more teams are tied, the number of losses is used to determine the winner. The final display also ranks individual taggers by performance (again, if tied for wins, tie-break is via losses).

I spent about four hours coding and the client is thrilled. Now he wants to make it a product which means a board layout and enclosure. For those who have created PCBs with VGA output, I'm looking for connector suggestions.

The VGA driver started with Chip's vga_text object, then I put my spin (pun intended) on it. Comments and suggestions are always welcomed. Essentially, I'm treating the VGA display like a giant LCD with colors.

I know... it's dirt simple. Sometimes simple makes customers very happy.

Comments

  • jmgjmg Posts: 15,173
    JonnyMac wrote: »
    ... For those who have created PCBs with VGA output, I'm looking for connector suggestions.

    Depends if you want cheap or compact :)

    The common compact one used, I think is this
    https://www.digikey.co.nz/product-detail/en/edac-inc/634-015-274-992/151-1125-ND
    good stocks at Digikey

    Cheapest are geneic/standard ones like
    https://www.digikey.co.nz/product-detail/en/amphenol-fci/ICD15S13E4GX00LF/609-5181-ND
  • You could go mini VGA and take up a smaller footprint.
    250 x 226 - 14K
  • MikeDYurMikeDYur Posts: 2,176
    edited 2017-05-13 21:42
    This may be only an Apple specific part, but it sure looks better than the archaic clunky full size version. Of course your going to need this if you don't want the extra expense of a cable. Though strain relief is not going to be anything like the old style.
    300 x 300 - 8K
  • I think that one is Apple-specific. I tried to find the PCB connector awhile back with no success.

    -Phil
  • MikeDYurMikeDYur Posts: 2,176
    edited 2017-05-13 22:21
    I think that one is Apple-specific. I tried to find the PCB connector awhile back with no success.

    -Phil

    That is something that has needed updated for awhile. We have mini-HDMI with high definition video and audio.

    I have a Propeller proto board I installed a VGA connector on for a project, after deciding against the project. I had multiple times I could have used that board, but nothing in VGA.
  • Of course, you have to wonder whether a mini VGA connector is really needed, since most monitors these days are HDMI-capable, and that connector is smaller still. Unfortunately, the needs of the Prop and P2 are not what drive the display market.

    -Phil
  • Of course, you have to wonder whether a mini VGA connector is really needed, since most monitors these days are HDMI-capable, and that connector is smaller still. Unfortunately, the needs of the Prop and P2 are not what drive the display market.

    -Phil

    There really is no reason you can't use the connector of your choice is there?
  • There is if you're trying to sell something and want your customers to be able to use off-the-shelf cables.

    -Phil
  • There is if you're trying to sell something and want your customers to be able to use off-the-shelf cables.

    -Phil

    Specialize.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2017-05-13 23:41
    This is one of the first uses I had for the Propeller since I had done the same thing using bit-bashing of an ARM back in 2005. With the Prop I ended up making a board that fits into a headshell that plugged directly into the back of the VGA monitor, although I favored monitors that had connectors that faced down. The board includes a connection for XBEE, also has dual RS485 that can double as RS422 or RS232, a USB socket that is mostly used with PS/2 compatible USB keypads, and a switch-mode supply. The way I used them was to connect via 4-core phone cable using RS485 and power on the other pair.
    This is a shot of one with my USB serial module plugged in for tests. Field units would have SMPS and possibly XBEE added. The 12V TV monitors are great as I steal power from that connection too.
    PIXIE-m.jpg
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2017-05-13 23:38
    (delete)
    1024 x 576 - 160K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2017-05-14 00:45
    That's a neat way to solve the problem if your board can be made small enough.

    -Phil
  • W9GFOW9GFO Posts: 4,010
    You could integrate a VGA to HDMI converter into the enclosure, or I would guess that there are chips available to do the same that you could include on our board.
  • I would keep it simple and just use the D type VGA plug with the resistors. I've seen some good VGA examples on the Obex author Kwaben Agyeman has some good ones. But you are a pretty savvy coder yourself. I've used several JM objects that worked great.
  • kwinnkwinn Posts: 8,697
    I simply soldered a very short cat5/6 cable to the pads on my project board and the 15 pin vga connector on the other end, and mounted it on the back of th monitor. Works well and takes up very little space.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2017-05-14 04:24
    Btw, if I need to connect to VGA from a board I normally just have a 6-pin strip header on the PCB as it is simple, cheap, and compact. I then have a cable with the 6-pin plug on one end and the VGA male on the other. (R,G,B,H,V,GND)

    edit: I've also considered using 10-way IDC with one row all grounded.
  • JRetSapDoogJRetSapDoog Posts: 954
    edited 2017-05-14 22:29
    I often use driver boards for LCD screens similar to those in displays that are used for car headrests, and the driver boards for those typically have a 12-pin PH2.0 connector on them, so that's what I put on my PCB's (each of the 5 video signals has a separate ground, and I don't use the last 2 video monitor communication/sensing pins). Of course, if one goes that route, then one usually uses a ribbon cable splayed at the end(s) to a PH2.0 connector(s). Originally, I tried building such cables by hand with a costly crimping tool, but my hand-built cables proved somewhat unreliable under repeated insertions and pulls. So, I ended up buying a bunch of cables at a cheap price from China, which saved my sanity and hair, as they have proven to be quite reliable (though I still try to grab some of the plastic connector shell when inserting/pulling the cables, of course). Such a solution is pretty space efficient, though not quite as small as what Peter mentioned (and there's also the need of a 4-pin PH2.0 power cable if connecting to a driver board directly, rather than a power jack in a housing). However, if you want to use some kind of standard VGA cable, that might not be the way to go. Hmm...come to think of it, some of the driver boards I've bought for raw panels come with a cable with a standard D-sub 15-pin VGA connector on one end and the requisite 12-pin PH2.0 connector on the other end, and they also have a similar cable for power. So that would be one way to get a cable. But that refers to driver boards for small LCD screens, such as in the neighborhood of 7" diagonally. If you will be connecting to an external, standalone monitor with a built-in driver board and standard VGA and power connectors, then there'd be no real reason to use a PH2.0 connector, of course. If you're using either a small VGA screen that's in a housing or a "giant" standalone monitor, you can probably ignore my comment completely, now that I think about it. From your picture, it appears that you're using a display with a housing (a monitor), so you probably need standard VGA (or mini-VGA) and power cables on the monitor end (but if you were integrating your own panel and driver board, then the options would be different).
  • JRetSapDoogJRetSapDoog Posts: 954
    edited 2017-05-14 23:16
    BTW, regarding the monitor shot, I wonder why the player listings for Teams C and D only show 2 players per team, whereas the listings for Teams A and B show three players per team. Perhaps there's one player not shown (off screen) for each of teams C and D). At least that appears to be the case based on the team totals given on the right which don't seem to add up otherwise (though perhaps this is just a mock-up screen). Anyway, in that you have 15 vertical lines available in that driver, you could cut into (eliminate) your top header on the left half of the screen in order to be able to display a total of 12 player lines (4 teams of 3 players) instead of just 10 lines (though maybe you're using some kind of scrolling for the player list).

    [See my update/mistake below for the following] Hmm, Jon, if cutting into your header, what you might do is partly or fully eliminate the horizontal line under "Congratulations" (at least on the left side) as well as the "Congratulations" text line itself to accommodate a 12-player listing. Then, just use a single line of inverse video (such as black or blue text on a white background) across most (or all of the) top. While the Propeller font box lines you use look nice, they *perhaps* don't stand out at the top in the header area as much as a single line of inverse video text would. At least that's what my eye tells me after having had a lot of experience designing various displays and making needed compromises to work with various fixed-position tile map displays. I'd also like to suggest something for the "WIN" and "LOS" headers, but I can't think of what it would be (though perhaps using a two-letter abbreviation would be sufficient if the totals will hit double figures at most).

    Update: Doing what I suggested for the inverse video header at the top would, I think, require redefining at least one or two of characters in the font to get flush sides on the left and right, which would require driver modifications. So maybe that's not feasible. I think it would look good if possible, though. Maybe you don't need things perfectly flush, not sure, need to re-think it. Of course, your header line at the top could go all the way across, edge-to-edge, but that might look a little funny (not match up with your box lines). Yeah, I forgot that I was using a driver that allowed some of the font characters to be remapped and user-defined. Sorry about that. But I still like the idea of a reverse-video top header. So, you might consider dropping the box lines on the left and right sides, which could be considered superfluous, anyway, or maybe make the screen too busy as they are close to the bezel edges anyway (though, overall, I like them) As mentioned, there are almost always compromises to make with these tile-map screens, but with some fiddling (like by using user-defined characters) and thinking about abbreviations and centering and so on, one can usually come up with something that looks stylish enough, if not beautiful, which you've already done. So, as with my other comment, likely ignore it if you are using a scrolling player list. But if there are a maximum of 4 teams and each team has a maximum of 3 players, then I'd consider listing/displaying all 12 of them on the screen at the same time with no need of scrolling, as one usually wants to look at a scoreboard at a glance without the need for scrolling. That might be a lucky coincidence, though. But as you suggested, simple is good.
  • The layout design is fixed at this point -- it accommodates things that happen during live play that are not seen in this end-of-game image. In this image the right side shows the team scores during the game, wins versus losses. The left side is the top 10 players ranked by victories, then by losses. The header changes dynamically through the game, so this layout works well and is visually appealing to the customer.

    My request for suggestions was on the VGA object and connectors, but thanks for the thoughts. This is going to be for a low-cost product. Next we'll work on an RPi version with a fancier output.
  • JRetSapDoogJRetSapDoog Posts: 954
    edited 2017-05-15 06:13
    Figured not all the players were listed, but didn't pick up on the sorting based on wins first and then losses. So it's a dynamic Top-10 list that can change during game play. Makes sense. A leader board, of sorts. Anyway, sorry for my rambling posts.

    Another VGA object that pretty nice is Kye's VGA64_TMPEngine. I believe it's the one that can mix boxes with text (though I may be thinking of one of his other drivers (which might not be in the Obex)), kind of a enhanced tile map driver, though it takes more buffer memory for such functionality (which is why I haven't used it recently 'cause I'm typically memory constrained). If I recall correctly, you can display text down half a row, which sometimes helps with vertical centering. Anyway, it's a 40-column driver, which would mean that characters would be somewhat narrower than what you have with Chip's driver. And since you're doing a scoreboard (that might not be read up close), then having wider characters (like you already have) is probably better (unless you need more columns for names, etc.). Still, I thought I'd mention Kye's driver for future reference, as the boxes it allows to mix in with text could come in handy at some point. Or perhaps a driver like that could give you "fancier output" without moving to RPi, though there might be other reasons for moving. Gotta love the reliability and simplicity of a Propeller-based solution, though, whether as a prototype or in production.
  • During game play, that list is that last ten events (victories; shows shooter and victim in their team colors). At the end of the game (as shown), the top ten "shooters" and stats are displayed.

    We have other reasons for moving to the RPi (or laptop) for the fancier output. There has to be a very clear distinction between the low-cost product, and what's offered above it.
  • Oh, I see now. And good job on getting things up-and-running quickly and looking good.
  • Client is kind of a "I want it right now even though I'm not giving you a specification" kind of guy. Makes things tricky at times. He's hating that I have to layout a PCB and that it will take a couple weeks before we have a product he can sell (given everything else happening).
  • Looks like this customer understands minimum lovable product. Good. Those sales will prove out what is needed to move the higher cost, nicer option.
  • Late response, but I would go with the standard connectors with solid solder or screw mounts to board and possibly through to bottom half of case to handle maximum abuse/wear and tear over time. Escecially if these are being sold into less than permanent installations. Go for max survivability for the product. Perhaps also pot the wearable side as well.
Sign In or Register to comment.