I've got a pressure sensor that I'd like to use as a probe. The sensor has a value from 0 - 1023 based on the amount of pressure applied. The sensor is read by a microcontroller and the microcontroller can generate a pwm signal based on the sensor value. I was thinking that EMC2 could read in the PWM signal and reconvert the PWM signal back to a number from 0 - 1023 which could then be fed into a comparator in HAL to generate the probe signal. I think doing it this way would allow me to vary the trip point by varying the comparator input.
The only two ways I have figured out how to get an analog value into EMC2 through a parallel port is either PWM input or pulsing an input pin at a frequency and having an encoder trigger off the pulses and read the velocity from the encoder. Maybe I am making this too complicated and there is a simpler way? Thanks! Sebastian Kuzminsky wrote: > Flying Electron wrote: > >> I've been looking through all the realtime components and haven't seen >> anything obvious. Is there a component to read a PWM signal in from a >> parallel port pin? >> > > That's backwards from how we usually do it - pwm generally comes *from* > emc2, goes *out* the parallel port, and then goes in to a servo amp or > similar. > > What are you trying to do? > > > ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users