Hi everyone,
I've been working on a library that allows drawing 2D/3D graphics on oscilloscopes: https://github.com/achydenius/voltage. The library is currently using the dual DAC of Teensy 3.6 for sending suitable voltage to the oscilloscope's X and Y axis inputs. The values written are defined by tracing the lines with a standard line drawing algorithm. In order to achieve a flicker-free image, the oscilloscope has to be constantly sent data as fast as possible.
I've done some performance profiling and it seems that the drawing and especially the DAC writes are the clear bottleneck. I've already done some optimizations, e.g. inlining the DAC write calls, but the amount of geometry that can be drawn without flickering feels still a bit limited. The Teensy 4.x series would be otherwise perfect for the task, but they lack the built-in DAC. I've seen people using external SPI DACs with Teensy 4, but I was still wondering if it solves the performance problem – I assume then the speed of the SPI bus might be a limiting factor? I've had a bit hard time finding some exact information about the DAC frequencies, bus speeds, etc. so if anyone here has an insight on these, I'd be super grateful.
Thanks!
(edit: Just noticed that the Project Guidance forum might have been a more relevant place for the question, but I hope it reaches people here as well )
I've been working on a library that allows drawing 2D/3D graphics on oscilloscopes: https://github.com/achydenius/voltage. The library is currently using the dual DAC of Teensy 3.6 for sending suitable voltage to the oscilloscope's X and Y axis inputs. The values written are defined by tracing the lines with a standard line drawing algorithm. In order to achieve a flicker-free image, the oscilloscope has to be constantly sent data as fast as possible.
I've done some performance profiling and it seems that the drawing and especially the DAC writes are the clear bottleneck. I've already done some optimizations, e.g. inlining the DAC write calls, but the amount of geometry that can be drawn without flickering feels still a bit limited. The Teensy 4.x series would be otherwise perfect for the task, but they lack the built-in DAC. I've seen people using external SPI DACs with Teensy 4, but I was still wondering if it solves the performance problem – I assume then the speed of the SPI bus might be a limiting factor? I've had a bit hard time finding some exact information about the DAC frequencies, bus speeds, etc. so if anyone here has an insight on these, I'd be super grateful.
Thanks!
(edit: Just noticed that the Project Guidance forum might have been a more relevant place for the question, but I hope it reaches people here as well )