Want to play Pong on your Oscilloscope?

Programer

Active Member
Reputation
0
I always have! I don’t know why, but I like the idea of using an oscilloscope screen as a general use video display. Why not? In my case it sits on my desk full time, has a large screen area, can do multiple modes of display, and is very easy control.
Making an oscilloscope screen do your bidding is an old trick. There are numerous examples out there. Its not a finished project yet, so be nice. It is actually rather crude, using a couple parts I had on hand just on a whim. The code is a nice mixture of ArduincoreGCCish (I am sorry, still learning), and includes the following demos:

Simple low resolution dot drawing
A font example
A very quickly and badly written demo of pong

The software runs on an Attiny84 micro controller clocked at 16Mhz, paired up with a Microchip MCP42100 dual 100k 8 bit digital potentiometer though the Attiny’s USI (Universal Serial Interface) pins. This is a fast, stable and accurate arrangement, but it requires sending 16 bits every time you want to change the value of one of the potentiometers so its also very piggy. I was just out to have some fun and did not have a proper 8 bit DAC. This was the closest thing outside of building one.
Join us after the break for pictures a (very) brief video and more.

This project has a total resolution of 256x256x1. This sounds like a lot of resolution but don’t get too excited. You can have only a few hundred to maybe 1000 pixels on screen before it starts flickering pretty badly. I am sure this can be solved by someone who is not using GCC commands for almost all of an Arduino script, furiously tying to shove 16 or 32 bits of data out of its SPI port PER PIXEL with an Attiny that has no dedicated SPI.

I had originally thought that I was going to do some form of raster scan display, much like a TV or computer monitor scanning a row of pixels one column at a time. You can see examples of this on electronixandmore in the projects section where the author converts RS170 television, and also VGA to an oscilloscope (along with a bunch of other cool stuff). Also take a look at this project that ran recently on Hackaday: NintendOscope.On my little 84 it ended up being extremely slow to scan each and every pixel and then modulating the Z axis on the back of the scope to change the pixels brightness.
Ok fine let’s keep it simple, how about some vector lines? I copied the site’s logo and quickly traced it out using the gimp using its [Web > Image Map] function. This spits out a file like this:









By drawing only points in that file I was able to produce the first “image” below. With a little refinement I produced a slightly cleaner result in the second image. As you can see you have to be very mindful where your little pointer is going because it leaves a trail. I was not really happy with the quality of these first try results, though its generally a very fast way to draw out wire-frame polygons (think Asteroids).


I ended up doing a mix. Instead of scanning every row and column, I only scan the rows and columns that have pixels to show. This produces a dot matrix image. I also needed an easy, but not epic, effort to convert images from computer to AVR. This was accomplished using the gimp, the XPM image format, and a little blob of lua.
Using the Hack a Day logo as an example, I roughly cropped out the skull and then used [Image >> Autocrop Image]. Next I went to [Image >> Canvas Size] and changed this to a 128
 
Back
Top