I am looking at the feasibility of using a Maxim/Dallas One-Wire device on an external input that is designed to read the value of a resistor. Someone at this company thought a few resistor values would be all they needed to identify attached equipment options. Now they are out of resistors and will be needing a new way of identifying the attached equipment. I thought that the One-Wire parts would be perfect for this.
Here's the hard part. The existing circuit is in nearly 100,000 units in the field as well as in the new design that is currently going to manufacturing and it is designed to filter out the type of pulses I need to measure. It uses a 5.6K pullup and an ADC input to measure the voltage on the external resistor. But there are two of RC filters on this circuit. One is about 1 uS RC and is between the resistor pullup/FET pulldown and the outside. I think I can live with this since the required timing on the One-Wire interface are more along the line of 15 uS. I figure I can make the pulldown time a minimum of 3 uS and still meet all the One-Wire specs. But there is also an RC between the pullup resistor/OD FET and the ADC input with an RC time of 22 uS. This one is a killer since it makes reading the bus hard. In the required 15 uS it will be pulled down to about 50% of Vcc.
Obviously I can't use the ADC input as a digital input since the voltage never reaches the Vil threshold. But I was wondering if the ADC could be used to read the voltage. If the One-Wire slave is returning a zero, it will hold the bus low for 15 uS, min, which will pull the ADC input to 50% Vcc before releasing it and the voltage starts ramping back up. If the the One-Wire slave is returning a one, it will never clamp the bus and it will ramp up to about 95% of Vcc at the 15 uS time. The data sheet on the AVR says it takes 1.5 ADC clocks to sample the input. So if I have the ADC running at the max 200 kHz and start the ADC at about 7.5 uS into the 15 uS window, it might just have a shot at reading this voltage. But there seems to be a 5 uS window to align with the ADC clock, so I might have to start the conversion at say 5 uS into the 15 uS window which has sampling between12.5 uS and 17.5 uS.
Anyone have an idea of whether this is likely to work? I have little experience with the AVR and it looks like this is likely to be on the hairy edge of ADC timing. I don't see a spec in the AVR data sheet on the aperature window for the ADC timing. I guess the only way to know is to hook it up and try it. But I would have to test over temp, etc. Testing with a One-Wire part would not do the job since their timing has wide variation. But I should be able to do my testing just using the unit under test.