Hi all, To find the vehicle speed for my project, I was going to tap into the speedo wires coming from the gearbox, but after getting a wiring diagram for the vehicle I changed my mind. It is 97 pages of schematics just for a 4 cylinder car. That also took ages to get hold of, and I couldn't believe that the manufacturer will no longer give out any info on this type of thing. I had to get it from a friend of a friend etc. inside the business with the assurance that I was not to disclose it. What a drama! Gone are the days of self maintainance. Anyways, as simplicity if often the best solution, I decided to use a $5 opto shmitt trigger detector mounted on the inside of the rear wheel. It "looks" between the 16 or so slots cut into the wheel rim and gives me the signal I need. I'm going to test drive the vehicle (which has a digital speedo) and press a "button" on the controller when the speed is 64KPH. If I multiply the accummulated speed pulse result by 64 (easy), I get the speed at 1KPH. From then on, to get any speed in KPH, I just divide the 1KPH speed by the new capture value. To do this I need to use the capture module in the 16F877. At 1KPH, rough calculations suggest a value of C350h will end up captured when TMR1 prescaler is set at 1:8 and capture on every falling edge. >From what I gather, after a valid edge is detected, The TMR1 contents are dumped into the capture registers and an interrupt can be generated. It seems that TMR1 is not reset as a result. Is this true, or do I do that from the interrupt routine? That seems to be a little bit inaccurate to me, although it may not matter much. I figured on a max frequency from the slots of only 278Hz at 110KPH and I'm only interested in integer results. -- Best regards Tony http://www.picnpoke.com mailto:sales@picnpoke.com