Does anyone know why R1 and R2 are pulling down the analog touchpanel signal in this schematic: http://www.ghielectronics.com/downloads/FEZ/Cobra/FEZ-TFT%20EXP_sch.pdf ?
I’m trying to find a way of measuring the touch pressure. But those resistors seem to have a bad effect on the measurements, can I remove them?
We somewhat cheat and use the built in ADC so those are needed.
I already managed to read out coordinates. But I’ll have to do some calculations on how to calculate the touch resistance, and those pull-downs don’t make it easier
But I understand that they are needed to define a non-touched state.
public static int ReadX()
{
using (AnalogIn yu = new AnalogIn((AnalogIn.Pin)1))
{
using (OutputPort xl = new OutputPort((Cpu.Pin)8, true))
using (OutputPort xr = new OutputPort((Cpu.Pin)72, false))
{
return yu.Read();
}
}
}
public static int ReadY()
{
using (AnalogIn xl = new AnalogIn((AnalogIn.Pin)0))
{
using (OutputPort yu = new OutputPort((Cpu.Pin)5, true))
using (OutputPort yd = new OutputPort((Cpu.Pin)73, false))
{
return xl.Read();
}
}
}
public static int ReadZ1()
{
using (AnalogIn xl = new AnalogIn((AnalogIn.Pin)0))
{
using (OutputPort xr = new OutputPort((Cpu.Pin)72, false))
using (OutputPort yu = new OutputPort((Cpu.Pin)73, true))
{
return xl.Read();
}
}
}