سلام به همه
من این سایت رو پیدا کردم
http://transistor-man.com/cap%20touch%20sensors.html
آمده مقدار خازن رو با میکرو اندازه گیری کرده

اما نگفته چطور
گفته تابعی داریم به اسم getrc() با این میشه مقدار RC روی پایه دلخواه رو خوند
همچین تابعی داریم؟!
A= getrc(PortA.1)
به نظر شما میشه از این ورش استفاده کرد برای ساخت کلید های تاچ؟!
میخوام کلید از پشت شیشه کار کنه و با نزدیک کردن انگشت به سطح شیشه که پشتش سنسور تاچ قرار داره میکرو فرمان بگیره
ممنون میشم کمکم کنید توی ساخت این کلید
من این سایت رو پیدا کردم
http://transistor-man.com/cap%20touch%20sensors.html
آمده مقدار خازن رو با میکرو اندازه گیری کرده
اما نگفته چطور
How it works:
Picture the microcontroller as constantly measuring the rc time constant for a fixed capacitor and resistor. the time between the hi and low state can be correlated as the number of microseconds (from simple timer useage). The number of microseconds , lets assume 500, would stay fairly constant. Now, what if you touched a pin of the cap? would the time constant change. you bet. the differential rc time constant input is a quick and simple way to make a capacitive touch sensor.
Picture the microcontroller as constantly measuring the rc time constant for a fixed capacitor and resistor. the time between the hi and low state can be correlated as the number of microseconds (from simple timer useage). The number of microseconds , lets assume 500, would stay fairly constant. Now, what if you touched a pin of the cap? would the time constant change. you bet. the differential rc time constant input is a quick and simple way to make a capacitive touch sensor.
همچین تابعی داریم؟!
A= getrc(PortA.1)
Making it work [simple]
Using Bascom, there allready is a library called getrc() where A= Getrc(pind,4) returns the rc time constant in numerical format (in micro seconds).
To designate a button bing pushed, simply poll, or check all the touch pads to determine if their rc time value is greater or less than a predetermined value. this means that a port is being 'touched' or in this case something is being pushed.
Using Bascom, there allready is a library called getrc() where A= Getrc(pind,4) returns the rc time constant in numerical format (in micro seconds).
To designate a button bing pushed, simply poll, or check all the touch pads to determine if their rc time value is greater or less than a predetermined value. this means that a port is being 'touched' or in this case something is being pushed.
میخوام کلید از پشت شیشه کار کنه و با نزدیک کردن انگشت به سطح شیشه که پشتش سنسور تاچ قرار داره میکرو فرمان بگیره
ممنون میشم کمکم کنید توی ساخت این کلید









دیدگاه