Hi, note that if the fan is being slowed down by running it with PWM (i.e. its ground to your board ground is thru a transistor being PWMed) you'll miss pulses when the fan is off. I've done two projects where there is a control loop in firmware to keep a fan at a specific RPM as a battery voltage running it drops, and to handle this, what I did was... a) disable PWM (i.e. made it full-on) b) wait for rising edge of signal c) start timer d) wait for falling edge of signal e) turn PWM back on, and now calculate RPM for slowly moving fans (i.e. low PWM %) there is a noticeable "shudder" as it is run at 100% briefly to take the measurement. Also a caution - the signal wire needs a pullup resistor, but it doesn't work like you might think, at least on the fans I've seen. Initially I had the pullup go to 3.3V (my main logic voltage). However, I saw pulses of +12V (fan voltage) on this line. This eventually destroyed the input pin on the microcontroller. I'm unclear why this was happening, but what I did instead is to use that signal line to switch a NFET, and that NFET switched the microcontroller input pin to ground or (when NFET off) the input pin was pulled up to 3.3V. This has worked fine. As ever something seemingly simple has got its gotchas... And as other people have mentioned, there are 2 pulses on the signal line per revolution, not 1, curiously! Have fun, J MCH wrote: > Thanks for the great info on the backlight. > > Does anyone have some info/ASM code on fan speed checking? > I need to use the 'third wire' of a PC type fan to check the RPM. > > I *think* it's just a matter of checking the line for X mS for ground > pulses, then calculate how many pulses per minute that would equate. For > example, if I check it for 100 mS, and I see 5 pulses, that would be 5 x > 600, or 3000 RPM. The 600 multiplier came from 1 minute = 600 x 100 mS. > > Does anyone know if this is how this third wire works? (ground pulses) > > and if so does this sound correct for how to calculate the RPM? > > Thanks again, > Joe M. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist