Hi I have a problem with my project, it is to make an ebike monitor. Most of the things that need measuring do not need to be done at high speed one cycle of the loop will be quick enough as long as the loop is not too long. The speed sensor is another thing. The sensor will be put on an interrupt according to my calculations the interrupt will be activating at a max of 260 interrupts per second when at a speed of 30mph(my maximum speed.
An interrupt will occur every time a hall sensor passes one of the magnets built onto the motor which is 26 per revolution on this wheel.
The sort of code that will be required in the interrupt ideally will convert the pulses from the interrupt to kph(if MPH is requires then the conversion will be done at time of display.
Number of poles(interrupts per revolution) and cercumfrence of the wheel will be stored in EEram. For this test project I am bypassing storage in EEram and using constants, the circumference will be 1370mm the number of poles will be determined in first test then locked into first revision of program.
Is the internal clock accurate enough. Kendrick