Hello everyone,
The quick question is: Is the internal clock of a PICAXE 28X2 B.3 (using 4MHz external resonator for 16MHz running freq) that is used for the TIMER command the same clock used for PWM output?
I am using an inductive sensor to see 2 pieces of metal that are attached to a belt a certian distance apart. That distance does not change nor does the belt speed (under normal conditions). The normal time between sensor reads of the 2 pins is 60.0 seconds. To verify that things are as accurite as possible, I calculated what the only 2 errors I came up with could be. One source of error could be the placement of the pieces that the sensor reads. They are attached to the belt and are unable to move more than a 64th of an inch once attached. The exact placement can not be exact but once placed they do not move so I can account for that error easily.
The 2nd area of error is where my question comes from. I use one output pin to give me a 1000 Hz 50% PWM signal that I measure with a Fluke 289 and Fluke oscilloscope. I measure 1005.6 Hz and 1005 Hz respectively. This frequency variation (0.5%) should give me a 0.3 second error for a 60 second read time. The problem is, I do not see that error.
After 24 hours of readings, the only error I see is what I calculate to be the error associated with the pin placement inaccuracy. There may be another form of error that exactly cancels this frequency error amount out but I have not found anything else yet. So my question is, is the PWM output error the same error that I would get while using the TIMER command?
Any input would be welcome.
Dave E
The quick question is: Is the internal clock of a PICAXE 28X2 B.3 (using 4MHz external resonator for 16MHz running freq) that is used for the TIMER command the same clock used for PWM output?
I am using an inductive sensor to see 2 pieces of metal that are attached to a belt a certian distance apart. That distance does not change nor does the belt speed (under normal conditions). The normal time between sensor reads of the 2 pins is 60.0 seconds. To verify that things are as accurite as possible, I calculated what the only 2 errors I came up with could be. One source of error could be the placement of the pieces that the sensor reads. They are attached to the belt and are unable to move more than a 64th of an inch once attached. The exact placement can not be exact but once placed they do not move so I can account for that error easily.
The 2nd area of error is where my question comes from. I use one output pin to give me a 1000 Hz 50% PWM signal that I measure with a Fluke 289 and Fluke oscilloscope. I measure 1005.6 Hz and 1005 Hz respectively. This frequency variation (0.5%) should give me a 0.3 second error for a 60 second read time. The problem is, I do not see that error.
After 24 hours of readings, the only error I see is what I calculate to be the error associated with the pin placement inaccuracy. There may be another form of error that exactly cancels this frequency error amount out but I have not found anything else yet. So my question is, is the PWM output error the same error that I would get while using the TIMER command?
Any input would be welcome.
Dave E