Author Topic: X/Y display for a MCU  (Read 3963 times)

0 Members and 1 Guest are viewing this topic.

Offline peter-h

  • Super Contributor
  • ***
  • Posts: 4591
  • Country: gb
  • Doing electronics since the 1960s...
Re: X/Y display for a MCU
« Reply #25 on: March 12, 2025, 08:10:19 pm »
Yes. I think in modern times one would generate a table of x,y DAC samples, all of equal step size, so e.g. a 8x6 font would use 8 vertical steps and 6 horizontal steps, and you feed that to the DAC as I described above: timer -> DAC (DMA-fed). Very low CPU duty cycle. I've done arbitrary waveform generation on the 32F417 on which the CPU load was basically zero.

One would lowpass filter the DAC output so it is nice and smooth. The filter would be tweaked so that the spot "velocity" is just right so the spot does not dwell in the same place.

There is an additional dimension: blanking. Between characters you need to turn off the beam. So you need 2 x DAC plus a GPIO. The DMA probably cannot feed a GPIO pin as well as feeding the 2 x DAC. So you might use DMA to draw each character and then trigger an ISR on DMA complete to flip the blanking pin.
« Last Edit: March 12, 2025, 10:45:25 pm by peter-h »
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline mark03

  • Frequent Contributor
  • **
  • Posts: 753
  • Country: us
Re: X/Y display for a MCU
« Reply #26 on: March 12, 2025, 10:15:25 pm »
In the spirit of the curvy "circle drawing" technique, I would eschew the digital-style characters and look for something nice and flow-y, maybe even like cursive.  But I don't know where to find fonts in that style.  Modern font formats like TrueType are vector in nature, but they define an outline, not a center stroke path, if I understand correctly.  The advantage of the circles & lines approach (looks nixie-ish to me) is that you could throw together the digits, at least, from scratch quite easily.
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 22053
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: X/Y display for a MCU
« Reply #27 on: March 12, 2025, 10:32:48 pm »
In the spirit of the curvy "circle drawing" technique, I would eschew the digital-style characters and look for something nice and flow-y, maybe even like cursive.  But I don't know where to find fonts in that style.  Modern font formats like TrueType are vector in nature, but they define an outline, not a center stroke path, if I understand correctly.  The advantage of the circles & lines approach (looks nixie-ish to me) is that you could throw together the digits, at least, from scratch quite easily.

Gorton font is a classic font for routers
https://aresluna.org/the-hardest-working-font-in-manhattan/
https://hackaday.com/2025/02/15/you-know-this-font-but-you-dont-really-know-it/
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: mark03

Offline harerod

  • Frequent Contributor
  • **
  • Posts: 486
  • Country: de
  • ee - digital & analog
    • My services:
Re: X/Y display for a MCU
« Reply #28 on: March 18, 2025, 06:07:11 pm »
Why not?

For example nearly every cheap STM32 chip has two DAC channels capable of 1MSPS IIRC. And that can be driven with DMA to reduce CPU overhead.
...

The analog bandwidth of those DAC's is much lower. The STM32F407 datasheet claims 3..6µs to within 4LSB for a 10bit jump, i.e 8bit transition. Especially with analog peripherals there is a large difference between the marketing section of the datasheet (first pages) and the actual electrical performance. The ADC's on that chip are abysmal as well. A common problem across many chip families, when trying to combine a CPU with analog stuff.
 
The following users thanked this post: peter-h

Offline TomKatt

  • Frequent Contributor
  • **
  • Posts: 604
  • Country: us
  • Electro-BOOMER
Re: X/Y display for a MCU
« Reply #29 on: March 18, 2025, 08:16:49 pm »
I have a fondness for vector displays and have built several over the years.  My first was based on a 16MHz AVR uc driving a dual output DAC through opamps as a type of 10 bit (1024 x 1024) bitmapped display.  The AVR had sufficient speed to draw things like analog clock faces with hands and numerals without any flickering.  I used Bresenham algorithms to calculate lines and circles on the fly and predefined 8 x 8 font.  The scope I was using did not have a Z input, but in reality that didn't seem to cause any problems because if the dots were far enough apart (as when moving from one object to another) the scope wasn't fast enough to have much visibility for those stray lines.  Likewise, the time it took for the AVR to process each step was sufficient to illuminate the location of the beam - so I didn't need to worry about screen persistence at all.

Those very basic displays were actually quite easy to build and only needed a DAC and opamp for bufferring - but they were very 'blocky' looking.  My later projects were based on faster processors capable of generating much smoother looking displays and used the Z axis for beam intensity. 

You can find many examples of these projects on the web - here are just a few from my bookmarks.  My favorite is the Arduino Due and Teensy projects that have dual DACS built into the ucontroller - that makes life a lot easier.  I’ve hooked a scope directly to the Due’s DAC pins and it works fine.

http://www.cathodecorner.com/
https://www.jmargolin.com/vgens/vgens.htm - Great reading by an Atari vector designer.  He has more vector articles on his website.
https://www.sgitheach.org.uk/crt.html
https://oscilloscopeclocknixiecrt.com/
https://web.jfet.org/vclk/
https://www.nutsvolts.com/magazine/article/the-arduino-graphics-interface-part-1
https://www.nutsvolts.com/magazine/article/tgi-the-teensy-graphics-interface - the basis of my last vector project.  Sadly Teensy 3.6 boards are now impossible to find.

Edit - too bad the old Vectrex vector game consoles are now so highly sought after...  I kick myself for not grabbing one when they were affordable...  A great vector experimentation platform!
« Last Edit: March 18, 2025, 11:04:18 pm by TomKatt »
Several Species of Small Furry Animals Gathered Together in a Cave and Grooving with a PICt
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17747
  • Country: us
  • DavidH
Re: X/Y display for a MCU
« Reply #30 on: March 18, 2025, 09:53:21 pm »
The Tektronix digital vector displays were usually 10 bits along both axis, even when they only used 9 bits.  Of course 9 bit converters have never been common and 8 bits was always going to be too few.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4392
  • Country: us
Re: X/Y display for a MCU
« Reply #31 on: March 19, 2025, 09:42:49 am »
How well (if at all) do the low-end digital scopes (sigilent, hantec, etc) do X/Y mode stuff?
There have been a bunch of neat looking z/y hacks over the years, but real x/y crts are hard to find, out of my reach to build, and I’m not at all interested in acquiring an old clunky analog scope just for experiments.
(Although I do have a vectrex!)
 

Offline TomKatt

  • Frequent Contributor
  • **
  • Posts: 604
  • Country: us
  • Electro-BOOMER
Re: X/Y display for a MCU
« Reply #32 on: March 19, 2025, 10:09:46 am »
How well (if at all) do the low-end digital scopes (sigilent, hantec, etc) do X/Y mode stuff?
There have been a bunch of neat looking z/y hacks over the years, but real x/y crts are hard to find, out of my reach to build, and I’m not at all interested in acquiring an old clunky analog scope just for experiments.
(Although I do have a vectrex!)
Digital scopes can provide diagnostic information with XY modes, but they'll never be a substitute for a vector display.  Not to mention that simply being digital kind of negates the whole  idea to begin with - you might as well just use any digital screen with bitmapped images.  And if you don't want a scope, why bother with X/Y displays at all ???

If you live in more urban areas, keep an eye out on ham swap fests - they're basically a flea market for electronic gear.  I've also picked up one or two small analog scopes for dirt cheap on eBay that I've reworked into display units for my projects.  A small one with a 2"-3" screen doesn't take up too much room.  The old Tek wave monitors can also occasionally be found for a few bucks, but they are rather large.

I can't locate it now, but I know that there's a few sites dedicated to hacking the Vectrex, including the ability to use it as your own display.  I'm very envious lol  ;D  I remember when that console came out and nobody really understood it at the time...  the tiny screen and lack of color didn't help when compared to Atari 2600's or ColecoVision.  The funny thing is that I've been a Tempest fanatic all my life, so I should have appreciated it more at the time.
« Last Edit: March 19, 2025, 02:55:31 pm by TomKatt »
Several Species of Small Furry Animals Gathered Together in a Cave and Grooving with a PICt
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 16271
  • Country: fr
Re: X/Y display for a MCU
« Reply #33 on: March 19, 2025, 03:56:31 pm »
The XY mode on a scope is more commonly used for some measurement purposes and not for animation. You'll more often use persistence in XY rather than need to have a smoothly animated view (which rarely serves any practical purpose apart from using it as a vector display, which is not what a scope is designed for). It was usually "better" in that regard on analog scopes as a byproduct of how they were implemented rather than as a feature.
Some modern digital scopes have a nice update rate in XY, but most low-end ones definitely don't.

You can find kits to turn a CRT monitor into a vector scope (as I mentioned earlier), otherwise you can find old vector monitors for reasonable prices.
Example: https://www.ebay.com/itm/285492214126
 

Offline TomKatt

  • Frequent Contributor
  • **
  • Posts: 604
  • Country: us
  • Electro-BOOMER
Re: X/Y display for a MCU
« Reply #34 on: March 19, 2025, 04:30:01 pm »
You can find kits to turn a CRT monitor into a vector scope (as I mentioned earlier), otherwise you can find old vector monitors for reasonable prices.
Example: https://www.ebay.com/itm/285492214126
I've got a Tek 760A on my eBay watchlist  8)  One day someone will list one at a reasonable price..

Nevermind that - you definitely do not want one of these.  If you come across one let me know immediately so I can dispose of it for you  :P

As for digital scope X/Y... as mentioned, you'd might as well just use an lcd screen for anything other than measurement, because it's all pixels anyway.
« Last Edit: March 19, 2025, 04:34:03 pm by TomKatt »
Several Species of Small Furry Animals Gathered Together in a Cave and Grooving with a PICt
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3453
  • Country: us
Re: X/Y display for a MCU
« Reply #35 on: March 23, 2025, 11:18:49 am »
Edit - too bad the old Vectrex vector game consoles are now so highly sought after...  I kick myself for not grabbing one when they were affordable...  A great vector experimentation platform!

A recent blog post about the Vectrex:

https://www.amigalove.com/viewtopic.php?t=2887

and the Hacker News comments:

https://news.ycombinator.com/item?id=43449326

mention this Steve Ciarcia design which was published in Byte, November 1976:

https://drive.google.com/file/d/1y6SfEN8idhdZ7Y_rNh0zD9uzHECBRDpe/view?usp=sharing
 

Offline TomKatt

  • Frequent Contributor
  • **
  • Posts: 604
  • Country: us
  • Electro-BOOMER
Re: X/Y display for a MCU
« Reply #36 on: March 23, 2025, 02:52:09 pm »
mention this Steve Ciarcia design which was published in Byte, November 1976:

https://drive.google.com/file/d/1y6SfEN8idhdZ7Y_rNh0zD9uzHECBRDpe/view?usp=sharing
LOL - you may not believe this, but I am a HUGE fan of Steve's articles (I used to subscribe to BYTE - the cover art was equally good) and I not only recall that exact article, but I built a project based upon it on my 6502 C64 in asm code with DACS connected to the expansion bus.  It worked on my analog scope.

He also wrote an article about POV displays before anyone knew what a Propeller Clock was  8)

As I said - I love vectors displays  :P
Several Species of Small Furry Animals Gathered Together in a Cave and Grooving with a PICt
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 16271
  • Country: fr
Re: X/Y display for a MCU
« Reply #37 on: March 23, 2025, 04:02:46 pm »
You can find kits to turn a CRT monitor into a vector scope (as I mentioned earlier), otherwise you can find old vector monitors for reasonable prices.
Example: https://www.ebay.com/itm/285492214126
I've got a Tek 760A on my eBay watchlist  8)  One day someone will list one at a reasonable price..

Nevermind that - you definitely do not want one of these.  If you come across one let me know immediately so I can dispose of it for you  :P

What's wrong with those?
 

Offline ColinB

  • Contributor
  • Posts: 31
Re: X/Y display for a MCU
« Reply #38 on: March 24, 2025, 03:40:41 pm »
I've got a Tek 760A on my eBay watchlist  8)  One day someone will list one at a reasonable price..

Nevermind that - you definitely do not want one of these.  If you come across one let me know immediately so I can dispose of it for you  :P
What's wrong with those?
Terrible things will happen to you if you possess one. Therefore since I am so generous, I'll be willing to take it off your hands and protect you from its curse.

Got it?  ;)
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 16271
  • Country: fr
Re: X/Y display for a MCU
« Reply #39 on: March 24, 2025, 03:43:50 pm »
I've got a Tek 760A on my eBay watchlist  8)  One day someone will list one at a reasonable price..

Nevermind that - you definitely do not want one of these.  If you come across one let me know immediately so I can dispose of it for you  :P
What's wrong with those?
Terrible things will happen to you if you possess one. Therefore since I am so generous, I'll be willing to take it off your hands and protect you from its curse.

Got it?  ;)

Come on, they're not this rare. Are they? :-DD
 

Offline LaserSteve

  • Super Contributor
  • ***
  • Posts: 1407
  • Country: us
Re: X/Y display for a MCU
« Reply #40 on: March 24, 2025, 03:50:01 pm »
One of the requirements, with Vector on CRT or Galvo/Laser is an accurate and simultaneous update of all DACS. We usually use "Double Buffering" to achieve this. Some of the better quality Dual or Quad Dac chips feature this update mode.

Here is a good read:

https://www.jmargolin.com/vgens/vgens.htm

https://arcarc.xmission.com/Web%20Archives/Jed%20Margolin%27s%20Web%20Site%20(Aug-17-2003)/uvmath/uvmenu.htm

https://www.jmargolin.com/xy/xymon.htm


If its Atari, and if if had a XY display, it has Jed Margolin in it.

Steve

« Last Edit: March 24, 2025, 03:55:22 pm by LaserSteve »
"Analog and Loving It"
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 16271
  • Country: fr
Re: X/Y display for a MCU
« Reply #41 on: March 24, 2025, 04:15:58 pm »
Yes, something to keep in mind if you want to use internal DACs of some MCUs, which may or may not allow simultaneous update. The ones on the STM32s which have dual DACs normally do, you can update them at the same time if properly configured.

For external DACs, many SPI DACs have that feature too if you use a dual DAC in one chip, but make sure you configure it properly for that (synchronous vs asynchronous update mode). If two separate DACs, then there's usually a dedicated sync or load pin, use it to sycnhronize updates.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf