Back in May '21, I have started a project in which I need to use a Teensy 4.0 board. In the lab we use the Teensy 4.0 board for most of the applications. Because I am familiar with Labview and not much with Arduino, I thought I could try to use Labview also for creating the interface for the data acquisition and control tasks for the experiments we want to run. I want to develop some code for sending signals and reading data from sensors as well as visualizing what is happening in a graphical and more user friendly way than with Arduino core capabilities.
It turned out that the Teensy 4.0 is not listed among the devices supported by the LINX toolkit. I tried to follow the instructions listed here "https://www.labviewmakerhub.com/doku.php?id=learn:tutorials:libraries:linx:misc:porting_device" but I was not able to make all the required changes.
I tried address the list of changes to be made to the .cpp and .h files for the libraries.
However, even with information I found online about the Teensy 4.0, I am still not sure what I should put for the following variables/definitions. If any of you knows what I should put for these variables/settings it would be great. Thank you in advance.
Also, in the Config.h, I am not sure about these changes:
Can anyone help?
Thank you in advance for your attention to this post and for your assistance.
You could base your project on the LinxPjrcTeensy30 files.
For the first version use the existing SPI_CLOCK_DIV values and number of UART channels. Modify it when you have a prototype running on the Teensy 4.0.
LinxWiringDevice.cpp would need modifying to use the newer SPI functions. You may only need to increase the SPI_CLOCK_DIV values due to the faster PLL clock of the SPI interface on the Teensy 4.0.
I think there are 7 UARTS on the Teensy 4.0. They will support the existing baud rates.
The device family value for PJRC boards is defined in Firmware/Source/core/device/utility/LinxPjrc.cpp
DeviceFamily = 0x03;
DeviceId 2 is used for the Teensy 3.0 and DeviceId 3 is used for the Teensy 3.1
You could use DeviceId = 4 for your board.
ARDUINO_VERSION is used in LinxWiringDevice.cpp. It is OK to leave the value set to 105.