Search results

  1. P

    Two ISR's on one pin

    I think that should be fine, but the best way would be to test it, which should be very easy. Wire one pin to another pin, set the first as an output so it can send a pulse, and then attach interrupts onto the receiver pin.
  2. P

    Multi-channel audio via USB in Teensy 4.1

    I remember Paul said that it is theoretically possible to have multichannel USB audio but you would need to do a lot of work with the USB protocol in order to do it. If you only need a few khz, you could try doing it over serial. That should be fairly simple to setup and I think it should be...
  3. P

    triggering an envelope from another audio object

    I don't know of a better way but I'm no expert. You could write a new envelope object based on the old one that takes an additional trigger input, which probably wouldn't be too hard, but the audio code can be pretty confusing.
  4. P

    Issue recording audio longer than 3 seconds with Audio Adapter board

    I don't think this is an audio issue. It seems like the SD card is failing rather than writing extremely fast. You would need to check the error logging from the SD library to see why. It might be because you need to flush() the file, or perhaps periodically save and reclose it?
  5. P

    Encoders change twice per detent. Make them change only once?

    I realised that I could just divide by 2 instead of 4 and it does what I want. Thank you.
  6. P

    Teensy 4.1 simultaneous SPI.transfer calls with eventhandler using LPSPI 1, 2 & 4

    If you post full code, that might help. I would expect to be able to do: digitalWriteFast(10, LOW); //numbers are just examples. digitalWriteFast(0, LOW); digitalWriteFast(20, LOW);//Write HIGH in callbackHandlers. SPI.transfer(dmabuf, nullptr, 2, callbackHandler); SPI3.transfer(dmabuf3...
  7. P

    Encoders change twice per detent. Make them change only once?

    Paul, that's not it but thank you. I'm using the built-in library. There are 12 detents(approx) but 24 transitions. I can get it to increment by 1 if I leave the knob between detents but it's very fiddly. Using EC-11s I think if that matters.
  8. P

    Teensy 4.0 Not Receiving USB MIDI info

    Have you definitely get your MIDI routing right on your Mac? Presumably your code is just an example so there's no reason why it shouldn't run.
  9. P

    teensy 4.0 error message whn using UTouch library

    You could try editing that line to P_CLK = (volatile uint8_t*)portOutputRegister(digitalPinToPort(T_CLK)); Might work if you don't have any other ideas.
  10. P

    how to rename a teensy that controls a button box

    T change the MIDI name, it's "name.c". Maybe that works here too.
  11. P

    Sending data from WiFi module to Teensy, looking for I2C alternatives

    Wire I think only deals with masters, so you have two masters there. I think it's pretty hard to get Teensy to run as a slave without getting into some deep code. For something like this, it sounds like a serial connection would be better. I may be wrong.
  12. P

    Teensy 4.1 simultaneous SPI.transfer calls with eventhandler using LPSPI 1, 2 & 4

    As far as I know, each of the SPI busses is completely independent so you can't trigger them at the same time. You should be able to trigger the non-blocking transfers concurrently though and you shouldn't have to wait for each one to finish I think.
  13. P

    Stepper output from a motion controller

    Sounds like you need to decouple the motion controller from the stepper motors and translate it into something the steper actually want.
  14. P

    Teensy 4.1 pins 42-54 for micromod design

    I think I read that there's no PSRAM on the MicroMod. No ethernet either. Shame. Imagine if there was something as compact as MicroMod but with all or most of the pins of the IMXR1060Ti brought out. That would be the amazing!
  15. P

    Encoders change twice per detent. Make them change only once?

    Encoders change between the detents and also on the detents. I seem to remember in some library somewhere there was an option to change this. Is there? Thanks everyone.
  16. P

    Is a non-balancing BMS safe if each cell has individual protection?

    Thanks for the response. I'm not too concerned about capacity right now - I just want it to work safely.
  17. P

    Is a non-balancing BMS safe if each cell has individual protection?

    I have have 5 3.7V cells that each have some kind of protection circuit on them connected to a basic BMS without balancing. Do I need to care about balancing if each battery should check its...
  18. P

    How is SPI transfer actually handled on Teensy 4.1?

    Thanks Penny. I've rearranged my setup to: pinMode(BUTTONCS, OUTPUT); AUXSPIBUS.setMISO(39); digitalWrite(BUTTONCS, 0); AUXSPIBUS.begin(); from AUXSPIBUS.begin(); AUXSPIBUS.setMISO(39); pinMode(BUTTONCS, OUTPUT); digitalWrite(BUTTONCS, 0); Hopefully that does something but I've...
  19. P

    non-blocking read from sd card on Teensy 4.1 ?

    The SD card for Teensy 4.1 is over the SDIO interface on LPSPI1. Each SPI port has a 16 word FIFO buffer. You can configure this to trigger an interrupt when it receives data. This interrupt can then be used to initiate a DMA transfer from the buffer to wherever. I think when this DMA is...
  20. P

    simple encoder question

    Your code works and it's short and simple (if a bit messy). There is no point changing something like this. Focus your attention on something more important, as I expect you have after one month.
  21. P

    EWI mouthpiece with breath and bite (lip pressure) sensors

    You have a lot of very specific questions and I think you'll have to just try some things and see if they work. I can perhaps assist with a few points. MPX5010 are less than £20 including shipping to UK on AliExpress. I don't know where you are but it's probably similar pricing. In terms of...
  22. P

    Teensy 4.0 with multiple encoders and analogue input

    I think most encoders are pretty rubbish. The cheap ones at least. You could try fixing it in software e.g. something like if (abs(position1 - enc1) > 4){ignore();} but I think the root cause will still be there. In terms of analogue input, the function is analogRead(pin). Connect the wiper of...
  23. P

    Teensy 4.1 SPI slave - attachInterrupt on chip select broken?

    Nothing fancy like that. Just a series of single transfers to transfer more than one word/16 bits. I don't even need DMA really but the example came with it.
  24. P

    Teensy 4.1 SPI slave - attachInterrupt on chip select broken?

    I am using the SPI slave code from here (KurtE #15) which works (sending data from SPI1 to SPI). I want to add an interrupt on the slave chip select so there is a simple way to control longer SPI transactions. (eg. currentWord = 0; )...
  25. P

    How is SPI transfer actually handled on Teensy 4.1?

    In my project, if I press a lot of buttons (which causes a lot of SPI communication), the code hangs and GDB shows me it's getting stuck in the below while loop from SPI.h (starting line 1237). uint8_t transfer(uint8_t data) { port().TDR = data; while (1) { uint32_t fifo = (port().FSR...
  26. P

    MIDI causes crash on Teensy 4.1

    That is wonderful, Pieter. Thank you very much for your help.
  27. P

    MIDI causes crash on Teensy 4.1

    This should be easy for someone to solve. If nobody can solve it, looks like I am the most intelligent person here...
  28. P

    Snoozing Teensy LC and RFM69HCW

    It doesn't sound like the RFM69 is in sleep mode. Have you read the RegOpMode register (page 63: and actually confirmed it's asleep?
  29. P

    Teensy 4.0, OctoWS2811, WS2812B's: code generator for LED mapping?

    I was doing something similar, though not specifically with that hardware. You could convert your required image to an array (here, for example (untested): which gives you each pixel as RGB values, and you can then copy into your code. From there, you could...
  30. P

    Changes to SPI ?

    beginTransaction is only for when you are actually transferring data so you do not need that in the setup. I had a problem using MISO1 and pin 39 and it was because I did not call SPI1.setMISO(39); Maybe try that if you have not already?
  31. P

    How to receive big sysex dumps and save to SD. Not enough RAM to store as a buffer!

    Don't bother with individual bytes because writing one at a time to an SD card will slow things down. The best way would be a have two buffers in RAM of perhaps 1024 bytes, and when one is full, start writing to the other one and write this one to the SD card. This won't work with USB MIDI...
  32. P

    Using EXTMEM to Place Variables in External PSRAM

    It looks like you have to put EXTMEM with all the function definitions, which would put the code for the functions in the PSRAM (and I don't think that's possible or would save anything). Looking at the file and line 348: uint8_t *pixels; ///< Holds LED color values (3 or 4 bytes...
  33. P

    MIDI causes crash on Teensy 4.1

    Running on a Teensy 4.1, this gets up to 185 bytes sent every time and then stops. Any ideas? Thanks. #include <MIDI.h> HardwareSerial serialPort0 = {Serial1}; //bi HardwareSerial serialPort1 = {Serial7}; //bi HardwareSerial serialPort2 = {Serial8}; //bi HardwareSerial serialPort3 = {Serial4}...
  34. P

    Using GDB with Teensy without hardware debugger, first Beta

    I spent a while on this but didn't get it working. I was using the latest Teensyduino and built the project in the Arduino IDE. Thanks for trying to help but I've given up for the moment. If I come at it again, I might figure it out.
  35. P

    Using GDB with Teensy without hardware debugger, first Beta

    This looks good but I can't get it working. Using Windows 10 and a Teensy 4.1 and the "take over serial" option, I get the error "COM14: No such file or directory." If I start GDB manually and connect instead to "//./COM14", it gets past the first stage but then says: "Ignoring packet error...
  36. P

    Does the Teensy 4.1 handle the PSRAM refresh time?

    Thanks to you both, my good buddies.
  37. P

    Does the Teensy 4.1 handle the PSRAM refresh time?

    I think the P means it's actually DRAM and so it needs to be refreshed. If this is true, what happens if I try to access data during this refresh time? Thanks.
  38. P

    ILI9488_t3 - Support for the ILI9488 on T3.x and beyond...

    Thanks for the reply. I was using the default version and then I tried the GitHub version:
  39. P

    ILI9488_t3 - Support for the ILI9488 on T3.x and beyond...

    In ILI9488_t3.cpp, lines 84 and 85 are commented out which prevent code compiling on Teensy 4.1 when trying to use DMA (updateScreenAsync): 84: //DMASetting ILI9488_t3::_dmasettings[2]; 85: //DMAChannel ILI9488_t3::_dmatx; Uncommenting these makes the code compile and it seems to work (though...
  40. P

    .cpp files not working as I expect

    WMXZ, Thank you but I think the answer is to do with a lack of extern. KurtE, Thanks for your support and patience. On my PC the code is all in a folder called sequencer and its USB type is Serial + MIDI + Audio. However, the error is in the linking phase and it seems the issue is most...
  41. P

    .cpp files not working as I expect

    Has anyone got any ideas?
  42. P

    .cpp files not working as I expect

    Defragster, I don't know either. I was hoping somebody else would. The errors don't make any sense to me because the lines in functional and forwarddec.h to which are referenced look like they have nothing to do with the definitions.
  43. P

    .cpp files not working as I expect

    It's in a folder called sequencer on my computer with a sequencer.ino file, now uploaded. The file that makes things go wrong is debug.cpp.
  44. P

    .cpp files not working as I expect

    Thanks for the response. The build environmnet is just the Arduino IDE. That library structure is the contents of my sketch folder. I've added those files which I tried to upload in bulk earlier. As far as I can see, there is only one nullIntFunc(int) in utility.h.
  45. P

    .cpp files not working as I expect

    Please explain .cpp files. I have been working on a large project without .cpp files because I was fine with the longer compilation times and I put most of my forward declarations in a single file at the start (and then a few in a second one later). I am considering growing up and using .cpp...
  46. P

    Teensy 3.6 + ILI9488

    Thanks for the response KurtE. It is a new screen that I ordered. All the jumpers seems to be set correctly. I am just using AnalogWrite for the backlight. The old one worked like this so I would assume this one would too but I will see if that is causing issues. Thanks.
  47. P

    Teensy 3.6 + ILI9488

    Yes. It is this one:
  48. P

    Teensy 3.6 + ILI9488

    I had this working using the 2x20 connector but I am trying to use the FFC now with no luck. I am using the attached wiring. The only difference from normal is that CS and DC are reversed. I tried using 3.3v just for the backlight but when connected to the screen, the pin is only showing 0.1V...
  49. P

    Why does the Teensy 4.0 have fewer pins than the 3.6 and some othe stuff?

    Thanks for the response. I really don't think sale cost is a factor; PCB is cheap and adding more pins is just a matter of more traces. The initial cost of the time spent sorting it out is a good point though, especially with a new chip. Shame about the USB pins. I really don't like Micro USB...