Search results

  1. A

    Possibility of using FlexIOSPI with PlayFlashRaw

    Hi, I hope to adjust a copy of PlayFlashRaw (and all the necessary associated code) to use FlexIOSPI instead of SPI. The aim is to, using the higher clock speed possible with FlexIOSPI, increase the number of samples that can be played simultaneously without glitches in a situation where the...
  2. A

    Switching a 2.2Kw 240V kettle element using a Teensy

    Hi, Consider using one of these instead: Solid State Relay SSR-40 DA 3-32V DC for Heated Bed Heater (printermods.co.uk) It's more expensive than the relay you were considering, but you won't need any other components, All the best, Alan
  3. A

    Generating a 2 MHz clock signal from a Teensy 4.0

    Hi, If you can connect your PWM output to pin 9 on your Teensy 4.x, you can use the FreqCount library to check the frequency, All the best, Alan
  4. A

    Load Cell Connection

    Hi, The load cell you say you are considering has options with 0.5-4.5V amplified output or I2C digital output. With a Teensy 4.1, if you choose the I2C output then you won't need an amplifier. With the 0.5-4.5V output, you'll need an op-amp to reduce the voltage. All the best, Alan
  5. A

    Best Method for Fast Playing of Samples with 8-voice Polyphony?

    Hi Frank, I'll check the updated library as soon as I can. Playing two equals sine waves does mean that they sometimes cancel out - but it makes variations in latency very clear, and it's possible to measure delays very easily (by just measuring the amplitude of the combined signal). All the...
  6. A

    Best Method for Fast Playing of Samples with 8-voice Polyphony?

    Files for testing Thanks Frank, The attached folder has a 20 ms clip and a 1 s clip. I was using the version of your library from the 28th. It may be a few days before I can try the latest version, All the best, Alan
  7. A

    Best Method for Fast Playing of Samples with 8-voice Polyphony?

    Hi again, Even just declaring a second AudioPlayWav object in the second program above causes the file to sometimes not be played completely. Adding, for example, AudioPlayWav playSdWavs[32]; to that code, but without doing anything else with those objects, causes significant delays...
  8. A

    Best Method for Fast Playing of Samples with 8-voice Polyphony?

    Hi Frank, Sorry for the delay - I only get short opportunities with work to look at this. Here's simpler code that just plays one file. Sometimes, it is not playing to the end - similar problem to what I reported already. #include <Audio.h>#include <Wire.h> #include <SPI.h> #include <SD.h>...
  9. A

    Best Method for Fast Playing of Samples with 8-voice Polyphony?

    Hi, I tested the same thing with AudioPlaySdWav objects instead. The results were very close to what I would have expected -consistent changes in amplitude close to 20 ms from the end of each play, and no jumps in the signals, All the best, Alan
  10. A

    Best Method for Fast Playing of Samples with 8-voice Polyphony?

    Hi, I've been doing some tests using WavePlayer, with 8 identical wav files stored on an SD card. Each contains a one second long 400 Hz tone, with an amplitude of 0.12 (generated using Audacity), so each starts at zero and ends at zero. My current code allows up to 32 sounds to be played at...
  11. A

    Best Method for Fast Playing of Samples with 8-voice Polyphony?

    Hi, One thing to consider is whether you want to be able to have the same file playing more than once at the same time (e.g., if you press a key repeatedly). Some approaches may not work if you do. All the best, Alan
  12. A

    Best Method for Fast Playing of Samples with 8-voice Polyphony?

    Hi, Sorry - that was not a good test. If I try to play 8 files so they overlap, but aren't started simultaneously, then there are significant problems, even with AUDIO_BLOCK_SAMPLES set to 256. It may still be worth trying with a more suitable SD card. Definitely possible with NOR flash (could...
  13. A

    Best Method for Fast Playing of Samples with 8-voice Polyphony?

    Hi, I've just tested playing simultaneous raw files (all started at the same instant - audio interrupts disabled while starting play) from an SD card (Sandisk Extreme 32GB) on a T4.1 with Teensyduino 1.56. Works fine for two files but audible clicks when playing three. After changing...
  14. A

    Best Method for Fast Playing of Samples with 8-voice Polyphony?

    Hi, Flash chips sold as 256Mb are 256 mega bits - you would need several chips. It's possible, but try the much easier SD card approach first. The latency is determined by the buffer size used by the audio library (which can be altered - but not if you want USB audio output) - not by the storage...
  15. A

    USBHost_t36 and High Speed USB MIDI messages

    Hi, This may be useful for someone. I can confirm that the PCB layout shown below for a USB Host connector for a T4.1 (2 layer PCB, 1.6 mm thick, USB connector on bottom of board) works at 480 Mbps. The D- and D+ traces are 1.6 mm wide with a 0.4 mm gap between them (should give, for that...
  16. A

    USBHost_t36 and High Speed USB MIDI messages

    Thanks Kurt, That works perfectly. Would be good if it was included in comments in USBHost_t36 examples, All the best, Alan
  17. A

    Teensy 4.1 serial host can't recognize another teensy

    Hi, Adding USBSerial_BigBuffer userial(myusb); does not help with my MIDI problem (USBHost_t36 and High Speed USB MIDI messages (pjrc.com)), All the best, Alan
  18. A

    Teensy 4.1 serial host can't recognize another teensy

    Hi Alex, I'm seeing a similar problem when connecting a Teensy 4.0 programmed as a MIDI device to a T4 USB Host port. In my case the same issue doesn't occur when connecting a T3.6 to the T4 USB Host port - so my issue occurs with High Speed USB and not with Full Speed USB, as with yours (one...
  19. A

    USBHost_t36 and High Speed USB MIDI messages

    Hi, With USBHOST_PRINT_DEBUG defined, the output when the T4.0 Serial+MIDI device is connected to the TMM USB Host is given below. If the T4.0 is changed to a MIDI device, there's a similar result with Descriptor 36 = ??? and Descriptor 37 = ???. I presume this is connected to the issue...
  20. A

    USBHost_t36 and High Speed USB MIDI messages

    Thanks Mark, The code for the transmitter is simply: void setup() { } void loop() { while (usbMIDI.read()) { } usbMIDI.sendNoteOn(38, 100, 10); delay(200); } USB type is Serial+MIDI. The code for the receiver is the unmodified InputFunctions example (again, Serial+MIDI). Works fine...
  21. A

    USBHost_t36 and High Speed USB MIDI messages

    Hi, I have a simple program outputting MIDI messages over USB running on both a T3.6 and a T4.0 (Teensyduino 1.56, Arduino 1.8.19) - both tested. When I run the USBHost_t36 MIDI InputFunctions example on a T4.1 with USB host, or on a MicroMod Teensy on an ATP carrier board, it detects the...
  22. A

    accelerometer sensitivity

    Hi, A lot of the possible confusion arises due to the fact that accelerometers don't measure acceleration - they measure a force and divide that force by a mass to get a result that has the units of acceleration. Consider an accelerometer that contains a magnet of mass m. It has coils to...
  23. A

    Guidance on feasibility of dual SPI MISO lines with Teensy

    Hi, The general solution involves using two SPI ports - one working in master mode and one in slave mode on the microcontroller. Connect the CS and SCK outputs from the master to the CS and SCK inputs of the slave port. Connect one SDO output from the ADC to the MISO pin of the master SPI port...
  24. A

    Implementing TeensyLoader into a C# app?

    Thanks, I'm not using your code to find the Teensy so that's not a problem, All the best, Alan
  25. A

    Implementing TeensyLoader into a C# app?

    Hi, I've used the new version of your library successfully with a Teensy 3.6 - thank you - but I'm having problems with a 4.1 when uploading a HEX file - Upload is returning 1. As a test, I'm simply trying to upload Blink (compiled for 4.1 with Serial + MIDIx4) onto a 4.1 already running the...
  26. A

    How to wire a 4-wire stepper motor?

    Hi, The easiest way to double-check the wiring is to connect two wires together - e.g. red and black. If they are the two wires for one coil then, when you try to turn the motor, you should feel more resistance than when they are not connected. Do the same for the green and black wires. The...
  27. A

    ISR to map MIDI notes to output pins?

    Hi, An interrupt service routine should only react to the single event that triggers it - it should never wait for another event. It should also run as quickly as possible. If you post your current code, someone may suggest a way to modify it to do what you want.
  28. A

    SPI variant question

    Hi, The solution would involve using two SPI channels - one working in slave mode on the Teensy. You would connect one output data line from your ADC to the MISO pin for the Teensy master SPI input, and connect the second to the MOSI pin for the Teensy slave SPI channel. You would also have to...
  29. A

    Audio Shield Capabilities

    Take a look at this: Anti Alias filters on SGTL5000 (pjrc.com)
  30. A

    MCP9808 temperature sensor

    Hi Anna, That sounds reasonable for that chip. If you want a faster response then you need to look at the thermal setup - using the thermal pad on the chip and perhaps forcing air past it if you are measuring air temperature. No matter what you do with it, however, you're limited by the...
  31. A

    MCP9808 temperature sensor

    Hi Anna, How long is it taking to fully change temperature? All the best, Alan
  32. A

    Teensy 4.0 + Audio Shield - beginner help.

    Hi, You should be able to use the calcBiquad function here: Audio/control_sgtl5000.h at master · PaulStoffregen/Audio · GitHub
  33. A

    very general questions re: fabrication of boards, panels, mechanicals

    Hi Ben, I've used JLCPCB for PCBs. They are very good value and I've never had any problems with quality. The minimum order quantity is 5. I've used EasyEDA (online) for design - it's relatively easy to use. Ordering from JLCPCB from within EasyEDA is very straightforward - it will upload the...
  34. A

    Teensy 4.0 + Audio Shield - beginner help.

    Hi, The five values you pass to sgtl5000_1.eqBands must all be between -1.0 and 1.0. You can set all five gains using that command - or you have the option of using sgtl5000_1.eqBand to change any one. You could leave loop() empty for this test. Have you soldered a connector to the line in...
  35. A

    recieve Sysex messages

    Hi, Take a look at the example EXAMPLES|TEENSY|USB_MIDI|InputFunctionsComplete It should help you, All the best, Alan
  36. A

    LittleFS port to Teensy/SPIFlash

    Thanks Paul, That's great. I'll give it a try soon when I get time, All the best, Alan
  37. A

    LittleFS port to Teensy/SPIFlash

    Hi, Could this file system be made to operate with multiple flash chips on SPI, each with individual CS pins? That would be very useful for some audio applications.
  38. A

    Peak tracking problem.

    Hi, That does seem to be a fairly robust way of doing it - well done! So, if for sample n, you compare the sign of the sum of d(n-9) to d(n-5) with the sign of the sum of d(n-4) to d(n), where the d values are differences between consecutive samples - d(n) = y(n)-y(n-1), you will get five...
  39. A

    Peak tracking problem.

    Hi, Fitting a straight line to the slope of your curve is similar to fitting a quadratic to the data - they will give very slightly different results but the difference will be negligible. Fitting a straight line is more straightforward. Look up how to get a least-squares best-fit line of the...
  40. A

    Simple/cheap PCB creation on Linux

    I use EasyEDA. It was recommended to me by a colleague with lots of experience, and I've had no problems with it.
  41. A

    MAX31865 and Adafruit RTD library on Teensy 4.1 problem

    Hi Steve, I'm using those boards but with hardware SPI. Are you sure that board will work with a 3.3V supply? I'm using 5V. Have you checked what the voltage is at the 3.3V output on the breakout board? All the best, Alan
  42. A

    a float = 223.98 prints 223.9799957

    Here's one suggestion. This int n = 7-ceil(log10(data)); sprintf(dn, "%.*f",n, data); will convert 7 significant figures, which are all that are accurately stored in a float, but will include trailing zeros. You'll have to remove those.
  43. A

    Draw filter curves on the display

    Hi, You'll find code to calculate biquad filter response here: https://forum.juce.com/t/draw-frequency-response-of-filter-from-transfer-function/20669/2
  44. A

    Problem using AudioInputI2Sslave and AudioOutputUSB together

    Hi, This is just a suggestion - I haven't tried it. The AudioOutputUSB object doesn't cause the library to update, but adding the AudioInputI2S does so that's why that version works. Perhaps the AudioInputI2Sslave is not causing the library to update as it should. Try adding another dummy output...
  45. A

    Teensy 4.1 SPRAM chip availability

    I got one of these: https://lcsc.com/product-detail/RAM_Lyontek-Inc-LY68L6400SLIT_C261881.html from LCSC. On paper, it looks suitable, but I haven't tested it yet with a Teensy 4.1. I hope to do that soon - I'll let you know if it works.
  46. A

    AudioPlaySerialflashRaw and Multiple Flash Chips

    Hi Chris, I have it working with two flash chips using SPI (using pins 6 and 10 for chip selects), implemented in the simplest brute force way. To play raw files simultaneously from both, I've created two versions of SerialFlash.h and SerialFlash.cpp, two versions of SerialFlashChip.cpp and of...
  47. A

    1Gb flash chip

    Hi, The Micron N25Q00AA 1Gb flash chip stated to work with SerialFlash appears to be obsolete. I can confirm that the newer Micron MT25QL01GBBB1EW9-0SIT also works
  48. A

    using parallel ports with teensy 4.0

    Hi Ricardo, Yes. For example int x = GPIO6_DR; All the best, Alan
  49. A

    using parallel ports with teensy 4.0

    Hi, The list below has the Teensy 4.0 pins and the corresponding registers and bit numbers. The registers are 32-bit. A read from GPIO6_DR will get all 32 bits but only 12 of them correspond to pins on the 4.0 (and no 8 of them are contiguous). You'll need to do some bitwise shifting. The...
  50. A

    AudioPlaySerialflashRaw and Multiple Flash Chips

    Thanks Chris, I'm using a Teensy 4.1, so there are three SPI busses available. I'll try with two flash chips on two busses and see if I can get that to work - I'll let you know if I've any success, All the best, Alan
Back
Top