Thanks for the quick fix.
Type: Posts; User: luni
Thanks for the quick fix.
I finally found time to try your lib.
I tested it with count rates up to 1 MHz and randomly switching direction. I also tried phase angles as small as 10° and bounced signal transitions.
So far...
I might be biased :-), but I prefer VisualTeensy over VMicro... https://github.com/luni64/VisualTeensy
Easy to use, no hidden build magic, good intellisense engine, supports Teensy.exe and tyTools...
Ok, I know whats wrong: I had a old version of Teensy.exe. Updated to the current version now everything works as it should.
Sorry for the noise....
@Kurt, tried your sketch, it kind of uploads when uploaded from the IDE (you see the process in the verbose log) but it then breaks (timeout?) and never reboots.
Loading the same hex file...
Yes, because you don't use the array the compiler optimized it completely away...
Here the linker output for your changed code:
[LD] .vsteensy/build/TestProject.elf
Memory region ...
I'm confused about how to place data in the Flash.
What I understood so far:
const char buffer[500*1024] = {0};
void setup()
{
Serial1.println(buffer);
Just wondering why that would be called? Where do you assign that function to the actual IRQ_FTM2 called by the NVIC?
Tekceleo* tekceleo;
void setup()
{
BTW: Maybe I didn't spot it but where is your IRQ_FTM2 handler?
Would be easier to help if you could generate a minimal example which shows the error and can be compiled without hardware / libraries.
Generally:
I'd try to avoid hardware access in a...
https://www.az-delivery.de/products/saleae-logic-analyzer?_pos=2&_sid=01681d4d4&_ss=r
I tested your code and don't see a problem with acceleration.
I changed the following for my tests:
void setup()
{
while(!Serial); ...
For an acceleration from 0 to 48kHz in 4s you need a setting of 48'000/4 = 12'000 stp/s^2. TeensyStep allows values from 1 to 500'000 so this should be no problem.
This is very unlikely. Can you...
You can also give VisualTeensy a try. https://github.com/luni64/VisualTeensy
This uses VSCode which works IMHO better than VisualStudio since it uses gcc for the intellisense analysis. Thus it...
I don't see your static variable "instance" defined in your cpp file. If it isn't defined in some other place you need to add
Tekceleo* Tekceleo::instance = nullptr; to your cpp file.
See...
Due to recent interest and for easier installation I pushed TeensySharp (upload firmware from dotNet applications, find Teensies on the bus, get com port, get notifications about added/removed...
I just did a quick experiment and changed the linker script for the T-LC to use the '_teensy_model_identifier = 0x20' as FILL byte (instead of the usual 0xFF)
...
SECTIONS
{
.text : {
....
Just for my curiosity. What would be the advantage of connecting the ESP to those UART interface? Why not simply connecting it to the standard Teensy USB port and do the programming over that? (AFAIK...
That would be really great for debugging apps which have their normal communication channel (commands, data etc) to the PC via Serial. For those apps I usually connect a a USB/Serial cable to one of...
@ Gremlin, I'm aware of that and fixed it already for another project. I'll port it to TeensySharp in the next release.
@Paul: It would be perfect to have a byte at a fixed memory location to...
Looks good, thanks a lot for sharing. I'll give it a try when the chips arrived.
Any chance that you share your code to access the IPS6404? Just ordered a bunch of them for experimenting, so some working examples to start from might be useful.
That's very useful indeed. I will certainly test it with high resolution encoders as soon as I find some time.
If you want to do some performance testing I have a Teensy quadrature tester on...
TeensySharp https://github.com/luni64/TeensySharp is a c# library which you can use to upload firmware to T3.1 - T4.0. You can also use it to identify connected Teensies, get notified on plugging in...
Great explanation. There is a small error in it which is worth correcting:
It is the other way round. Signed will be promoted to unsigned which can be quite confusing.
int a = 7;
int...
That is correct. i++ is a post increment operator. I.e. it increments after the assignment. If you use ++i it should work.
Anyway, you probably meant i++, instead of the unusual i = i++; ?
Edit:...
AFAIK you need two cycles to read/write a register. That makes 4 cycles per period which gives you 1/4 F_CPU. (plus the time for the loop)
Just measured the speed of this snippet with an LA on pin 11 and get some 250ns on a T4@600MHz
digitalWriteFast(11, HIGH);
volatile uint16_t value =
digitalReadFast(2) << 0...
I wonder if the bit shuffling will be faster at the end as reading the pins sequentially. However, you should use digitalReadFast instead of digitalRead and it might be faster to OR the results...
Answered on GitHub...
The TeensyLC has an ARM controller not an AVR. So, accessing AVR registers (PORTD ...) doesn't make much sense. However, for some (portability?) reason there is emulation code in avr_emulation.h...
I'd use a standard 74HC575 for that. It only requires 3 wires for 8 outputs.
Here some information. https://learn.adafruit.com/adafruit-arduino-lesson-4-eight-leds/the-74hc595-shift-register
I'm afraid you won't get much faster than this and even that generates a significant load on the T4. Here https://forum.pjrc.com/threads/57959-Teensy-4-IntervalTimer-Max-Speed some information on the...
This of course only works if the Teensy has the serial interface activated. For the HID modes you need to send some magic bytes to the feature report of one of the interfaces. If you are interested...
Here a link to about 5000 rs485 receivers/drivers. https://octopart.com/electronic-parts/integrated-circuits-ics/interface-ics/rs-232-rs-422-rs-485-interface-ics
The table is very well organized,...
RS485 should be able to do this. E.g. the SN65HVD82 http://www.ti.com/lit/ds/symlink/sn65hvd82.pdf can drive up to 256 receivers. Usage is really simple if the nodes only need to listen.
Here a quick sketch showing how to extract this information. One probably can find a more intelligent way but this is doing what you need.
#include "Arduino.h"
const char *portName(volatile...
Ok, seems like the clock for GPT2 is not enabled at startup. Enabling it prior to usage of the timer fixed the issue.
Is the timer GPT2 used for some internal tasks? Disabling it by setting GPT2_CR to zero crashes the system. GPT1 works as expected.
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
GPT1_CR =...
This is part of the core libraries which you can find here (win10) "Arduino/hardware/teensy/avr/cores/teensy3" or "../teensy4" for the T4. Nothing to install,just use it.
(Github:...
I think the root cause for that is that reading/writing of the peripheral registers (not tightly coupled) takes rather long and is not primarily related to F_CPU but to the speed of peripheral bus. ...
Thanks for the measurments defragster. Unfortuately it does not look very good. ~40% load for having 4 interval timer toggling pins at 100kHz does somehow not fit to the otherwise very fast...
See here for links to some tests from early this year. https://forum.pjrc.com/threads/57951-Teensy-3-x-library-for-tick-timer?p=218573&viewfull=1#post218573
I reactivated one of the test sketches...
I did some testing with the PIT performance of the T4-Beta board: https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=195467&viewfull=1#post195467 and some posts later on. I found that...
The compiler is very friendly to you and tells you exactly what it wants you to do:
src\main.cpp:28:31: warning: ISO C++ forbids taking the address of a bound member function to form a pointer...
No, the T3.2 only has two differential pairs and only these are connected to the PGA. You can not measure the load cell output voltage directly (they would be too small).
You are very welcome. As you already noticed, this is one of the few friendly forums out there. So, feel free to ask if you need any support later on.
Sorry, I was unclear about that. I didn't mean the bidirectional communication, I thought that you want to generate a new object whenever you detected a input from the slave. Thinking of it, having a...
You are right, I remembered 80ms. And yes, the HX711 is a good device but too slow for my application... Just use it if you like it, nothing speaks against it.
The T3.2 has 2 ADC/PGAs. ADC0 uses the differential pin pair A10/A11 and ADC1 uses A12/A13. So, you can connect 2 load cells. TeensyLoadcell is able to use both in parallel (you pass the used adc...