Search results

  1. V

    Custom FFT Bins for FFT1024?

    There is one difficulty - Jacobsen MQE requires complex FFT which I run anyway, I can post the cfft code with the estimator, compatible with the audio lib (if you tell me where and how, I am bad at IT stuff). There is a less accurate but simpler gaussian estimator that works on magnitudes. But...
  2. V

    Custom FFT Bins for FFT1024?

    If you need to find a peak frequency at the sub-bin resolution there is a computationally efficient option, google "Jacobsen MQE". In the most recent paper he has options for different windows. If you need fine resolution for other means - follow the post above.
  3. V

    Teensyduino 1.42 Beta #5

    I want to clarify my previous question. I frequently run 2 instances of the IDE to check examples but with a single Teensy connected. Would that still be a problem ? I am asking since I need to patch few system library files for my needs and switching revisions takes some time and attention - I...
  4. V

    Teensy 3.6 - Dynamic CPU clock switching

    I do exactly that on T3.5, but in my case I compile for 24MHz and dynamically switch to 48MHz depending on the load. At minimum it requires a change to F_CPU via SIM_CLKDIV1 and millis() counter via SYST_RVR. But you have to tweak few files in the the system libraries so that micros() work...
  5. V

    Teensyduino 1.42 Beta #5

    Quick question - for those of us that connect only one Teensy at a time (although of different types) does the issue above have any consequences ? Platforms - Windows 10, Mac, Linux.
  6. V

    Reset audio board codec SGTL5000 in realtime processing

    Sorry, can't help on this without digging into the math textbooks. There probably is a jitter calc somewhere for simple fractional dividers. But if I can clearly see the Mclk edge jitter on the scope it makes me uncomfortable. SiLabs uses more sophisticated fractional divider HW with some form...
  7. V

    Reset audio board codec SGTL5000 in realtime processing

    "There is no cycle to cycle jitter or duty cycle variance when the divide ratio is an integer or half integer, otherwise..." If you reduce the fraction by the GCD that precisely means that MULT could be either 1 or 2. "703125 *2/6 = 234.375 KHz" - it makes sense to use irreducible fractions, 1...
  8. V

    Reset audio board codec SGTL5000 in realtime processing

    It is not my personal rule, it is in the K6x reference manual - only 1 and 2 in the MULT generate low jitter Mclk. In case MULT=2 the divider simply uses both edges of the reference clock. Any MULT > 2 requires true fractional synthesis. Just look at the Mclk on any decent scope (I did).
  9. V

    Reset audio board codec SGTL5000 in realtime processing

    There are multiple sources for the frac synth in Teensy - F_CPU, F_PLL etc. For 180MHz it is F_CPU (I think), so the default Mclk = 180MHz * (16 / 255) = ~11.29MHz, and the SR is ~11.29MHz / 256 = ~44.1ksps. Let's say you want ~92ksps, then Mclk = 92ksps*256 = ~23.5MHz, so you need a synth...
  10. V

    Reset audio board codec SGTL5000 in realtime processing

    Frank, I am usually using the Audio library "liberally" in the sense that I create a reduced copy of it in my local project library directory (only the files that I need) and then change them directly. I also do not care much about supporting all Teensy frequencies options (F_CPU). Look into...
  11. V

    Reset audio board codec SGTL5000 in realtime processing

    I've tried to use the Teensy audio library in the slave mode recently and it did not work properly. I modified the latest slave code such that Teensy was generating Mclk, but the codec was generating LRclk and Bitclk. The clocks had the correct frequencies and levels (no bus conflicts) on the...
  12. V

    Reset audio board codec SGTL5000 in realtime processing

    For our SDR applications the sampling frequency does not have to be exact as long as we know it exactly :) I actually use Si5338 synth on my board with a spare 4th output wired via 0-ohm to the I2S Mclk line. I do not use it currently (Teensy is a master and it's Mclk frac multiplier set to 2...
  13. V

    Reset audio board codec SGTL5000 in realtime processing

    Software switching the codec power supply eliminated the occasional offset errors during full power-up, but did not help neither during USB downloads nor during Snooze deepSleep (I use it for standby). In addition to power cycling the codec I tried wrapping the deepSleep with Teensy I2S RX/TX...
  14. V

    Teensyduino 1.42 Beta #4

    Works for me, thanks much.
  15. V

    Reset audio board codec SGTL5000 in realtime processing

    I have the same exact problem with SGTL5000 I/Q offset in my own superhet with DSP AF. Caused me tons of time and frustration - I initially thought that it is in my main code, then tried various tweaks to the codec init routine etc. The frequency of this event is even worse at ~50% if I use...
  16. V

    Teensyduino 1.42 Beta #4

    This code fails only with a combination of beta4 and T3.5. Every other combination of software version and Teensy type give the correct result. Something to do with a memory expansion ?
  17. V

    Teensyduino 1.42 Beta #4

    Could someone please verify this simple sketch on 3.5 on beta4 with expanded RAM. It works just fine on my 3.6 and 3.2, but fails specifically on 3.5: void setup() { Serial.begin(115200); delay (100); } void loop() { float v = 4.98; char buf[64]; sprintf (buf, "%.2f", v)...
  18. V

    Teensyduino 1.42 Beta #4

    analogRead() is OK, there is some memory corruption that did not show up in the previous versions (41 42.b3), still need to investigate... I think I narrowed it down to sprintf not accepting %.2f spec for a floating number in the beta4. If I do explicit integer conversion and then call sprintf -...
  19. V

    Teensyduino 1.42 Beta #4

    Something happened to the analogRead() in the beta4 - reads zeroes (works fine under beta3). I need to investigate further.
  20. V

    GND vs AGND

    Here is my experience: 1. If you know the circuit requirements precisely (and that usually means a discrete circuit design by yourself), it is possible to drop the noise / distortion quite a bit by using separate grounds, star connections and other techniques. 2. If you use a 3rd party analog or...
  21. V

    Q for Paul - can I use SGTL5k in my own RX "shield" ?

    Paul, would I violate something if I integrate the SGTL5k chip directly into my receiver "shield" using conventional Teensy pin assignments ? The reasons vs using your audio adapter are: - my receiver is now a 3+1 layer stack, which is high (even using very low profile 3M female sockets); - this...
  22. V

    Use Sublime Text as an Arduino IDE replacement.

    I don't see ST3 as an IDE or even as a full-fledged development environment. The quality of plugins is rather uneven at the moment. But the editor core is fast, configurable, and looks nice on both L and W (zero experience with M), which is a big rarity in the cross-platform world. I've used...
  23. V

    Use Sublime Text as an Arduino IDE replacement.

    I've been using SublimeMerge for few days already and it is quite good, and it can be configured. Not quite as comfortable to me as W "Compare It!", mostly because I got accustomed to it for nearly two decades. But there is nothing even close to Tortoise VCS (ease of use, completeness...
  24. V

    Use Sublime Text as an Arduino IDE replacement.

    I realized quickly that Stino is (unfortunately) not quite ready. My second and critical problem is how to replace a very polished Tortoise GIT that I used for years and that easily integrates in most W-editors. It is available for W only. The ST3 plugin on W works on any directory...
  25. V

    Use Sublime Text as an Arduino IDE replacement.

    I've played with Stino plugin for Sublime Text 3 and managed to build and upload one of the Teensy examples, all within the editor. Then I changed something minor in my setup and now the plugin hangs at the build stage (triggered by a cryptic python exception if you open the ST3 console). It is...
  26. V

    Teensyduino 1.42 Beta #3

    I've just tried 64bit Arduino+Teensyduino on my Linux laptop - it is surprisingly much faster that the windows version on my main development desktop. Sorry for OT, but that's another nail in the w coffin. I will likely switch to Linux once the project is stable. 95% of the programs that I use...
  27. V

    syncing RTC to a PC via USB Serial, accuracy ?

    Paul, here is my take on it. Please note that TimeTeensy3 does not have any comments at all, and that was what I was trying to use most of the time. /* To sync Teensy RTC to the PC host time with ~1s accuracy it is necessary to install a 3rd party "Processing" IDE (from processing.org) and run...
  28. V

    syncing RTC to a PC via USB Serial, accuracy ?

    Once I installed "Processing" and ran SyncArduinoClock.pde I've got the sync error down to about -1sec, which is fully acceptable for my project, so the problem is solved. Nevertheless I killed few hours in deep frustration trying to figure out what is going on, being fully convinced that the...
  29. V

    syncing RTC to a PC via USB Serial, accuracy ?

    Ok, figured it out after a lot of pain ... One needs a separate tool called Processing, it has an IDE similar to Arduino (sketches). You need to run SyncArduinoClock.pde Processing sketch provided in the .../Time/ExamplesSyncArduinClock/ directory, while at the same time running TimeTeensy3 on...
  30. V

    syncing RTC to a PC via USB Serial, accuracy ?

    What is even more confusing is that I can not get anything back from the USB Serial, no matter how fast (or slow) I am sending the Serial.write(TIME_REQUEST). Tried 1.8.5/1.41 and 1.42b3 with both serial monitors using 3.2, 3.5 and 3.6 Teensy boards. I think I miss something important here...
  31. V

    syncing RTC to a PC via USB Serial, accuracy ?

    I have trouble getting a reasonably accurate time sync of the Teensy RTC to a PC host. Teensy is always behind the PC by the 0.5-5 minute range. I am using TimeTeensy3 example with no library mods and no board connections (except USB) at several compile clock settings. Am I missing something ...
  32. V

    Battery Monitor Question

    Tried to load my chaining method circuit diagram in the .png format but got a strange cryptic error from the uploader. Oh well...
  33. V

    Battery Monitor Question

    dereckbc - do you need a permanently connected BMS or a an accurate charge monitor ? In the later case the circuit above will work just fine. In the former case it will run the pack out of balance and eventually ruin it. There is no issue with 1% resistor accuracy, you can always calibrate the...
  34. V

    Powering teensy 3.5 from external power

    The best place for such mux is Teensy itself. Then there is no need to cut the trace host/device. But the pin functions change slightly - Vin to external power input only and Vusb to Vout (mux output). Would be neat. TPS2113A is a bit restrictive on voltage though, fresh 4xAA could be a bit...
  35. V

    Battery Monitor Question

    And the chain does not have to be optical (the most simple one requires 1 transistor and 1 resistor per module). The main point is to send the digital signal downward, not to multiplex analog voltage. Then you can build a BMS for hundreds volts with very high precision. The individual MCUs can...
  36. V

    Paul, what is the "case code" for the 470ohm resistor in series with the LED on 3.5 ?

    Thanks, I have both. I also have some low-temp SnBi solder paste that I can use to put a new resistor in without affecting other components.
  37. V

    Battery Monitor Question

    Having an EE background I've killed few years of my spare time on RC hobby (helicopters), and then another few years on electric bikes... There is no simple and clean high precision solution to your problem (but there are many half-decent approximate ones). The best you can do for really precise...
  38. V

    gracefully stop/restart USB ?

    I've installed 1.42b3 into a separate directory and switched to teensy_sermon. It does indeed detect the "reappearing" serial port, thanks Paul ! It took me a while to get the delays dialed in. I run a time-corrected loop at 20ms period with no delay() function (using wait with WFI inside). I...
  39. V

    Teensyduino 1.42 Beta #3

    Thank you.
  40. V

    Teensyduino 1.42 Beta #3

    On a windows system can it be installed in a different directory ? I'd like to have both the 1.41 and 1.42b3 on the same computer.
  41. V

    Paul, what is the "case code" for the 470ohm resistor in series with the LED on 3.5 ?

    Paul, what is the "case code" for the 470ohm resistor in series with the LED on 3.5 ? The LED is shared with the RX line when Teensy is used with the audio adapter. It can not be turned off. I want to replace the series resistor with something ~10k. I have SMD rework tools, just need to order...
  42. V

    Powering teensy 3.5 from external power

    There are fancy ICs that allow automatic power source switching, but a simple jumper is the best. During the development I run both Teensy and my board from the USB power 90% of the time (jumper ON).
  43. V

    gracefully stop/restart USB ?

    I am not in a big hurry on the monitor restart, can probably wait for 1.42 release, especially since I have to patch few files in the core libraries for my frequency hacks to work properly. Have other things to do first (the UI state machine is still a big mess). By shutting down all fancy DSP...
  44. V

    gracefully stop/restart USB ?

    Ok, after few mandatory host reboots I got it almost working. It is based on the register access sequence from the Snooze libary. I had to fiddle a bit with the delays around the USB disable-enable interval. There is one minor inconvenience though - the Arduino IDE serial monitor fails to...
  45. V

    gracefully stop/restart USB ?

    I was thinking along these lines. My concern was how the host reacts to this if it is done on the fly (while connected to the host using HID driver). In the sense that I want to use USB Serial normally after exiting LP mode.
  46. V

    gracefully stop/restart USB ?

    No, I simply want to stop clocks to all unused peripherals to save power in a battery RX project. I will eventually use all or parts of the Snooze library to implement a full standby. However I also have an intermediate LP mode where the main Audio DSP path (I2S in/out, Hilbert FIR, mixers, AGC...
  47. V

    gracefully stop/restart USB ?

    Tried it but the USB (and in fact Serial) work just fine after Serial.end() :). It is the USB HID Serial, not the hardware UART. I want to power down the USB peripheral. I know how to disable/enable the USB peripheral clock but this will likely mess everything without proper shutdown and restart...
  48. V

    gracefully stop/restart USB ?

    Is there a way to gracefully stop/restart K6* USB controller on the fly, such that host OS (Windows, Linux) would recognize and handle stop/restart events correctly.
  49. V

    switching 3.x between 96MHz/48MHz/24MHz (same F_PLL) on the fly ?

    It took some effort but the dynamic 24/48 switching seem to work. I have used a 24MHz compile setting and then modified only the core/system clock. I did not change the 24MHz bus clock since it brings up a lot of dependencies. The system/core clock affected only millis() timer, which was trivial...
  50. V

    switching 3.x between 96MHz/48MHz/24MHz (same F_PLL) on the fly ?

    Thanks Paul, You gave me a good starting point. Basically at 16ksps audio path I fit into 24MHz CPU speed, but with occasional USB Serial lock-up that requires an effort to recover from (disconnecting the audio board, removing the Windows drivers etc.). This is not surprising since the...
Back
Top