> From: marco.genovesi@libero.it[SMTP:marco.genovesi@LIBERO.IT] > Sent: Monday, October 20, 2003 11:47 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: [EE]:[PIC]: Reading two frequencies > Hi all, > I have a question related to a simple sensor circuit. > Processor: 16F84A > I would like to implement a simple sensor using an LM393 dual comparator > configured as R/C oscillator and read the frequency from the two outputs > using only one PIC pin (RA4/T0CKI - TMR0). The frequency is in the range 1 ~ 5 Khz. > Another I/O pin is used to activate/stop the circuit: totally, 2 pin used. > I think that it isn't possible to read two frenquencies at the same time on the > same pin, so I must activate the two RC stages > alternatively, but it seems > impossible with LM393 because when the voltage supply is on, both the RC > circuits are activate. How would you combine the two outputs? If you use exclusive OR, you might be able to separate the two frequencies by measuring the high and low times and doing an analysis of the results. There might be peaks which could be decoded to give the separate frequencies. John Power -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics