Hi,
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:
I tried everything 0.25 .25 0.25f
This is a picture of my oscilloscope displaying a 1Mhz signal.
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.
Thanks!
Pivetta
EDIT:
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
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:
Code:
#define MC 3 //MASTER CLOCK on FTM1
void setup()
{
Timer1.initialize(0.25);
Timer1.pwm(MC, 512);
}
void loop()
{}
This is a picture of my oscilloscope displaying a 1Mhz signal.
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.
Thanks!
Pivetta
EDIT:
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: