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.
...
Ok, now I understand, you're really asking about comments from a message on another thread.
I can't say why it didn't work for Spencez, but I can confirm nothing in the GD32E230F8 should interfere if you really have...
I don't really understand your question.
I can tell you the GD32E230F8 always drives the TDI, TMS, TDI signals. If you want to gain access to JTAG for your own use, you must disconnect those signals from the...
In the "something fancy" category, you can use another Teensy running the rebootor program connected to the Program pin on the main Teensy. It works together with the hard reboot option (-r) in the command line loader...
IntervalTimer allows float. You're not limited to integer microseconds.
So you can use timer.begin(myfunction, 22.6757) to get 44100 Hz.
Of course it will round off to the nearest number of F_BUS clock cycles,...
If you care about optimizing runtime performance, create global or static variables to hold a copy of your tuning parameters. Read the (emulated) EEPROM at startup to initialize those variables. If you change the...
USB host ports can not communicate with each other. Unless your PC has very special USB device hardware, which does exist on some single board computers like Beaglebone and some Raspberry Pi but is pretty much unheard...
Also please keep in mind USB has considerable protocol overhead. For 480 Mbit/sec USB, bulk transfer protocol has 55 bytes overhead, not including bit stuffing overhead, which is data dependent. Transmitting all 0x00...
You can also just call Serial.read() without first calling Serial.available() and handle the return being 0 or -1. Something along these lines...
uint8_t buffer;
int n = Serial.read(buffer, sizeof(buffer));
if...
You should definitely work to solve the signal quality problem first. If the waveform's rising and falling edges are terrible, lowering the clock speed means you'll still have the same terrible edges, just spaced out...
If you're building Ornament & Crime for personal use (or in a band performing paid shows... the point being you are the human actually using the synth), email me or Robin directly. You can find our contact info on the...
fwiw, the PJRC server has the last 64 releases, going all the way back to version 0.95.
The very early versions were removed when Cypress Semiconductor (now acquired by Infineon) was threatening trademark...
For a rule of thumb, I would say "add a 100 ohm resistor between the Teensy pin and (lengthy) wire which connects to the TLC5940(s)". If connection directly to the Teensy pin isn't feasible, try to minimize the wire...
I ran the code from msg #1 on a Teensy 4.1 with no hardware connected, just to quickly look at the 3 chip select signals. Indeed it seems to be generating them on the 3 pins.
When I zoom in, looks like only...
Indeed, I really with NXP would have put a DAC in this chip, but sadly they did not.
Maybe this thread can help?
https://forum.pjrc.com/threads/72446
It works with the PT8211 chip, which is much simpler without...
No, that's not how the audio library works. The I2S hardware generates 44.1 kHz DMA requests. The DMA engine automatically moves the samples between 128 sample buffers and the hardware. Interrupts are generated once...