Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

touch sensor using hardware CVD built into 12LF1552 or similar

Status
Not open for further replies.

jimg

Member
Has anyone used the example code , example 16-1 in the PIC12LF1552 document, to implement a touch sensor? I think I understand the code and what it is doing, I just don't know what to do with the two results to determine if a touch event occurred. The whole point is to use a chip with hardware CVD built in so I don't have to use the giant, incomprehensible mtouch framework, which requires a C compiler. I don't read or understand C, so assembly or pseudo code would be appreciated.
 
The datasheets basic example "page 119" ( as you pointed out ) is pretty straight forward
What don't you understand...The double conversion yields two results... I would add and divide by two to get a single result... You need to trial the results to get reasonable results...



I have looked through the "mTouch" framework..... C++ programmers going OTT as usual..
 
Last edited:
I wasn't sure from the description how to use the two results.

Quoting from section 16.1.6
"Setting the ADIPEN bit prior to a double conversion will allow the user to perform a pseudo-differential CVD measurement by subtracting the results from the double conversion. This is highly recommended for noise immunity purposes."

I'm pretty hazy on what "subtracting the results" means here, but I assume it means subtract one from the other. And if I do so, what does it represent?

I'm making the assumption that this result would then be compared to a previous result. Giving a delta. Only an assumption since it is never stated that I can find.

What delta would constitute an actual event versus drift or noise? It's not clear to me from the documentation.

Also, I assume that one would get a delta from the release, which must be discriminated from the press so as not to trigger an extra result. So either only a positive or only a negative delta should be considered a press (no idea which).

I'm not opposed to some experimentation, but there are too many variables to insure correct interpretation of the experimentation results.


I was hoping someone had this part working rather than me guessing. (And rather than me trying to decipher the giant pile of C that is the "mTouch" framework.)
 
I have only played with Capacitive Sensing Module (CPS)... The newer CVD is different... There is a devboard called "One Pic" It has three micro's... The exmple code that is downloadable, has several examples of CVD but playing with the dev board, they aren't perfect... CVD allows presence, not only touch... Your finger only has to be near to take a reading...

I found that it works touching the reverse of the PCB as well as the touch part!!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top