Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: luni

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. I meanwhile found time to do some experiments...

    I meanwhile found time to do some experiments with the multiplexed encoders. The setup is a bit messy (need to wait for the boards from china) but works nicely. Schematic, BOM, Gerbers etc here...
  2. I don't know the sources of that program but...

    I don't know the sources of that program but usually you'd look for a device with the correct VID/PID, then you know what interfaces it has and just use them? Here...
  3. No, there is no Windows confusion. Raw Hid...

    No, there is no Windows confusion. Raw Hid implements two interfaces and the device manager shows those two as it is supposed to do. One is the RAW HID interface and the other is the SerEmu...
  4. To visualize what defragster has just written...

    To visualize what defragster has just written here a simple example:



    void setup()
    {
    constexpr double x = 15.4;

    if(x > 15)
    {
  5. The COM numbers are assigned by windows. While in...

    The COM numbers are assigned by windows. While in principle it is possible to change that by software, I doubt that platform.io is doing this. The monitor_setting setting probably only defines the...
  6. You are probably looking for...

    You are probably looking for attachInterruptVector(IRQ_NUMBER_t irq, void (*function)(void))? The IRQ_Numbers IRQ_XXX are defined in imxrt.h starting at line 8

    Edit ... and here an example how to...
  7. Replies
    8
    Views
    104

    Glad it works, have fun with the TeensyTimerTool...

    Glad it works, have fun with the TeensyTimerTool :-)
  8. Replies
    164
    Views
    11,881

    Thanks As soon as there is some decent c#...

    Thanks


    As soon as there is some decent c# cross platform GUI...

    Meanwhile: I tried to separate the business logic from the GUI, so if you want to port it to macOS it shouldn't be too hard.
  9. Alternatively, you can give VisualTeensy a try....

    Alternatively, you can give VisualTeensy a try. https://github.com/luni64/VisualTeensy/releases

    VisualTeensy is a lightweight, free, open source tool to generate all project files and settings to...
  10. Yes, looks a bit different :-) I'm using Eagle...

    Yes, looks a bit different :-) I'm using Eagle for about 35 years now, good thing is that despite the GUI, the underling workflow, the key shortcuts etc didn't really change and is still very...
  11. Since I wanted to try multiplexed encoders for...

    Since I wanted to try multiplexed encoders for quite some time and I wanted to test the new Eagle version anyway, I did a quick 74HC165 based test board. (Eagle files and Gerbers on github...
  12. Thread: Teensy Qt

    by luni
    Replies
    437
    Views
    130,587

    Just unzip to a convenient place and start the exe

    Just unzip to a convenient place and start the exe
  13. Glad you like it. It is a common misunderstanding...

    Glad you like it. It is a common misunderstanding that you need to use interrupts to catch all of the bouncing signals. In fact the underlying gray code (aka quadrature signal) is totally insensitive...
  14. You defined diffRatio as unsigned. Change to...

    You defined diffRatio as unsigned. Change to float and you get the right result.



    constexpr unsigned teeth = 17;
    constexpr float diffRatio = 3.42;
    constexpr float WheelCirc = 2126; ...
  15. I assume you are talking about the usual...

    I assume you are talking about the usual mechanical encoders for human input, not high speed encoders for motor applications? If so, I'd use a simple polled algorithm instead of the usual interrupt...
  16. Regarding the rolling average: I like this if I...

    Regarding the rolling average: I like this if I only want to smooth. Experiment with the alpha value to see the effect.



    float measure ()
    {
    constexpr float alpha = 0.01f; // alpha=1 -> no...
  17. Replies
    18
    Views
    284

    Sorry, I was probably not clear in my last...

    Sorry, I was probably not clear in my last answer. Nothing needs to be changed on the hardware.

    I don't have time to test your code right now, but you can try the following:

    1) In line 13 of...
  18. Replies
    18
    Views
    284

    Why not? Just change the StepControl to...

    Why not? Just change the StepControl to RotateControl. If you need to move the motors to an absolute position (like you do in setup()) use a step controller. You are not limited to one controller....
  19. Replies
    18
    Views
    284

    For overrideSpeed you need a rotate controller...

    For overrideSpeed you need a rotate controller...
  20. Replies
    8
    Views
    104

    Choose 3.7Ás for the first delay and 8.0 Ás for...

    Choose 3.7Ás for the first delay and 8.0 Ás for the second. (You need to hand optimize the numbers a bit for those short times) This will give

    18968

    Teensy 4.0 of course
  21. Replies
    8
    Views
    104

    Fastest I could get with TeensyTimerTool ...

    Fastest I could get with TeensyTimerTool was some 850ns delay after triggering. I used a TMR (QUAD) based timer in OneShot mode to get the short first delay and then retriggered in the ISR to get the...
  22. Replies
    8
    Views
    104

    Can you provide some more information? ...

    Can you provide some more information?


    What is your data clock frequency?
    I assume that you want the first call of trpClk at T/2. After that it should be called repeatedly with the data...
  23. Replies
    22
    Views
    314

    Interesting, do you have some code generating the...

    Interesting, do you have some code generating the data stream for testing?
  24. Replies
    52
    Views
    1,886

    Oh my..., pretty much every thread there ends in...

    Oh my..., pretty much every thread there ends in a big bashing of somebody / something :-) Nowadays, I can only read it when I need to get rid of too much good mood :-) The only useful information I...
  25. Replies
    52
    Views
    1,886

    Oh, somehow that reminds me of ...

    Oh, somehow that reminds me of




    :rolleyes: :rolleyes:
  26. Replies
    18
    Views
    284

    1) The level shifter adjusts the output voltage...

    1) The level shifter adjusts the output voltage of the Teensy (3.3V) to the required input voltage of the driver (5V). Without it it might or might not work. If you only do this for your hobby and it...
  27. Replies
    3
    Views
    59

    I have no experience with wire at all, but...

    I have no experience with wire at all, but looking at wire.h I guess you should compile & link WireKinetis.cpp or WireIMXRT.cpp (T4) somewhere? Might be completely wrong of course...
  28. Replies
    18
    Views
    284

    You'd use 4 controllers in this case ...

    You'd use 4 controllers in this case


    ctrl1.moveAsync(m1); //start all movements
    ctrl2.moveAsync(m2);
    ctrl3.moveAsync(m3);
    ctrl4.moveAsync(m4);

    while(ctrl1.isRunning() && ctrl2.isRunning()...
  29. Replies
    18
    Views
    284

    No, it requires 450 nanoseconds not microseconds....

    No, it requires 450 nanoseconds not microseconds. Just check if you convert the 3.3V output to the required 5V output. Without converting the behaviour might be borderline (VID requires 3.15V HIGH...
  30. Replies
    18
    Views
    284

    I tried your sketch, it works perfectly. Here the...

    I tried your sketch, it works perfectly. Here the output of the step pins

    Overview
    18945

    Zoomed in:
    18946

    I assume some hardware issue, the driver you use is a 5V type which requires at...
  31. Thread: New to teensy

    by luni
    Replies
    5
    Views
    165

    For driving the steppers:...

    For driving the steppers: https://luni64.github.io/TeensyStep/ (This uses one intervaltimer per motor controller (10 motors per controller) and the FTM0 module (configurable)

    For PWM:...
  32. Replies
    38
    Views
    987

    Wouldn't a Segger JLink mini...

    Wouldn't a Segger JLink mini work? You get it for $18 from Adafruit
  33. Thread: TeensyTimerTool

    by luni
    Replies
    82
    Views
    1,443

    There are some new features in the...

    There are some new features in the TeensyTimerTool .


    Instead of declaring generic Timer objects and choose the type (periodic or one-shot) with the corresponding begin functions there is a...
  34. Replies
    58
    Views
    2,017

    Sticky: I can confirm the compatibility with the core...

    I can confirm the compatibility with the core libs. I'm using GCC 9 as default for a couple of weeks now. Didn't notice any issues so far.

    Advantages I found:

    It is more strict (standard...
  35. Replies
    100
    Views
    11,104

    OverrideSpeed multiplies the override factor by...

    OverrideSpeed multiplies the override factor by the speed you set at startup. So, you can as well set the speed at startup to 1 and use the override factor to set the required speed.

    i.e.


    ...
  36. Added support for the new -DARDUINO_TEENSYn...

    Added support for the new -DARDUINO_TEENSYn define which was introduced with TD1.50.

    Here the release page: https://github.com/luni64/VisualTeensy/releases
  37. Replies
    100
    Views
    11,104

    IMHO, it is not a good idea to write German posts...

    IMHO, it is not a good idea to write German posts in an English forum. If you feel uncomfortable you can always use https://www.deepl.com which does a great job translating technical texts in both...
  38. If you want to see the effects of the various...

    If you want to see the effects of the various board settings on the build options you can give VisualTeensy https://github.com/luni64/VisualTeensy a try. Basically it generates makefiles from the...
  39. The TeensyTimerTool might be interesting for you....

    The TeensyTimerTool might be interesting for you. https://github.com/luni64/TeensyTimerTool
  40. Replies
    22
    Views
    314

    You could also try polling in a tight loop....

    You could also try polling in a tight loop. Running on the 600MHz processor this might be quite fast.
    Here some absolutely untested "pseudo code".



    while(cs == HIGH)
    {
    if(clock...
  41. Replies
    46
    Views
    654

    Alternatively you can use TeensyTimerTool...

    Alternatively you can use TeensyTimerTool (https://github.com/luni64/TeensyTimerTool). The master branch already includes the changes from Kurt. I.e. it can handle the 150MHz clock and accepts sub...
  42. Replies
    46
    Views
    654

    Ups, sorry that nobody is talking about your...

    Ups, sorry that nobody is talking about your original problem anymore :-)

    Here some code which works with periods below 1Ás. To make it run you need to pull the core files with Pullrequest #425...
  43. Is there a beta boards.txt including the changes...

    Is there a beta boards.txt including the changes somewhere?
  44. Replies
    46
    Views
    654

    I assume you are questioning the load...

    I assume you are questioning the load calculation? I'm simply calculating the time difference something (here a loop) takes with and without having the timers running in the background. I then...
  45. Replies
    46
    Views
    654

    And here the load for two GPTs toggling pins....

    And here the load for two GPTs toggling pins. Done for the 24Mhz clock


    f:500.0 kHz Load: 26.9% (w/o interrupts: 6500006 with interrupts 8895336)
    f:250.0 kHz Load: 13.5% (w/o interrupts:...
  46. Replies
    46
    Views
    654

    As far as I'm concerned your suggestion does make...

    As far as I'm concerned your suggestion does make a lot of sense.

    I changed the GPT setup code in TeensyTimerTool:


    if (isPeriodic)
    {
    //double tmp = micros * (24.0 / 1.0);
    ...
  47. shit happens ;)

    shit happens ;)
  48. Replies
    46
    Views
    654

    Since at 500kHz the processor is kind of...

    Since at 500kHz the processor is kind of overloaded it might take a long time until it gets the 1M cycles done. Can you try to start with e.g T = 4 (250kHz) to avoid this?


    The template is doing...
  49. Replies
    46
    Views
    654

    Sure, did it, but nothing different which somehow...

    Sure, did it, but nothing different which somehow is clear, the isr code is long enough so that the bus has already synced when it comes to dsb -> should return quite quickly.

    I pulled the...
  50. Replies
    46
    Views
    654

    I see two problems. For the T4 all 4 PIT...

    I see two problems.


    For the T4 all 4 PIT timers run on one module (the T3.x had one module for each timer). That means, if you change clock or whatever, this affects all other interval timers...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4