Shop OBEX P1 Docs P2 Docs Learn Events
How signals work — Parallax Forums

How signals work

Hello to anyone reading this!

I am pretty new (knowledge wise) to programming and electronics, so I have a question.

I wanted to start learning how to program a screen using VGA and a small OLED (with the Propeller) that Parallax sells, but I ran into a problem, it is a lot more complex than I thought it would be.

Although there is a lot that I need to learn, I want to know how the VGA signals from the Prop get sent to the adapter. I would have expected to see actual code (VGA spin driver in the Prop library) toggling pins to send the data, however, all I really seem to see is the data getting written to main memory.

In short, I do not know how the Prop sends the VGA adapter the signals. If anyone can explain this to me I would greatly appreciate it!

Additionally, if anyone knows about books that are informative on topics like these. And I am not talking about literally programming the Prop, but more like ones that could be used in teaching about the concepts of programming in a college course (maybe cheaper prices..).

If anyone is wondering... I am in college, but I am more focused on electrical engineering than computer engineering (hard/soft) because of the job market.


Thanks for all the help anyone is able to give!

Comments

  • The Prop includes a bit of hardware accessed by special registers and instructions (VCL, WAITVID) that's basically a clocked shift register. You push a value into the waitvid command and it sends bits out through some pins for you. Those pins are connected to a resistor ladder DAC to convert the raw digital signals to "analog", and those are connected to the pins of the VGA connector.

    The Prop uses 8 pins for VGA (usually). 2 bits each for R, G, and B, one for HSync and one for VSync for timing. The heavy lifting will always be done in PASM code because the timing is tight.
  • JasonDorie,

    Oh. They used that command to send the signals out.

    I am kind of dumb at this stuff, but I should have realized the commands for accessing the video generating hardware should be somewhere in the code! Thanks a lot.

    Also, how would the data be sent on an SPI connection to an OLE
  • You may want to read AN004

    https://www.parallax.com/sites/default/files/downloads/AN004-GUI-StartVGA-v1.0.pdf

    Some of the information on how NTSC works can be applicable. (How the electron beam sweeps the screen, etc)

  • Ke4pjw,

    Thanks!

    I'll look into this.
  • An OLED connected via SPI and a VGA device are completely different things with completely different protocols. They both display buffers of data, and that's about it.

    VGA is driven by the output, meaning the device locks in to the sync signals being output, derives dot timing from those, and proceeds accordingly.

    An OLED will be driven by a driver chip, usually, and that chip handles the display itself. The SPI communication sends commands, configuration info, and data to display, sort of like talking to an old VT100 terminal with a serial port.

    SPI itself is very simple - first you pull a "chip select" pin (usually low) to tell the device you're about to talk to it. Then you set a "data bit" pin and toggle a "clock" pin, repeat 8 times to send a byte. The actual bytes you send will depend on the device, it's registers, etc.

    There are lots of objects in the OBEX that manage SPI-based displays, so it shouldn't be hard to find something to work from. The new Parallax Hackable Conference Badge uses an OLED display, and the Spin/PASM code for that is reasonably easy to understand. It's a block of RAM where each bit is a single pixel. The code updates the RAM version of the display then transfers it to the OLED in a large block of writes. It doesn't have to be done that way, but that makes it pretty trivial to implement.
  • JasonDorie wrote: »
    An OLED connected via SPI and a VGA device are completely different things with completely different protocols.

    Yes, what Jason said.

    There may be OLED displays which accept VGA inputs but the OLED displays sold by Parallax do not use VGA input.

    Which OLED display do you have? Parallax sells a color display and a monochrome display. The two displays require different drivers.

    Besides VGA, the Propeller can also output NTSC signals (also referred to as composite out).

  • If you're interested in learning about the NTSC video standard, you should check out the Hydra manual.

    I purchased a Hydra System because I really wanted the manual the manual by itself was out of stock at the time.

    Not only is the manual now available to download for free but it's also in color. The paper book was black and white. There's a lot of great information in the Hydra manual in addition to the NTSC info.

    I have a list of links to Propeller tutorials here.
  • I have the color oled display with the 1331 driver. It seems a lot simpler to use, however, I will need to start looking around in the obex.

    And I realize that OLED and VGA and very different, but I actually managed to use the demos in the Prop library to get the VGA running before the OLED.

    On the data sheet for the 1331 driver, there is a default mode column on the far left which has a backward slant, \, does that mean optional?

    Thanks for pointing me to the manual, Duane.
  • I'm with Duane on the Hydra System, although I grabbed it since it was developed by Andre LaMothe and I was really into game dev early in my Development career.

    If you look at Chapter 7 in the Hydra book it has a very good explanation on how the Propeller handles the VGA output.

    As far as the 1331 OLED, there is a .zip file with examples for the display in C for download on the product page. That might be a place to start unless you are looking for a Spin version.
  • Thanks for your help everyone!

    I'm gonna need to do a lot of reading,but I thought of a much simpler project to do, while reading up, considering how many pins the Prop has.

    Just going to use a 4x4 square of white LEDs with the Prop and start experimenting with the SPIN language. I also have a joystick that will be pretty cool to use with it.
Sign In or Register to comment.