CodeWalrus

Development => Hardware => Topic started by: Keoni29 on November 05, 2015, 10:38:31 pm

Title: Displaying bitmaps on an oscilloscope
Post by: Keoni29 on November 05, 2015, 10:38:31 pm
I turned my oscilloscope into a raster display using an FPGA. It generates the horizontal and vertical sweep signals to draw the screen in X. Y mode and then modulates the beam to create the image.
A 256x256 dots image is stored in a framebuffer. I can send bitmap files to it from my pc. The data transfer rate is 4Mbit/s. This allows me to animate the image at 60FPS.
https://www.youtube.com/watch?v=zya7-fk2Ybo
I can use this display for other projects. Eventually I hope to make a computer game that uses the display.
Title: Re: Displaying bitmaps on an oscilloscope
Post by: DarkestEx on November 05, 2015, 11:58:25 pm
Sounds awesome :)
Title: Re: Displaying bitmaps on an oscilloscope
Post by: Streetwalrus on November 06, 2015, 08:50:07 am
This is awesome. :D
I fixed the youtube embed by the way.
Title: Re: Displaying bitmaps on an oscilloscope
Post by: Keoni29 on November 06, 2015, 02:14:34 pm
I would like to convert animated gifs directly to 1 bits bitmap files that I can then stream to the device. I recall that a community member made a gif viewer for ti calculators. Perhaps I modify this tool to convert images to my own format.
Title: Re: Displaying bitmaps on an oscilloscope
Post by: Streetwalrus on November 06, 2015, 04:15:30 pm
I think with imagemagick you should be able to automatically convert images to the format you want then strip the header with a small C program or Python script.
Title: Re: Displaying bitmaps on an oscilloscope
Post by: Keoni29 on November 06, 2015, 07:39:50 pm
If the header is a fixed length I can also strip it using dd.
Title: Re: Displaying bitmaps on an oscilloscope
Post by: Keoni29 on November 06, 2015, 10:37:55 pm
It had to be done. First oscilloscope rickroll.

https://www.youtube.com/watch?v=5HTpikG7GH8
Title: Re: Displaying bitmaps on an oscilloscope
Post by: Streetwalrus on November 06, 2015, 10:41:52 pm
Damn, this is awesome. I'm pretty sure this is actually a first too, looks like you're lucky. :)
Title: Re: Displaying bitmaps on an oscilloscope
Post by: DJ Omnimaga on November 06, 2015, 10:53:13 pm
I can't watch the video yet, but I saw the pictures and am amazed. Good job Keoni28. :)

Imagine playing Reuben Quest on an oscilloscope. :P
Title: Re: Displaying bitmaps on an oscilloscope
Post by: Keoni29 on November 08, 2015, 11:42:51 am
I can also mirror part of my computer screen to the oscilloscope. I just take a screenshot, convert it and send it to the device. I made a script that does this in a loop so the screen refreshes automatically.
Title: Re: Displaying bitmaps on an oscilloscope
Post by: Streetwalrus on November 08, 2015, 12:15:54 pm
That's a pretty cool feature. You should add a VGA input to it and play emulators on the scope. :P
Title: Re: Displaying bitmaps on an oscilloscope
Post by: Keoni29 on November 08, 2015, 12:28:00 pm
You can only turn the beam on and off. There is no greyscale. The vga picture has to be converted to monochrome and that only looks good with dithering. Doing this on the fly would be very complex. First of all you need a high speed AD converter, then the signal needs to be processed in the fpga. It's much easier to make the PC do all the conversions and then send the result to the fpga.
Title: Re: Displaying bitmaps on an oscilloscope
Post by: Streetwalrus on November 08, 2015, 05:59:05 pm
Ah that kind of sucks, I thought you could do some grayscale. :/
Title: Re: Displaying bitmaps on an oscilloscope
Post by: utz on November 08, 2015, 06:01:54 pm
Oh yes, looking good! It'd be even more ace to see some realtime fx on top of the pics/animations though ;)
Title: Re: Displaying bitmaps on an oscilloscope
Post by: Keoni29 on November 08, 2015, 07:17:44 pm
I can sorta do grayscale by making the beam stay at one spot longer to make the dot appear brighter, but it would make the image fuzzy and less stable. With this technique you can display pictures even on scopes without a z-input though. I tested it.
Title: Re: Displaying bitmaps on an oscilloscope
Post by: DJ Omnimaga on November 08, 2015, 08:16:53 pm
So no interlacing would be possible either for grayscale? Either way, it's still cool.

It would be funny if you played Mario Tennis on this oscilloscope, considering Tennis For Two was also played on one. :P
Title: Re: Displaying bitmaps on an oscilloscope
Post by: Keoni29 on November 08, 2015, 08:39:09 pm
I don't think I will be able to get playable refresh rates using the imagemagick commands. FPGA and the bitrate are not the problem, but the screen capture and color to monochrome conversion are.
Title: Re: Displaying bitmaps on an oscilloscope
Post by: DJ Omnimaga on November 09, 2015, 05:57:37 am
Ah ok. What would be the refresh rate?