I see your point. We define that variable in the main() function, does it count as dynamic allocation?
What will happen if we define them in the global scope?
guessing the Matrix is dynamically allocated?
Quick search suggests that is the case and you can make and provide 'local' memory as indicated in the reply a couple down from the top here:...
The polling that causes the host to transmit IN tokens happens entirely in the EHCI hardware, so there is no "easy" way.
The hardware does have an option to interrupt on NAK, but I've never tried it. If you want to...
If you can go slightly wider, you might look at the Teensy micromod, which is a Teensy 4.1 with M.2 hookup instead of using through hole pins that Sparcfun sells. Now, at first glance, the carrier boards that they have...
I can confirm all the stuff beyond the 5 through-hole pin is non-essential for Teensy 4.1 to run. You'll just lose 18 I/O pins, SD socket, and PSRAM pads.
How to "safely" cut the PCB is a good question. It is a 6...
Hi everyone,
I am seeking for a little advice here...
I have an already finished project of a gaming handheld driven by a RP2040. Unfortunately, the RP2040 struggles to deliver the necessary performance.
Now, I...
Hi everyone,
I am doing my project with Teensy 4.1 and I need to report the memory usage with respect the size of the matrix variable. I am using Eigen right now.
The simple script is like this (there are more...
Hi all,
There are a lot of RS485 modbus programs but the code below works out of the box and is fully tested on a T4.0, T4.1 and ESP32C3 for the ESP32C3 you need only change the Serial5 to Serial0.
Look at the...
Hi,
I've got a teensy 4.1 connected to an FPGA to handle all of the usb host protocol stuff. Right now, the system is working with a 4khz mouse and it is great. One minor source of annoyance is that the data...
Just looking for a quick gut-check on choosing an appropriate MOSFET and calculating the resistors properly. I'm a software guy and never really "got it" with electronics.
I have done this same setup with an older...
We are trying to use the Teensy in one of our product and the question has come up as to what is the exact part number of the fuse used in the:
* Teensy 3.2
* Teensy 4.0
They seem particularly concerned on...
Twos complement is just the typical number format used by machines.
From the MPU6050 register map and descriptions datasheet:
-2857 / 340 + 36.53 = 28.127 degrees celsius = 82.63 degrees F.
My reply was...
That actually looks correct to me. Look at the register map and the formula is:
Temperature in degrees C = (TEMP_OUT Register Value as a signed quantity)/340 + 36.53
For your example, I get 28 C, about 83 F....
All,
I'm using an MPU605 with Teensy 3.2 and I'm trying to get the temp, which is returned in 16-bit 2's compliment. I've found some explanations on converting but my conversions are way off.
int16_t...
1mV has got to be lower than whatever the threshold is on the reset pin. Additionally, the issue also happens somewhat intermittently with the battery removed; in this case, however, pressing the button to resume the...
Thanks @KurtE and @PaulStoffregen, this compiles and runs and an initial test looks like comms are performing as expected. I will do a little deeper testing in the next day or two, but so far all looks good.
I am using Teensy 4.0 and Audio Shield. I am trying to create overdrive and distortion effects and I'm guessing I could use the waveshaper and envelope, but I just don't know how. I would also like to be able to...
I have attached the WireIMXRT.h and WireIMXRT.cpp files. The suggested edited portions are listed below...
From WireIMXRT.h
//#if defined(ARDUINO_TEENSY_MICROMOD)
extern TwoWire Wire3;
//#endif
From...
Not sure of the answer to the question - cool that it works except the feedback part.
Edited p#1 to include the ... tags using the # on toolbar.
That retains code formatting/indentation for readability.
If...
Hello,
My first time posting so apologies in advance for any stupid questions, my lack of knowledge and potential lack of clarify in my question.
Background:
I'm creating a custom midi controller with 18 buttons...
I did some testing.
Turns out that the DQS is daisy chained through that pin.
If I change the registry of AD_B1_09 instead, I can use the pin normally.
IOMUXC_FLEXSPIA_DQS_SELECT_INPUT = 0b1;...
Sounds like you're really close.
At this point, probably best to share your modified WireIMXRT.h and WireIMXRT.cpp so I can others like Kurt can take a look.
If using forum's Quick Reply, click Go Advanced to get...
Has worked when tried here since Beta 4.0 and 4.1.
The button to GND must not be going low enough? 1 mV doesn't seem like much - but something is keeping it from seeing the needed 'drop' to GND it seems.
In that...
Hi all,
I built a custom board based on the Teensy 4.1
I needed more I/O than the OG teensy board could offer and I had to fit the full board in a tight space, so having a teensy mounted to a shield was not an...
I've got a Teensy 4.1 on a custom board that's having issues with the VBAT / 3.3V regulator suspend. There's a feature where, when VBAT is connected, the Teensy will "remember" its power state when 5V is removed;...
F
This must be added in WireIMXRT.cpp to get the I2C clock on 2 MHz
} else if (frequency < 1000000) {
// 400 kHz
port->MCCR0 = LPI2C_MCCR0_CLKHI(26) | LPI2C_MCCR0_CLKLO(28) |
LPI2C_MCCR0_DATAVD(12)...
Hi -
Sorry it's been a few years since I've played with my Teensy 4.0 stuff.
I have a new project that uses an AD7991 4-channel ADC for analog input. Is there some example code for this, including which libraries...
Looking at the color lines of the circuit with fresh eyes, I think it could be simplified to get rid of four resistors?
/*
* INTENSITY (13) <-- 536R --\
* |
* GROUND <------ 536R...
Thanks and no it was not.
I bread boarded the R2R ladder and VGA connector. I don't think I know about FrankB's board. The schematic is shown above and in the VGA_4bit_T4.ccp file at the beginning of the file. Most of...
I programmed AudioSynthWaveformModulated with two additional modulation inputs..
The modulation inputs can be connected to any modulation source (envelope, LFO and more..) in the AudioPatch.h
waveformMod into...
Hi guys, im in a bit off a struggle with the project. The code seems to be correct, I followed al the steps and I dont get any errors. The Teensy 4.0 is solderd to the Teensy Audio-board and I know my hook switch is...
You have chosen a challenging problem, one that may not have a workable solution by direct manipulation of digital I/O. If you want to learn more about C++, perhaps work through examples in various libraries and online...
@jmarsh - I have been playing with FlexIO2VGA off and on for the last few months now. It has been a lot of fun:)
I thought you might be interested in what I have come up with so far. I created a library called...
Yes, I had seen this post before. But unfortunately I am quite a beginner when it comes to C++ and Teensy. For this reason I don't understand the program described there at all.
I could possibly copy it, but I would...
Did you perhaps see this thread? Especially message #21 where forum member ntyrell seems to have it working on a Teensy 4.0: "i have precise timing control over everything".
Paul
Thanks @PaulS.
I just hooked my analog oscilloscope to the signal and I don't see any interruptions in the voltage.
I actually hadn't thought of the effect you mentioned here.
My digital Osci should have ...
Usually best to use RX1 and TX1 (pins 0 and 1). Any of the others can also work, just make sure you use the connect name rather than Serial1.
Don't forget to also connect GND between the boards.
Heyya! I'm trying to connect a Teensy 4.1 to an ESP32 -- mainly to send data from Teensy to ESP32, and then over to my computer. There are multiple RX and TX pins on both boards -- I was wondering which to use, if there...
Yes, your scope is playing tricks on you. Your scope's sample frequency (2MSa/s) is very close to exact 2x your 1MHz signal (something to do with Nyquist...).
Using your code, this is how my scope's picture looks when...
Hi Sandwich - I'm also trying to change the value of the AUDIO_GUITARTUNER_BLOCKS and running into a similar issue where Teensyduino will compile with the application / install directory version of analyze_notefreq.h -...
Your program seems okay, so my first guess would be that you have a measurement issue. Can you take a step back and tell us what you are trying to do, and why you are producing this 1 MHz square wave with a digital...
IntervalTimer.h now has just one version of begin() that uses "template <typename period_t" and handles both integer and float period arguments, but there are still two versions of update(). One takes unsigned int and...
Paul,
It looks like your suggestions now allow the firmware to compile and upload, but the sketch fails/freezes on Wire3.begin(). If I remove this, I can call some other things like Wire.BeignTransmission(), and...
On page 3 the datasheet says it outputs 0 to Vref.
The built in VREF is 2.5V.
The first page of the datasheet says the power supply range is 2.7 to 5.5 volts.
Only updating to 1.58 isn't enough. You need to actually edit WireIMXRT.h and WireIMXRT.cpp.
ARDUINO_TEENSY_MICROMOD is defined when you select Teensy MicroMod in the Tools > Board menu. It supports MicroMod Teensy...
I wasn't able to find those lines of code in the WireIMXRT.h/.cpp files so I updated to a newer version of Teensyduino (Old version 1.55, New version 1.58), and now I see these lines of code. They are just how you...
Look at WireIMXRT.h/.cpp
You will find an area in it like:
#if defined(ARDUINO_TEENSY_MICROMOD)
PROGMEM
constexpr TwoWire::I2C_Hardware_t TwoWire::i2c2_hardware = {
CCM_CCGR2, CCM_CCGR2_LPI2C2(CCM_CCGR_ON),...
We have developed a custom pcb, based on the Teensy 4.0 schematic, but we brought out 2 additional lines (I2C) from the processor that we intended to use with "Wire3", but the Wire library does not seem to support...
What is wrong with my code.
I noticed strange effects on the oscilloscope. With a period of several seconds my clock signal breaks down.
I noticed this only by chance, normally I didn't pay attention to such late...
You would use a 5V supply (like V USB) to power the DAC and a level translator like 74AHCT125 to convert the 3V3 Teensy logic to 5V0. You would also need something like 4.7μF + 100nF supply bypass caps on AVdd.
...
Thanks for the reply, that sounds great!
Just a shame that the LC is out of stock in Germany right now... I guess I should to try the 3.2 or 4.0...
Or do you have another idea about a low-cost version?
Thx for the quick response. For me it's working fine with 3 or 4 sample players. Haven't tested some features like crossfade, but pitch, forward loop are ok in my initial tests
As mentioned in the Code Security page:
https://www.pjrc.com/teensy/td_code_security.html
If you start up Arduino on your Ubuntu machine, and then use the file->preferences command,
the resulting dialog will...
It depends on contents of the preferences.txt file.
Simplest way is to run Arduino 1.8.19 with Teensyduino 1.58 installed. Then click Tools > Teensy 4 Security. It will show the full pathname where key.pem is...
Every Teensy can meet your need for at least 16 digital plus 4 analog inputs.
The answer your question about the maximum, if you connect the buttons in the simplest way, 1 button per pin, then you just need to look...
Hello everyone!
One of my longterm projects is building a DIY Retro-Handheld - similar to the Powkiddy X55.
I have started wondering if a Teensy (LC or other?) can provide the number of buttons that I require.
What...
The original code did a lot of buffer allocation and deletion. For my branch I removed most of that, so buffers are only created when play() is called, and deleted when playback stops - in between, they're re-used for...
That's awesome.
So in this version the buffer is created (and deleted) dynamically, compared to your buffered sample player which uses fixed size ones, am I correct?
Would it be possible to have fixed sized ones and...
I am trying to set up Teensyduino on Ubuntu Linux 22.04 to program Teensy 4.1 lockable. I have previously generated the PEM key on a windows system and have gone through the steps to lock the Teensy device. I would...
I don't see anything about a unique ID in the datasheet for PSRAM (link below). The chip has an ID, but it's not a unique ID for each individual chip. There is a function named flexspi2_psram_id() in...
Hi All,
I'm keen to see if any library calls exist to extract the unique IDs from the PSRAM chips. This would be in a low level lib function I am not aware of and frankly do not know where to look....
This would...
Chances are that the T3.2's RX pin is fairly deaf to what the XBee XSC S3B emits. The T4.x is faster everywhere so I bet it aint so deaf to the XBee XSC S3B.
With a baudrate of 57600 I think there's scope to kludge...
static const SPISettings wifi_SPISettings(12000000L, MSBFIRST, SPI_MODE0);
Well the Uno cannot run SPI even that fast, so perhaps try something slower.
First post - so I hope I'm asking my question in the right place. I've been reading many of the threads for the Note Frequency detect algorithm and have it up and working on my breadboard (teensy 4.1, audio shield with...
Clocking the chip slower won't reduce the bandwidth of the RFI, just the amount of it. Fast chips have fast edges and fast edges spray harmonics all up through the microwave spectrum. You need to screen/shield really...