Which operating system are you using? Or in other words, if I were to compile a test copy of teensy_secure, which platform should it be for easiest testing?
Your program is using the MIDI library, which receives ordinary serial MIDI (5 pin DIN connector).
To receive USB MIDI from your computer over the USB cable, use "usbMIDI". Documentation here:
...
In Arduino, click File > Examples > Teensy > Serial > EchoBoth. Change the baud rate from 38400 to 31250 and upload.
Optional, add the Hello World stuff, so you can be sure it is really running.
Does it print...
When you see it print Hello World, the next step is to add something like this:
void OnControlChange(unsigned char channel, unsigned char control, unsigned char value)
{
Serial.println("received CC message");
...
Add this at the end of setup(). Or anywhere in setup()...
Serial.begin(9600);
while (!Serial) ; // wait for Arduino Serial Monitor
Serial.println("Hello World");
This won't fix anything, but it will at...
As a first troubleshooting step, I'd recommend printing to the Arduino Serial Monitor so you can see the actual number before your code tries to send it to the MCP4822.
Something like this:
// Map the CC value...
Opps, yes, indeed I meant configure the I2C address.
Rev D (with configurable I2C address) will return within the next couple months. Robin & I have been putting a lot of work into the supply chain side, so...
This should be possible if you use both I2S ports.
The first I2S port has 5 data pins, so it can do up to 10 channels. 3 of those data pins can be either input or output.
The second I2S port has 2 data pins, so...
First step would be checking if it responds to I2C with the expected address. The main gotcha is it won't answer unless MCLK has a clock signal. So you can't just run the Wire library Scanner example.
With Teensy...
Looking at the ADS8168 datasheet (admittedly only a quick glance), I see 2 pins for data output, but only 1 pin for data input which is indeed separate from the output pins. My impression from Figure 42 on page 31 is...
Please be more specific. At the very least, show a screenshot similar to msg #3. If your screenshot doesn't have footer, please say which page number and the version of the document (ideally use 3.3.1).
My best guess is you're asking for teensy_secure to give an optional command line parameter which generate CSF data with the same output as NXP's Code-Signing Tool would if given the "" command with "Engine = SNVS" and...
Can you be more specific? At the very least, can you give a link to the Analog Devices web page or datasheet (so we don't have to guess the last digit). Links to eval or breakout boards would also be good, for anyone...
As a general rule of thumb, higher resistance pots consume less power but give a weaker signal which results in noisy data. So you would normally want to use lower resistance for better results, but not too low that...
Yes, it is possible. But the ready-made configurations you can select from the Tools > USB Type menu have 4 or 16 virtual cables. To get exactly 5, you'd need to edit the USB code. Probably best to use 16 and leave...
I know you said you've tried different USB cables and hubs, but the behavior you're describing sounds pretty similar to what many others have seen with low quality USB cables.
Usually the cable is believed to be...
@ted - Could I talk you into running this little program on both of those chips and share the results here?
void setup() {
Serial.begin(9600);
while (!Serial) ; // wait for Arduino Serial Monitor
...
Thanks for confirming your experience with these chips. Several people have asked about these wide temperature chips over the last couple years. Testing them has been on my low priority to-do list, but the higher...
Many LEDs with different controller chips have sold as "WS2812B", since they first appeared on the market around 2011-2012. Most of the ones from 2014-2016 really did require nearly 4 volts to receive as logic high. ...
Try cleaning the area around the crystals with 99% isopropyl alcohol. Cleaning the whole board might also be a good idea, if the solder paste you used left a thin layer of conductive residue (many solder pastes have...
Yes, for Teensy 4.1, 4.0, 3.6, LC. If you have a serial signal that transmits 5 volts, it needs to be shifted down to 3.3V before connecting to the receive pin because those Teensy models are not 5 volt tolerant.
If you're using "breadboard wires" which have little pins crimped onto the ends, you might spend a moment with an ohm meter to check if they really do conduct. Those products tend to be very cheaply made. The...
Another interrupt can occur after the 2 second delay but before you call millis(). It can also occur in what should have been the final moment of the delay, causing the CPU to run your interrupt and only later return...
Depends on which Teensy model you're using and what CPU speed (as set in the Tools > CPU Speed menu before uploading). On some boards, also may depend on the pin, as some pins use different timers with slightly...
This thread is 8 years old, back when Teensy 3.2 was the most powerful model.
If the info and code on this old thread didn't help, you're probably better off to start a new conversation specific to the problem...
Yeah, a lot of the USB info is difficult to understand, partly because the USB specification is intentionally somewhat vague in many places to allow implementations a wide degree of freedom for design choices.
Common...
The PWM hardware runs from the peripheral clock. The hardware is only capable of adjusting the pulse width by integer number of steps of the peripheral clock.
At those ideal frequencies the PWM period is exactly 2^N...
The screenshot is very odd to me too. I've never seen the IDE do anything like that.
Maybe if you fully delete the IDE and setting and then reinstall, it might magically work?
I see in msg #1 you're using...
The "I2" part of I2S and I2C stands for Intra-Integrated circuit.
I2S isn't really meant to be used over any sort of cable. It's meant to connect between chips on the same printed circuit board, or perhaps an...
To use this ALPS EC12E encoder with Teensy 4.1, I would recommend connecting terminal C (the center pin) to GND. Then connect each of the other 2 pins to a 6.8K resistor connected to 3.3V. Or if 6.8K is not easily...
Luni is correct. This type of encoder is simply mechanical switches. By itself, it doesn't output a particular voltage at all. It simply connects or does not connect either or both of the signals pins to GND.
The...
Removing and replacing the main U1 chip on Teensy 4.1, even with the same part number, will not work. The fuses are initialized during product testing at PJRC. A different chip won't have its fuses set properly.
...
Glad you found the problem.
Yes, that seems to work. Easy to see the full 64 bits really are compared, and nice to see the compiler makes use of the IT (If Then) instruction for efficient usage of the CPU's...
I can take a quick look. But only quickly.
Please give me a link to your github repository? If it has more than 1 branch, tell me exactly which code I need to check out.
Please also be specific with exactly...
Code in msg #19 is not a valid test. The compiler is able to notice variable b was assigned from variable a, so it knows they will always be equal.
Looking at the generated assembly, loop() has only 1 conditional...
The ethernet hardware on Teensy 4.1 uses a ring buffer and bus master DMA, similar to traditional ethernet on PCs. So in theory you can have any number of sockets. But as a practical matter you'll be working with the...
Hmm... maybe we have a bug in the CardInfo stuff? It's supposed to detect the hardware regardless of whether the card has a proper partition table. But maybe we've lost that with the change from old SD to SdFat...
Multiple I2S is well supported (in master mode, where Teensy creates the I2S clocks). There are 2 separate I2S ports. The first port can do up to 4 stereo (8 channels) in 1 direction. The second port is limited to...
And one more MacOS suggestion... if you dive into the Network settings in MacOS, you might discover many dormant or unused modem devices. MacOS tends to create these when it sees new USB serial devices, even if they're...
Blind guess on the 30 second lag, sometimes in the past on MacOS long delay turned out to be issues with a bluetooth serial device. If you can use a USB keyboard and mouse with cord, recommend turning off bluetooth to...
Sounds like you're running an older MacOS version. Is it Mojave?
As I recall, Mojave was the very last MacOS release not requiring Apple Notarization for software, so it's possible to run either Arduino IDE with the...
When CardInfo prints "initialization failed", you have some sort of hardware problem. No amount of fiddling with card formatting will help. This error is about connectivity to the card. It has nothing to do with the...
Here is a screenshot, so you can see how the result should look when CardInfo works.
This is the SD card I used.
Even if your card isn't formatted, CardInfo should say "Wiring is correct and a card is...
Look for the Library/Arduino15 folder in your home directory. It's probably hidden by Finder (and I'm not familiar enough with MacOS to say how to get to hidden folders in Finder). In Terminal, you can get to it by...
Is your Teensy core library up to date? With Arduino IDE this is easy to check. Have no idea what to do with PlatformIO.
I do know the Serial + MIDI + Audio type had a bug on Teensy 4.0 which was fixed with version...
Power cycle the Teensy hardware, just in case the card has somehow gotten into SPI mode or some other state the SDIO hardware can't use.
Different SD card and another Teensy 4.1 would be the best things to try. Run...
I personally use Ubuntu 20.04 and IDE 2.1.0 & IDE 1.8.19. Works fine.
No issues I know about, apart from the general need on all Linux to install udev rules. Before IDE 2.0.0 files were always delivered by an...
Yes EMC_40 needs to be driven high to turn on the USB host power. This is done by calling begin() from the USBHost_t36 library. See any of that library’s examples.
If you just run an ordinary program not using the...
Does simply quitting and restarting the IDE "fix" the slowness nightmare? Or does it persist across software restart and require a reboot?
And is this Windows, Linux or MacOS?
Might be worthwhile to make a screen...
Can you give me a small but complete program I can run here on a Teensy 4.1 to reproduce the problem?
Please also be specific about which other hardware I need connected to the SDA & SCL pins. Are all 3 of the I2C...
The simple answer is yes.
The complicated answer is installation works very differently depending on IDE 2.1.0 versus IDE 1.8.19.
Using IDE 2.1.0, the compiler toolchain is placed in its own directory with the...
BUILTIN_SDCARD is correct for using the SD socket on Teensy 4.1.
There is a known issue where very old cards (size measured in MB rather than GB) don't work with SDIO on the built in socket.
Best to run the...
Looks like whatever went wrong may have also damaged a wire on the bottom side which provides 3.3V to the bootloader chip. If that wire really is broken, be sure to repair it too.
1.57 used gcc 5.4.1.
1.58 switched to gcc 11.3.1.
By default for Teensy 4 we're compiling with -O2 optimization which favors faster code, even if using more memory.
That may or may not be the entire reason why...
Yup, confirmed.
AudioNoInterrupts() is generally meant for you to call the functions on 1 or more audio objects. Especially if you have 2 or more that work together (like a waveform and envelope) you would set up...
This is basically what the FreqMeasure library does. It captures the timer on every rising edge. So that part should be pretty easy. The timer clocks from the 150 MHz peripheral clock. In this case, you would...
Look for large const arrays, which you would add PROGMEM to move to flash. Or if you really do have large buffers or other stuff that needs to be allocated in RAM, add DMAMEM to some of those which you're willing to...
Creating a custom FlexIO peripheral can be a tough nut to crack. I've done it only once from scratch... and it wasn't easy. NXP's documentation leaves a lot to be desired.
Unless someone chimes in with a FlexIO...
The most elegant way depends on what you consider elegant.
Some people value platform independence. They consider code which can run on any board to be the most elegant, even if it incurs overhead by calling various...
Seems unlikely.
It's been a while since I've looked at FlexIO, but my recollection is it samples the SCK signal using the FlexIO clock. So the FlexIO needs to be at least some multiple (or higher) of the SCK clock. ...
12 volts touching any pin will definitely kill a Teensy 4.0.
Normally the ground wires should be directly connected. Best practice is to use a 5V buffer chip between Teensy and the LED input (12V LEDs usually expect...
You can make Teensy 4.1 run at 12 Mbit/sec if you edit usb.c. Find that file on your PC and look for this line:
//USB1_PORTSC1 |= USB_PORTSC1_PFSC; // force 12 Mbit/sec
If you uncomment this line and...
This is normal behavior. Every Teensy ships with the LED blink program built as RawHID. It will also be RawHID if you upload code from Arduino IDE with Tools > USB Type set to RawHID, or after the 15 second button...
In either version of Arduino IDE, to use AudioInputUSB you need to set the Tools > USB Type menu to Audio.
The low-level code for PWM (and MQS) is already inside the audio library. So all you need to do is...
If you're not yet familiar with the audio library, this 31 page tutorial is the place to start.
https://www.pjrc.com/store/audio_tutorial_kit.html
You might skip forward to page 8 to learn how to use the design...
Teensy has a special PWM output called MQS. It's a standard feature of the audio library which you can find in the design tool. PWM carrier is approx 352 kHz.
It doesn't have complementary outputs with dead time.
First check which version of the software you have installed. If using Arduino 2.1.0, look in Boards Manager. If using Arduino 1.8.19, click Help > About. Version 1.58 and later (0.59.x are really 1.59 beta tests)...
Correct. The baud rate setting isn't used by the actual USB data communication.
It is communicated from your PC to Teensy, where your code running on Teensy can read it with Serial.baud(). Normally you wouldn't...
I've updated the comments inside IntervalTimer.h which Arduino IDE 2.x uses for the pop up documentation when you hover your mouse over the functions or IntervalTimer name.
...