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: novenary 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: novenary 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: novenary 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: Dream of 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: novenary 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: novenary 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: Dream of 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: Dream of Omnimaga on November 09, 2015, 05:57:37 AM
Ah ok. What would be the refresh rate?