> A simple hardware diagnostic using patterns of red LED blinks is also planned
Nice! - black boxes are hard to debug. Would be very helpful to distinguish between "loader can't talk to MCU", "crystal isn't working"...
> you need to type in ":flash XXXX", where XXXX is the number of lines reported by the program
I recommend that you don't do this. Type in ":flash XXXX", where XXXX is the number of lines you counted in your hex...
For speaker analysis and correction, this is great.
https://www.roomeqwizard.com/
If you want to do convolution based correction, then just use the impulse response from REW and also use...
OK, I checked and some notes:
T4 with a small heat sink attached
It runs about 45C (far far different than the graph)
Slowing from 600 to 528 is only a couple of degrees cooler
wfi makes no difference
extern...
In many cases, one could include this in their idle loop, which I understand reduces power/heat more than slowing down to 450 mhz.
asm volatile("wfi");
There was some discussion of strlcpy(). IMO, don't just use it, use it and check the return value. Ie:
if (strlcpy(dest, src, sizeof(dest)) > sizeof(dest))
handle_error();
My experience is that paste is better, even when you don't have a stencil. But I save time and frustration - unless JLCPCB puts most of the parts on, I always order a stencil. More advice - use a syringe + tubing to...
See here for a newer, better teensy 3.x version:
https://forum.pjrc.com/threads/43165-Over-the-Air-firmware-updates-changes-for-flashing-Teensy-3-5-amp-3-6
I use the audio library with USB input and SPDIF optical output. I have no noise issues.
You haven't explained what you need to do, but stay digital as much as possible and if you have to do a A/D or D/A conversion,...
IMO, the memory allocation details should be abstracted away for the typical use case. Ie, a single mallocX() call where you optionally pass it a hint as to the speed desired (or other requirements like DMA...
I'm curious, is there any reason that the library shouldn't have an empty constructor and do the initialization in begin()? In any case, just crashing is poor design.
My understanding is that if you omit the stop, then the bus isn't released and, with your slave chip/application, the following start isn't needed/tolerated.
But the libraries don't provide a way to do this.
Good that you found something that works. As I see it, your application could use less buffer space if it had something like this for all but the first and last portions:
endTransmission(omitStart, omitStop);
There is a nice spreadsheet coefficient calculator/visualizer here:
https://www.minidsp.com/applications/advanced-tools/advanced-biquad-programming
+1 on using the teensy code (see...
Two questions:
I use partitioned fast convolution to greatly reduce filtering delays. Can't partitioning be used for this application?
If one does use 96 biquad bandpass filters (which seems feasible), does the...
I only looked at it briefly, but that code appears to be doing a FFT and then combining bins. Not clear why so many people write code without comments.
Agreed, the typical person watching is likely to prefer larger bins and less delay. You can still use the same number of lights, probably most people won't notice the lack of accuracy on the low end.
+1 on combining bins. Say you down sample to 11K sps, then run a 22,000 sample FFT. Each bin would represent .5 hz.
The DD4WH code is an example of large FFTs.
If one is going to mix digital circuitry with analog audio, better to use differential/balanced for the audio. Or stick with digital audio (eg, an i2s microphone).
With com0com, you would just have to write the code to move bytes over TCP.
http://com0com.sourceforge.net/
Or possibly this:
https://tibbo.com/support/downloads/tdst.html
With interrupts, it's critical to be clear about during which stage. The first when data is being moved from input to upper flash and the second when upper flash is being moved down to lower flash. There were some...
I didn't look closely at what you are doing, but in general, for low jitter input, you can disable interrupts while waiting for the next pulse. Or use an interrupt of the highest priority to capture pulses.
A fine but important point. When you use the teensy clock to measure a ratio between two external clocks, drift in the teensy clock is mostly irrelevant. Because it effects both measurements equally. Jitter goes...
When you talk about "ground", you need to specify which ground. For example, the teensy could have one ground and your other equipment could have a different ground. Don't connect these grounds together and the teensy...
Note that if your teensy and the other equipment don't share a ground, then the ground of the other equipment can be at the teensy VGND level. Ie, it can work, even without balanced inputs on the other equipment.
...
Depending on volume, I'd try hard to have all parts on the same side (which appears to be possible in this case).
After being fooled too many times about solder bridges, I stopped connecting adjacent pads directly...
To reduce confusion about which serial port is which, I've added the SYMLINK option to the teensy udev rules. IMO, something like this should be standard.
KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0",...
> Actual result: Just the i2c address is written. The clock only transmits 8 pulses.
i2c on t4 works fine.
Here is a relevant quote from a description of the protocol:
"Each byte of data (including the...
I recently wrote some quite similar code (for exact audio clock matching). When you are ready, send me a message if you want the code.
Basic technique is to measure clock A with the teensy clock and clock B with...
I'd feed a GPS 1 PPS into a teensy 4 and not use an external oscillator. The teensy will be able to measure the 1 PPS and pendulum signals with its 600 mhz clock.
Yes, but the reverse should work if you use:
Adafruit_SSD1306 display(128, 64, &Wire1, -1, 1000000);
Ie, the SSD1306 is easy to move to different connections. The temp sensor is best on SCL0 / SDA0.
To the extent it is possible, my opinion is that it's better to fix and add features (clock sync, more channels, more bits, different rates) to the teensy4 USB audio code.
What's the problem that is being solved? I use the T4 and PC->teensy audio over USB works fine. The PC matches rate to the teensy clock, but if for some reason I wanted the teensy to match the PC clock, that is now...
You should have a decoupling capacitor on every MK20 3.3V line, close to the MK20 pin.
Which of these is the case?
a) MK20 is loaded and running, just not talking to USB
b) MK20 doesn't start up and keeps...
If you are building a PCB anyway, consider adding a better ADC to it. Preferably differential. If not, use some oversampling plus a trimmed mean for less noise.
Might be useful to have an extra calibration channel...
I'm aware of teensy boards or boot loaders in some commercial, low-moderate volume products. Higher volumes, low support costs - so I'd guess that the economics of this are far more attractive than selling single...
Indeed, most of it is with -E. The sketch itself is recompiled and then everything is relinked. It's quick, so not an issue - but I expected it to do nothing (since no files have been touched). Maybe it's the price...
I have a philosophical question about clock sync. Which is better for teensy related, separated audio clock use cases?
a) just match rates
b) match rate and phase (like a PLL). If clock A is slightly slower...
I've seen debug log messages like "value too high", which leaves me lost as to what it means and how to fix it.
For some use cases, consider using something like:
LOGD("%s %d %s", "Debug", __LINE__, __FILE__);
Here is some very general advice. Learn the basics of LTSpice and use it, even for simple circuits. Never perfect, but it's a great way to learn things like "what would happen if I injected a little noise here".
I have some code working that will take a periodic input from any source at any frequency and adjust the teensy audio clock to match it. For example, I'm syncing to a PC sending a single byte via serial every second. ...
I tried it and while changes to CCM_ANALOG_PLL_AUDIO_NUM clearly changes the clock rate, it isn't a simple ratio. You could use trail and error to find the right value. Or use the c1 value from the nice spreadsheet...
I think so, but let us know.
I'm working on some code that will calculate the correction ratio to apply from any kind of periodic communication. But a fixed ratio is fine for some uses.
AUDIO_SAMPLE_RATE_EXACT is a compile time setting. You are looking for a run-time clock change, which has to be done differently.
Using Paul's recent discovery, should be something like:
if (pin) ...
> a virtual GND of 1.65V and power the AD8224 with +-3.3V)?
You would want the AD8224 to operate without a virtual ground. And the 2nd stage needs power too. Probably not worth the changes, I'd go with one of...
It could be "what the teensy clock registers are going to be initially set to". Which, glancing at AudioStream.h, is already sometimes a non-integer number.