Flying Electron wrote: > 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?
What's the native output of the pressure sensor, before the microcontroller gets to it? Can you tap in there instead? Might be simpler. Analog input into emc2 might be accomplished by adding SPI support to hostmot2, and writing a driver for an SPI ADC. Some work has been done in this direction by various folks (search the mailing list archives and irc logs if you're curious), but so far nothing has solidified. -- Sebastian Kuzminsky we are children equally of the earth and the sky -- Carl Sagan ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
