It was probably getting out of step because some interrupts were dropped as they came in while the previous one
was still being handled, like I said. You don't get indefinite length queues for interrupts, and each...
Thanks everyone for the replies. I’m somewhat familiar with counting clock pulses, comparing the count to a known threshold. But, I’m much more comfortable with timed interrupts, and getting other work done either...
The first thing to do is check the pinout of the encoder by buzzing it out with a multimeter or
continuity tester. You need to start by being certain which pin is which and connect to A, B, gnd.
Randomly guessing and...
Trevor:
Yes, what you describe (4 addr pins common to all five MUXs & 1 I/O pin per each mux for a total of 9 pins) is the most straightforward way to connect your MUXs. I think you will find that reading all of...
If you see this...am I correct in planning to use 4 pins in common to all 5 MUX, and one analog pin each, for a total of 9 pins used (5 analog and 4 digital)? Crazy how many pins I ended up using...
Also note that the Arduino timelib has no concept of timezone so you need to make allowances in your code. As a rule I ALWAYS set the RTC to UTC time and apply the appropriate adjustment for timezone when getting /...
Here is a simple piece of code to set the RTC to 05:30:00 on 05 Mar 2021. Provided the RTC battery is connected, that time will be maintained even while the teensy is not powered.
tmElements_t tmElements;
//...
This PJRC page might help? : pjrc.com/teensy/td_libs_Encoder.html
Amazon page doesn't show the pins by function among the 5 - hopefully it is marked or you found notes?
Thanks for all the responses. Some useful pointers but maybe I should clarify a couple of things. First the title of my post might be misleading, it obviously isn't a performance issue but perhaps an implementation...
Hi,
I'm currently using these boards for a project, and I'm running into an issue where I hear the audio output when the board boots up via programming; however, when I unplug and replug power to the teensy it fails...
Hello all!
I am trying to use one of these "Anmbest" brand rotary encoders: https://www.amazon.com/gp/product/B07MW7D4FD/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
...with the tutorial from:...
I used output compares back in the early 90's on old Motorola (NXP used to be Freescale and before that, Motorola) HC11s, creating one shot and PWM outputs, but they can be configured for pretty much any pulse output...
@mjs513, that is sort of what I figured.
@all - Keep wondering about how SLOW the getting free space is
I can imagine that it could probably be sped up a lot, but not sure how doable it is without major surgery...
Looks like they are clamping VCCIO to ground until VM is present. Could be nasty to some power supplies. I like my p-fet switch much better. Especially considering I'm also turning on the VS motor supply via an IO line...
Awesome. My total needs are something like 15 analog knobs, 71 switches and 3 LEDs and I am not yet sure how that will all work.
I don't really know if there are any performance advantages to leaving some analog...
I have spent the day working on this and think I am close to incorporating the second microphone, but I am getting a bunch of errors for "redefining" pretty much everything. I believe its because all of the Audio Design...
When we work on TFT's that do not have a dedicated graphics processor, we must "mask actions so that they appear immediate" on the screen. We can achieve this by duplicating screens, whose difference is subtle between...
@trevorbryden (Trevor):
Yes, for your 21 inputs, 2 x 74HC4067s would cover your need, leaving some additional expansion if/as needed. You'll need to assign 4 pins for the addressing (common to both MUXs) & 1...
Yes, this is normal designed behavior of the Program Button.
That Button as Program Button - the bootloader chip halts the Teensy and prepares it for programming whenever it has power.
To wake using snooze library...
Hi,
I'm currently building a remote controll using a Teensy 3.2 and a xbee.
The remote is battery powered so in order to extend battery life I'm putting the Teensy into hibernation using the snooze library.
The...
Yes So far I have only put in code for formatting of LittleFS stuff, have not dealt yet with FAT file systems... So far no API or methods that I know of for it, only the sketches in the SDFat library.
Maybe sometime...
MicroMod Teensy <--> Teensy MicroMod
So, these are two different versions.
I have a Micromod board... didn't bother unboxing.. :) It's for the MicoMod Teensy 3.2 Luni board I didn't solder...
John: Go and find...
The datasheet at least draws the schematic the right way round(!) And it has a PCB layout which you would
do well to follow verbatim.
Maybe add schottky protection diodes on the audio lines. Stops someone blowing...
The board I linked to also has 2 voltage regulators on board. I assume to generate a 3V3 analog and a 3V3 digital power supply.
If you want an easier-to-use board, go for this one. Check out the wiring here.
To be...
Hi
I'm doing my first Teensy project in VSC.
I have tested the 1-Wire Protocol lib together with the Dallas temperature lib, and it works stand-alone.
Combining it with other time-sensitive real-time stuff...
Sometimes I find users call flush/sync since they do not properly close a file. close() just calls sync() then marks the file closed.
bool ExFatFile::close() {
bool rtn = sync();
m_attributes = FILE_ATTR_CLOSED;...
Its indeed the same schematic as in the datashhet.
Note the datasheet says, for lower frequencies (as we have) you can omit the output filters.. (but hey, it's just a resistor+cap) - adding them allows you to play with...
Yeah I read in other forums that calling flush() that often would slow down my code, I just couldn't find a way around it. Thanks for providing that solution, I'll be sure to check it out! Do I just copy the set up code...
Here is a schematic:
taken from here:
https://electronics.stackexchange.com/questions/419171/pcm5102a-analog-output-level-not-what-i-expected.
I'd just use the breakout and solder it to yours...
Edit: Here is...
OK, great! Thanks for weighing in, Paul.
I guess I'm just confused on what's going on with a breakout board like the one that PaulS linked. (The other PaulS.). If I can connect the PCM1502A with just I2S and three...
Thank you! I couldn't figure out what I was doing wrong. I bricked 4 teensy 3.2 this way and only 1 of them came back when I bridged the cut with solder. On that one, the solder must have wicked down to layer 3. Time...
The good news is chips like PCM1502A are really simple. To interface with Teensy, you just connect the I2S data and 3 clock signals. Some chips use different names so you need to figure out which is which. But on...
You need AudioMemory() in setup(). See any of the examples in File > Examples > Audio.
To get a ADSR or AD style control signal, you would feed the DC output through an envelope effect. For only attack-decay...
Hey folks, check out the picture upper top right in this link: https://www.digikey.com/en/maker/blogs/2020/sparkfuns-open-source-micromod-ecosystem-accelerates-prototyping (screenshot Attached). We need software like in...
Hi, since there is no envelope to control waveform frequency modulation or filter frequency modulation I tried to use the "DC" output.
When I press the MIDI keys I want the Serial monitor to show values going up to...
I think it would be useful to see if you can leverage use of the SPI hardware built in to the Teensy. Looking at wikipedia, it seems that FM encoding could be done by encoding two bits for each bit and run the clock at...
Thanks! So for 21 analog inputs (just beyond the 4.1 availability, esp with audio shield) you'd recommend one or two of those 74HC4067s as the easiest path forward. Thanks!
Can i maybe include your calliope as an SD...
Thanks BriComp. I hadn't actually thought about this as a logic level issue, but that could also work. I know a MOSFET or even an npn transistor will work, I was just looking for something more creative. I just tested a...
The Teensy format (AKA Stamp) excels for breadboarding use. This is one reason why Teensys have been so popular. (Though, by far not the only reason)
I've looked at micromod and concluded it buys me very little. ...
C is not my native language, I am more of a LabView guy.
I am pulling this stuff from the TimLib.h and guessing as to how to work this to no avail.
void setTime(int hr,int min,int sec,int day, int month, int yr);...
BriCom'sp suggestion of a buffer chip would work just fine, or the simplest thing would be to use a MOSFET. Assuming you're using this for some kind of slow switching rather than signalling.
Referring to the pins as...
Hi,
What did you do to get this working?
I get all the time
"MQTT connection failed, rc=-2"
Here is my code:
#include <NativeEthernet.h> //for teensy 4.1
#include <PubSubClient.h>
Sounds great! Any ideas where I could look to find a proper schematic to use a PCM5102A with a Teensy? I'm hoping to integrate it into the PCB instead of buying a breakout board.
Frank B: The format of the board can remain similar and fairly small like the current board. It will have to be bigger just to accommodate the RT1176 package. Nothing to do about that. But the basic pin layout can...
@KurtE
Ran a couple of test cases just out of curiosity.
First case was as described in my previous post which we know worked. But then I unplugged the SDcard adapter and plugged it back it - it seemed to work but...
Second question:
In the above example for telling the Teensy to read the anaolg input, Do I use 26 or A12 in the parentheses for identifying which pin to read?
For example:
val = analogRead(26);
or
Doh, I forgot to add the analog input.
I have a question.
I will be putting the Teensy into a Serial/Keyboard,Mouse/Joystick mode.
Do I have to include any other libraries to use:
int val;
Hi Teensyers,
I'm building a Teensy poly synth and would like to figure out how to build out my own DAC hardware. Here's a pic of the prototype board. Currently using the Audio Board, which honestly works great, but...
@mjs513, now We need to find way to update the free/used space.
And need to test unplugging a device and do we properly remove the partitions...
Also I again want to try updating the StorageIDs... They are...
Depends on how much sense it makes for users to lose a lot of functionality just to have a small form factor - that with an unrivaled fast CPU.
I think many would favor a good display.
That's for Paul to decide.
I...
Thanks for your answers.
Yes, I have programmed a form and a touch code for this form. If I push a touch button you will start a new form with a new code for the touch functionality.
Now I will read and understand...
Armadafg: I'm with you on that. The format of the T4 and T41 is very nice. Well laid out, easily accessible functionality. And, if the format of the board is changed too much will it still be possible to call it a...
For writing a pulse, in the timer interrupt callback, I would set the pin high, delayNanoseconds (500), set the pin low, start the timer for the next interrupt.
I know playing around with MTP and the like, I believe if you do all writes in units of sectors or clusters, it can run a whole lot faster.
For example I know it was a lot faster with 4K blocks than when I dumped USB...
USB is much faster than Hardwareserial, so it receives much faster than Serial1 can send it.
You want something like
while (Serial1.availableForWrite() > 0 && Serial.available()> 0) Serial1.write(Serial.read());...
Right, so the answer is to not keep opening files! So I'm now opening the file once and dumping the whole 300k bytes into it as it comes in, then closing it. Then I can read in chunks from the file at my leisure using...
Hi All,
This is my first time posting to any forum so I apologize if I break any norms...
I am a mechanical engineer that is in way over his head by taking on a DSP project. I am trying to make a voice...
Morning all
Gave the change quick try using a hub plus 1 old thumb drive formatted for 2GB and the 32GB SDCard/Adapter. Seems to come up a lot faster, and looks like it picks up the 2 drives and all the partitions....
Always hard to know without a lot of additional information. Could be simply either overrunning the display with data or...
Could be the Serial buffer size, and you have more data on Serial than will fit in the data...
You will never get high speed low latency results with flush()/sync(). flush() is just a call to sync().
/** Arduino name for sync() */
void flush() {sync();}
sync() causes a huge amount of extra I/O. The...
I guys,
i made a project with Teensy 3.2 and display Nextion (connected to Serial1).
In my previous project with Arduino mega i used the onboad serial to transfer program to display Nextion with this skecth and it...
would just use the bounce library.
Since this is just about mechanics, it is not necessary to use interrupts at all. It makes no difference if you know the state of the switch within 50 nanoseconds or microseconds....
Hello,
I have a system that is supposed to read angles from encoders. Attached to each encoder is one slave who is supposed to send the information of the angle to the master. At the beginning of the work 3 slaves...
I said writing a new file is slow. Or, more exactly, opening a new file for writing is slow.
Edit: Opening to append data to a file is slow, too.
Best and fastest is to open and close a file once, outside a loop,...
Thanks Frank B. Noted re block size. I believe I'm removing all files before the main loop starts so all file opens are new files, so I'm not opening an existing file. Once a file is opened, I do this and then close...
There are mainly classes. But it seems that there are nearly no conflicting function names if not class based.
I found a way by using https://github.com/dwd31415/single-c-file for the headers and cpp files. There...