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.
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...
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.
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?
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...
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.
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.
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.
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.
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!
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.
I have have 5 3.7V cells that each have some kind of protection circuit on them connected to a basic BMS without balancing.
https://m.aliexpress.com/item/1005001327267228.html
https://m.aliexpress.com/item/32909360073.html
Do I need to care about balancing if each battery should check its...
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...
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...
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.
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...
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...
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.
I am using the SPI slave code from here https://forum.pjrc.com/threads/58023-Teensy-4-as-SPI-Slave (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; )...
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...
It doesn't sound like the RFM69 is in sleep mode. Have you read the RegOpMode register (page 63: https://cdn.sparkfun.com/datasheets/Wireless/General/RFM69HCW-V1.1.pdf) and actually confirmed it's asleep?
I was doing something similar, though not specifically with that hardware. You could convert your required image to an array (here, for example (untested): https://lvgl.io/tools/imageconverter) which gives you each pixel as RGB values, and you can then copy into your code.
From there, you could...
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?
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...
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...
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}...
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.
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...
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.
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...
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...
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.
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.
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...
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.
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...
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...