In SX Microcontrollers, SX/B Compiler and SX-Key Tool, VelocitąPaola wrote: It all depends on the specific CAS and its principals of operation. What car are you dealing with specifically? If the CAS is a hall-effect sensor or some type of optical sensor, chances are the output will be a series of 5V or 12V pulses depending on the orientation of the camshaft. On my car, the CAS is a hall effect sensor and the magnet attached to the camshaft has four regions: a 105* N region; a 105* S region; a 75* N region; and a 75* S region -- in that order. Whenever a N region is under the sensor, the signal is high; 5V in this case. If you just need to know RPM, as opposed to actual camshaft orientation, you would have to search for the same transition between regions, every rotation, and count them per unit of time; i.e. how many times the 105*N to 105*S transition is made every 100ms. This task might be a little tricky if you're new to programming or computer math. A better solution would be to find an RPM signal wire. Many PCM's use the crank angle sensor and camshaft position sensor as inputs, then calculate the RPM and output an RPM signal to the stock tachometer in the gauge cluster. These signals are much more straightforward and easy to read as they don't have any information about orientation encoded in them. You could very easily use the COUNT command in this case, though the results depend a lot on the specific car and how the PCM outputs the RPM signal. When you attach a voltmeter to the CAS signal wire, you're only seeing an averaged reading of the pulses since they're being output faster than the meter can react and faster than your eyes could possibly see without an oscilloscope. The same goes for the transistor/relay combination you proposed: the pulses are being output much faster than the switching frequency of the relay (usually around 150Hz or less). In this case the relay armature is simply floating between its two positions since it's being forced to operate on such a high frequency. Remember, in any four stroke engine, the camshaft rotates twice as fast as the crankshaft. If possible, I recommend finding a technical information manual for your car (usually sold with or similarly to the factory service manual [FSM], from your dealer). This manual should have all relevant information including RPM signal wires and format. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=274144#m274146 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)