Hi All,
I have a circuit where i have an input of 0 to 300Hz variable frequency, 0-5v square wave going in to a 18M2 and I'm using the 'count' to count the number into a variable..
I need to increase the resolution of the count to 600Hz to help with better accuracy of the rest of the code.
I would like to increase the count number by doubling the pulse or counting the 'edges' of the square wave.
I can do it externally using a simple XOR gate with a RC to one of the inputs but I think if it can be done within the software it would make a much simpler and compact circuit.
I've tried setting up a counter within an external loop but it re triggers when the frequency is low and gives false readings.
I cant think of a suitable command within the picaxe commands that could help with this.
Any ideas??
regards
Mark
I have a circuit where i have an input of 0 to 300Hz variable frequency, 0-5v square wave going in to a 18M2 and I'm using the 'count' to count the number into a variable..
I need to increase the resolution of the count to 600Hz to help with better accuracy of the rest of the code.
I would like to increase the count number by doubling the pulse or counting the 'edges' of the square wave.
I can do it externally using a simple XOR gate with a RC to one of the inputs but I think if it can be done within the software it would make a much simpler and compact circuit.
I've tried setting up a counter within an external loop but it re triggers when the frequency is low and gives false readings.
I cant think of a suitable command within the picaxe commands that could help with this.
Any ideas??
regards
Mark