Hello.
I just got my touch screen from sparkfun and I did read that nice pdf about how it works. I will try to write a VHDL driver for my spartan 3e dev board.
http://www.hantouchusa.com/HOW%20DOES%20IT%20WORK.pdf
I have a problem here, the pin of the touch screen that will give me the analog voltage is floating before the pen touches the touch screen.
Since it is floating, there is no way to find out when the pen will touch the screen.
So, I did think of this solution: this pin, will be connected to an ADC but it will also be connected to an FPGA input that will have an internal PULL DOWN resistor. When the FPGA reads a rising edge, it will disable the PULL DOWN and give a “high Z” to the line and then it can order the ADC to make the measurements.
But the FPGA cannot enable or disable the PULL DOWN/PULL UP resistors while run time, this can be done only in configuration time.
Now, I can think of other ways of implementing this, with external hardware, but I would like to keep it simple, just the FPGA and the ADC. If nothing comes up, I will use an AVR with ADC but I would really like to use my FPGA.
So, has anyone here implement this design? Can you suggest me a way of implementing this?
Thank you very much.
Vasilis.
There is actually another problem with this scheme beyond being able to toggle the PU/PD resistors in the FPGA. You stated that when the FPGA reads a rising edge, it will turn off the PD on the pin to allow the ADC to sample the level. This assumes that the level will rise far enough to trigger a logic level change in the FPGA. How do you trigger on lower level voltages?
I would suspect you would be better off just “polling”. Have the ADC sample at a fixed rate (probably as fast as it can). You should be able to leave the PD resistors enabled, though depending on their value and the touch screen resistance, you may need to adjust for it when reading the values. If both (X,Y) come back zero then the pen isn’t touching the screen.
Patrick M
Indeed you are right. Actually, the same problem will come up if I try to build it with an AVR.
I will try your advice.
Thank you very much.
Vasilis.
When I played with that @ SFE; I used a dedicated touch screen driver IC; its price per unit is a bit high for a high volume project, but fine for a proto. I don’t recall the part #, but digikey carried it. [Its just an ADC + controllable pullups].
Cheers,
–David Carne
Hello, that sounds nice but I don’t to use a dedicated IC for that since there is already an ADC on the board.
However, if I cannot fit a solution, I will most probably use the dedicated IC.
Thanks.
For the dedicated IC route, I think (in my research) a pretty standard one is the TI ADS7846. It seems like a lot of folks have cloned the chip, which makes me think it’s pretty standard or useful. Some even come with battery/voltage monitors and other such things!
http://focus.ti.com/docs/prod/folders/p … s7846.html
hope that helps