Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

This code allows you to use an oscilloscope with an X-Y-mode as a vector display.

License

Notifications You must be signed in to change notification settings

MykBamberg/Teensy3.5VectorDisplayController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 

Repository files navigation

IMPORTANT NOTE: The Teensy 3.5 will most likely be discontinued soon. "PJRC recommends use of Teensy 4.0 / 4.1 for new projects. We do not believe supply of chips for Teensy 3.x is likely to ever fully recover. These chips are made with 90 nm silicon process. Most of the world's semiconductor fabs are focusing on 45 nm or smaller, leaving limited supply for older chips. We anticipate the cost of these chips is likely to increase as the supply continues to dwindle." I recommend to only use this for personal projects.

Teensy3.5VectorDisplayController

This code allows you to use a Teensy 3.5 and a vectorscope (oscilloscope on X-Y-mode) as a vector display.

Firmware Installation

  1. Install the Arduino IDE and Teensyduino (Arduino IDE with Teensyduino for Arch based systems)
  2. Extract DrawVector and open DrawVector.ino in the Arduino IDE
  3. Make sure that the Teensy 3.5 is connected and select it and its serial port under the "Tools" tab in the Arduino IDE
  4. Hit the upload button and wait for the code to compile and upload

Hardware Configuration

Connect the pin labeled "DAC0" to the vectorscope's "X"-channel and the pin labeled "DAC1" to the "Y"-Channel. Afterward, you have to connect the Teensy's ground with the vectorscope's ground. (Teensy 3.5 pinout)

NuGet Package

NuGet-Release

Package Manager: Install-Package VectorOutput -Version 1.1.3

Usage

Create a global VectorOutput variable:

private VectorOutput vOut;

Request the COM port of your Teensy and create a new VectorOutput instance:

string? comPort = VectorOutput.ComPortForm();
while (comPort == null)
{
    comPort = VectorOutput.ComPortForm();
}

try
{
    vOut = new VectorOutput(comPort);
}
catch (Exception ex)
{
    MessageBox.Show(ex.Message);
}

Display an image:

vOut.Lines = new ushort[][] { new ushort[] { 0, 0, 0xFFF, 0xFFF } };
vOut.DrawFrame();

Note: Lines is a jagged array of ushort arrays. The ushort arrays represent lines and always have a length of 4. The first two ushorts are the starting X and Y coordinates of the line, the last two are the ending X and Y. All coordinates have to be between 0 (bottom/left) and 4095/0xFFF (top/right).

About

This code allows you to use an oscilloscope with an X-Y-mode as a vector display.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published