Hi All,
I have been trying Pulseposition on my Teensy35, and I have found it seems to be producing inaccurate pulse sizes. Myoutput.write(1, 1000) produces a pulse between 800us and 850us and a Myoutput.write(1, 2000) produces a pulse between about 1750us and 1850us. The "separator" pulse, which should always be exactly 300us comes in at about 85us.
The screenshot is from xoscope, and shows a 1000us and 2000us pulse. I don't know how to get xoscope to display any actual values, so I have been measuring the pulse widths on the screen with a ruler. If anybody knows a better way, please let me know. I understand @dereckbc has been using a similar setup, and using the second pin in the pulseposition begin to act as a trigger for xoscope. I'd be really interested to know how to do that. On my screen the grid size is about 27mm (measured with a ruler), and the 1000us pulse is about 43mm and the 2000us pulse is about 98mm. I would have thought that the 2000us pulse would have been double the 1000us pulse but such does not appear to be the case. The separator pulse is about 7mm. These are all measured with xoscops on 500us/div.
Here's the code, not that it offers much help.
If anybody can shes any light on why this is happening, or what I have to do to get correct results please let me know.
Thanks,
Ian
I have been trying Pulseposition on my Teensy35, and I have found it seems to be producing inaccurate pulse sizes. Myoutput.write(1, 1000) produces a pulse between 800us and 850us and a Myoutput.write(1, 2000) produces a pulse between about 1750us and 1850us. The "separator" pulse, which should always be exactly 300us comes in at about 85us.
The screenshot is from xoscope, and shows a 1000us and 2000us pulse. I don't know how to get xoscope to display any actual values, so I have been measuring the pulse widths on the screen with a ruler. If anybody knows a better way, please let me know. I understand @dereckbc has been using a similar setup, and using the second pin in the pulseposition begin to act as a trigger for xoscope. I'd be really interested to know how to do that. On my screen the grid size is about 27mm (measured with a ruler), and the 1000us pulse is about 43mm and the 2000us pulse is about 98mm. I would have thought that the 2000us pulse would have been double the 1000us pulse but such does not appear to be the case. The separator pulse is about 7mm. These are all measured with xoscops on 500us/div.
Here's the code, not that it offers much help.
Code:
#include <Arduino.h>
#include <PulsePosition.h>
PulsePositionOutput(PPM);
void setup()
{
PPM.begin(9);
}
void loop()
{
PPM.write(1, 1000);
PPM.write(2, 2000);
PPM.write(3, 1000);
PPM.write(4, 2000);
PPM.write(5, 1000);
PPM.write(6, 2000);
PPM.write(7, 1000);
PPM.write(8, 2000);
}
If anybody can shes any light on why this is happening, or what I have to do to get correct results please let me know.
Thanks,
Ian