On Mon, 15 Sep 1997 09:00:04 -0700 Andre Abelian writes: >Hi to all PIC engineers. > >I have a motor that has hall effect sell on it with magnet.(custom >made) >when the motor runs hall sell makes logic output 1 and 0. >I need to shut off the motor when it goes over 6000 RPM. >My problem is that I am stock. I can not imagine how to read the >frequency. There are lots of ways to do this. If you only need the PIC for the overspeed check a very simple way would be to connect the Hall cell to the TMR0 input and configure it as a counter. Reset the counter then use a software delay loop to wait for a while. Then read the timer result and if it is larger than a threshold or if the overflow flag is set, the speed is too high. (The exact values of "a while" and "a threshold" depend on how many pulses per revolution the Hall sends and how precisely you need to detect the speed) This will work on a 12-bit PIC as well but they don't have the overflow flag. In that case you should check the count periodically during the delay and stop if it is about to overflow, meaning the speed is way too fast. >Any help explaining this will be very appreciated. >I am using 16c62a > >Andre thank you. >