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

Search:

Type: Posts; User: cchouard

Search: Search took 0.00 seconds.

  1. Replies
    22
    Views
    1,411

    For those interested, I have solved the glitch...

    For those interested, I have solved the glitch issue caused by the library analogWriteFrequency function by writing my own changeFrequency function as a replacement.
    See this post :...
  2. For those interested, I have solved the glitch...

    For those interested, I have solved the glitch issue by writing my own changeFrequency function as a replacement for the library analogWriteFrequency.
    See this post :...
  3. Replies
    10
    Views
    1,023

    I have written my own function by the name of...

    I have written my own function by the name of changeFrequency as an alternative to the analogWriteFrequency function.

    The problem with the analogWriteFrequency function is that its call triggers a...
  4. Thank you manitou ! OK, I see where my confusion...

    Thank you manitou !
    OK, I see where my confusion comes from :
    - on the one side analogWriteFrequency sets ftmClockSource = 2, that is FTMx_SC = 2, namely Fixed frequency clock (page 781), and
    - on...
  5. 31.25 kHz clock source for analogWriteFrequency

    Hello,
    Reading the CPU reference document and the kinetis.h and pins_teensy.c files, I am trying to understand where the 31.25 kHz clock source that the analogWriteFrequency uses for low frequencies...
  6. Replies
    10
    Views
    1,023

    Hello Luni, I see your point. The reasons why I...

    Hello Luni,
    I see your point.
    The reasons why I want to avoid interrupts are :
    - for fun (i agree with you, it is fun !)
    - I am unconfortable with interrupts : handling them may sometimes be...
  7. Replies
    10
    Views
    1,023

    Luni, thank you very much for your help. I had...

    Luni, thank you very much for your help.
    I had seen interval timers briefly, but I rejected them because they are software timers driven by interrupts.
    I like hardware timers because they work on a...
  8. Replies
    8
    Views
    605

    OK, Paul, thank you, I thought that there could...

    OK, Paul, thank you, I thought that there could be ways to access these numbers without having to copy-paste them into the sketch, that is fine.
    I see your point that FTP1_CH0_PIN does not need to...
  9. Replies
    8
    Views
    605

    Thank you all for your quick responses, much...

    Thank you all for your quick responses, much appreciated !
    Serial.println(FTM1_MOD) works, no problem.
    But both Serial.println(F_TIMER) and Serial.println(FTM1_CH0_PIN) generate a *not declared in...
  10. Replies
    8
    Views
    605

    Accessing timer registers Teensy 3

    Hello,
    Despite having browsed through this forum, I am unsuccessful understanding how to access the Teensy processor internal timer registers, such as FTM1_MOD, FTM1_CH0_PIN, FTM1_SC, FTM1_CNT from...
  11. Replies
    16
    Views
    3,664

    Hello @Theremingenieur My understanding is that...

    Hello @Theremingenieur
    My understanding is that CNTIN is the value from which the timer counts all the way up to MOD. So, to me, CNTIN is set to 0 in analogWriteFrequency(). Would your statement be...
  12. Replies
    16
    Views
    3,664

    Duty is not recalculated by analogWriteFrequency...

    Duty is not recalculated by analogWriteFrequency since, as @Theremingenieur explained it very well, MOD is about total period, not about duty.
  13. Replies
    10
    Views
    1,023

    Hello Manitou, I had seen that post, thank you,...

    Hello Manitou, I had seen that post, thank you, but I must confess that my hacking capabilities are weak. I need to change frequency without stopping the timer. When I read at this sentence from...
  14. Replies
    10
    Views
    1,023

    Hello Paul, Thank you, but this library handles...

    Hello Paul,
    Thank you, but this library handles moves rather than speed. Moreover, I wish the processor to be free to do plenty of other things while the motors are moving, hence the need to use...
  15. Hello Paul, I am wondering why you say that...

    Hello Paul,
    I am wondering why you say that "But if you write a new MOD value that's smaller, at a moment when the current count is equal or greater, then you can end up the counter going all the...
  16. Hello Hudson, I am interested by your attempt to...

    Hello Hudson, I am interested by your attempt to modify analogWriteFrequency so that there is no glitch when it is called. Did you succeed ?
  17. Replies
    10
    Views
    1,023

    analogWriteFrequency issue

    Hello,
    On a Teensy 3.2, I am trying to use the internal hardware timers to drive the stepper motors of a self balancing 2-wheel robot.
    I need to update the speed of the stepper motors quite...
Results 1 to 17 of 17