touch on a 28x2

rob nash

Senior Member
hi,
am trying to add five touch bottons,to a project using a picaxe 28X2 (b.3)and am not having much joy
Code:
#picaxe 28x2

main:do
touch16 a.0,w0 ; read value into w0
touch16 a.1,w1
pause 20
debug
loop
this is the test code it work on a 14m2 although i change the code to work b.5,b.4 and the sensors work fine.
what am i missing
i,ve tested the pins with an adc 10k pot they are fine.

the 28x2 is powered by 3.3v reg where as the 14m2 was powered by 3AA

rob
 

nick12ab

Senior Member
The touch sensors on the X2 parts use different technology from the touch sensors in the M2 parts. What is the problem you're having?
 

rob nash

Senior Member
hi nick
the 28x2 just does'nt appear to register the touch,the value in debug ain't staple changes between 23 to 50 that i expected but no measurable different when touched. thats the problem am having
rob
 

nick12ab

Senior Member
hi nick
the 28x2 just does'nt appear to register the touch,the value in debug ain't staple changes between 23 to 50 that i expected but no measurable different when touched. thats the problem am having
rob
Are you using decoupling capacitors? What download cable are you using?
 

rob nash

Senior Member
am using the usb axe27 cable am not using decoupling capacitors and not sure where to place them " would i place something like 4.7 on the pin a.0 to ground.
 

rob nash

Senior Member
sorry i got 100 uf on the picaxe should i change that to a 100nf, just to add a am using tacs as the touch sensor with around 10 cm wire pluged into the breadboard,
 

rob nash

Senior Member
did do made no difference in reading, when i pinch the wire there is a small increase to 70 could the wire be to long?,
 

nick12ab

Senior Member
am not too sure i borrowed the 28x2 from my 28x2 shield, how can i check
Check the number on top of the PICAXE. If it is PIC18F2520 then it is a PICAXE-28X2-5V and if it is a PIC18F25K22 then it is a PICAXE-28X2 and then I am stuck for suggestions on what might be wrong.
 

rob nash

Senior Member
thanks for taking the time nick will hold out for techincal hopeful they will shed some llight on my problem and has anyone else used the touch sense 28x2 please add your thoughts,
 

Technical

Technical Support
Staff member
What is the actual hardware used - if just pinching a dangly wire than an increase of 20 or so when you touch it sounds about right. A touch pad is what you should be using, about 2 to 3 cm across.
Do not expect M2 and X2 readings to be similar, they work in very different ways.

You can also play around with the config byte to increase resolution.
 
Top