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

Thread: TimerOne over 1Mhz

  1. #1
    Junior Member
    Join Date
    Oct 2017

    TimerOne over 1Mhz

    I am googling since a while and can't really get trough this.

    I am using a Teensy 3.6
    Nothing connected right now apart the oscilloscope

    I would like to use the TimerOne to synch signals in order to drive a CCD linear sensor.
    The sensor runs at 4MHz (max) and I'd like to give a try and see if I can push it to its limits.

    My problem is, I need to setup the Timer.initialize() to 0.25 and it doesn't looks like It likes decimals.
    My crappy oscilloscope won't show me anything and I believe it is some sort of constraint in the library itself not allowing me to go under 1 microsecond.

    My code:
    #define MC 3  //MASTER CLOCK on FTM1
    void setup()
      Timer1.pwm(MC, 512);
    void loop()
    I tried everything 0.25 .25 0.25f

    This is a picture of my oscilloscope displaying a 1Mhz signal.
    Click image for larger version. 

Name:	22851474_1433342156713362_1693923700_o.jpg 
Views:	98 
Size:	101.5 KB 
ID:	11901

    Are there workarounds? Is there another way to get a 4Mhz Running? I need to push out different signals with the clock ticking in backround and the signals being synch to it.



    I'm still struggling, I have the same behaviour using FrequencyTimer2 library. Capped to 1Mhz
    I tried analogWriteFrequency() and it is working actually, I still have no clue how to activate the interrupts for the pwm and how to use them to trigger the other waveforms. I'll check this tomorrow
    Last edited by Pivetta; 10-27-2017 at 12:30 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts