hi ksor,
Please post your program or at least the CONFIG details for the PIC.
My program is not worth seeing - it's made automaticly by Flowcode - do you know this software ?
In Flowcode you are working with a bunch of flowcharts - and that's just my way of working - it'd not rocket science
I HAVE looked at the C-code (or the ASM-code) comming out of Flowcode - it's not very pretty !
When using Flowcode you are not specific configuring anything - you just make some boxes in the flowchart.
The program IS WORKING PERFECT:
In both RPM and COUNTING mode I use interupt on every incomming puls at RB0 - when COUNTING the interupt service routine just increment a counter variable.
In RPM mode the interupt service routine a timer gives me a counting periode of 1 sec and when the timer interupts, I just show the counting variable in the display - the value IS in fact RPM's !
In RPM mode I have a "gliding" (I don't know the right word in english) mean value of 5 readings - to get a more stable figure in the display - and because I use INTERGERs all over I have to limit my RPM's to 6.500 (5 X 6.500 <= interger max value 32767).
Maybe I can use some software to get rid of the noise - but in the first place I'll try to use "RC-****" in the input - again I don't know the right word for this RC-thing (a resistor in series and a cap to ground) and I don't know the method to find out the R and C values.
You can get the C-code or ASM-code if you want, but it's no pretty coding I think.
Why do you think the code have to do with the noise ?
/KSor