This is a nice example, but I was able to accomplish the same result myself. The problem is that the hysteresis levels provided by the built in analog comparator are not always enough, hence I asked...
Type: Posts; User: LukasFun
This is a nice example, but I was able to accomplish the same result myself. The problem is that the hysteresis levels provided by the built in analog comparator are not always enough, hence I asked...
Hello everyone,
I would like to use the analog comparator of the Teensy 4.0 (page 3425 of the manual and onward) to build a frequency counter.
I would like to set it to generate an interrupt...
I want to read the temperature from the internal sensor. My Code for this is
#include <Arduino.h>
void setup() {
}
void loop() {
Your code doesn't compile for me. It gives the errors
'DMASPI0' was not declared in this scope
'DMASIZE0' was not declared in this scope
and
Thank you, this clears up the issue. I'm using the Teensy 4.0.
The single hardware CS pin is not enough and the other pins do influence how the device uses the actual bytes (it's a...
The SPI library lets you send and receive data to and from an SPI device.
I want to send and read a lot of data to and from devices without putting too much load on the core, so I'd like to do this...
I have experimented with the general purpose timer (GPT) and am quite pleased with how it works (except the fact that reading from and writing to the status register takes incredibly long *ahem*)....
OK, so this works if you want to use only one interrupt per timer (which is two in total). Is there a way to attach three different routines to the three output-compare events of one timer?
The overhead of digitalWriteFast() is nothing compared to the problem here (3 ns = 150 MHz). Here is what your code produces:
18748
Here is what the reading of the oscilloscope looks like:
18746
Update: With the 150 MHz clock it only takes about 80 ns. But that is still way too long for just setting or reading a value.
This is the sketch I used for testing this:
#include...
But I am using the peripheral clock, which runs at 150 MHz...
I have been working on a project where I use timer controlled interrupts. One of the things necessary for that is to reset the respective bits in the GPT Status Register. Reading a value from that...
It seems that the Pins are connected to GND via a 100 kOhm resistor by default. It is possible to disconnect them though using
pinMode(pin, INPUT_PULLUP);
See also...
Is there any way to pull down an input pin on the Teensy 4.0 other that manually connecting it to GND via a resistor?
Thanks manitou for the inspiration. I've been working on the project for some time now and was able to get it working the way I wanted it to (I'd still like the structure to be a bit better, but...
I am trying to create multiple interrupts that use the gpt.
The project should look something like this:
// compare values that will trigger the interrupts
uint32_t ocvalue1 = 1000;...